1. 26 3月, 2008 1 次提交
  2. 20 3月, 2008 1 次提交
  3. 09 2月, 2008 1 次提交
  4. 07 2月, 2008 1 次提交
    • M
      time: fix sysfs_show_{available,current}_clocksources() buffer overflow problem · 5e2cb101
      Miao Xie 提交于
      I found that there is a buffer overflow problem in the following code.
      
      Version:	2.6.24-rc2,
      File:		kernel/time/clocksource.c:417-432
      --------------------------------------------------------------------
      static ssize_t
      sysfs_show_available_clocksources(struct sys_device *dev, char *buf)
      {
      	struct clocksource *src;
      	char *curr = buf;
      
      	spin_lock_irq(&clocksource_lock);
      	list_for_each_entry(src, &clocksource_list, list) {
      		curr += sprintf(curr, "%s ", src->name);
      	}
      	spin_unlock_irq(&clocksource_lock);
      
      	curr += sprintf(curr, "\n");
      
      	return curr - buf;
      }
      -----------------------------------------------------------------------
      
      sysfs_show_current_clocksources() also has the same problem though in practice
      the size of current clocksource's name won't exceed PAGE_SIZE.
      
      I fix the bug by using snprintf according to the specification of the kernel
      (Version:2.6.24-rc2,File:Documentation/filesystems/sysfs.txt)
      
      Fix sysfs_show_available_clocksources() and sysfs_show_current_clocksources()
      buffer overflow problem with snprintf().
      Signed-off-by: NMiao Xie <miaox@cn.fujitsu.com>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: john stultz <johnstul@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5e2cb101
  5. 30 1月, 2008 3 次提交
  6. 25 1月, 2008 1 次提交
  7. 20 10月, 2007 1 次提交
  8. 15 5月, 2007 1 次提交
  9. 10 5月, 2007 2 次提交
  10. 26 3月, 2007 1 次提交
    • T
      [PATCH] clocksource: Fix thinko in watchdog selection · 948ac6d7
      Thomas Gleixner 提交于
      The watchdog implementation excludes low res / non continuous
      clocksources from being selected as a watchdog reference
      unintentionally.
      
      Allow using jiffies/PIT as a watchdog reference as long as no better
      clocksource is available. This is necessary to detect TSC breakage on
      systems, which have no pmtimer/hpet.
      
      The main goal of the initial patch (preventing to switch to highres/nohz
      when no reliable fallback clocksource is available) is still guaranteed
      by the checks in clocksource_watchdog().
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      948ac6d7
  11. 05 3月, 2007 1 次提交
    • J
      [PATCH] clocksource init adjustments (fix bug #7426) · 6bb74df4
      john stultz 提交于
      This patch resolves the issue found here:
      http://bugme.osdl.org/show_bug.cgi?id=7426
      
      The basic summary is:
      Currently we register most of i386/x86_64 clocksources at module_init
      time. Then we enable clocksource selection at late_initcall time. This
      causes some problems for drivers that use gettimeofday for init
      calibration routines (specifically the es1968 driver in this case),
      where durring module_init, the only clocksource available is the low-res
      jiffies clocksource. This may cause slight calibration errors, due to
      the small sampling time used.
      
      It should be noted that drivers that require fine grained time may not
      function on architectures that do not have better then jiffies
      resolution timekeeping (there are a few). However, this does not
      discount the reasonable need for such fine-grained timekeeping at init
      time.
      
      Thus the solution here is to register clocksources earlier (ideally when
      the hardware is being initialized), and then we enable clocksource
      selection at fs_initcall (before device_initcall).
      
      This patch should probably get some testing time in -mm, since
      clocksource selection is one of the most important issues for correct
      timekeeping, and I've only been able to test this on a few of my own
      boxes.
      Signed-off-by: NJohn Stultz <johnstul@us.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6bb74df4
  12. 17 2月, 2007 3 次提交
  13. 12 2月, 2007 1 次提交
  14. 11 12月, 2006 2 次提交
  15. 27 6月, 2006 4 次提交