<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/time/clocksource.c, branch v2.6.26</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.26</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-05-03T16:11:48Z</updated>
<entry>
<title>clocksource: allow read access to available/current_clocksource</title>
<updated>2008-05-03T16:11:48Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2008-05-03T12:23:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f95f81a48623982879f4fa80c641933444afd18'/>
<id>urn:sha1:4f95f81a48623982879f4fa80c641933444afd18</id>
<content type='text'>
There is no harm, when users can read the info and we ask often enough
during debugging for this kind of information.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>clocksource: Fix permissions for available_clocksource</title>
<updated>2008-05-03T16:11:48Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2008-05-02T10:49:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4359a023a8c3b247b348c310bf510b23f3c1ab64'/>
<id>urn:sha1:4359a023a8c3b247b348c310bf510b23f3c1ab64</id>
<content type='text'>
File permissions for
/sys/devices/system/clocksource/clocksource0/available_clocksource
are 600 which allows write access. But this is in fact a read only
file. So change permissions to 400.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt</title>
<updated>2008-04-18T15:37:41Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-04-18T15:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=73e3e6481f56b3b5b618671a8d32b19a35f84316'/>
<id>urn:sha1:73e3e6481f56b3b5b618671a8d32b19a35f84316</id>
<content type='text'>
* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
  clocksource: make clocksource watchdog cycle through online CPUs
  Documentation: move timer related documentation to a single place
  clockevents: optimise tick_nohz_stop_sched_tick() a bit
  locking: remove unused double_spin_lock()
  hrtimers: simplify lockdep handling
  timers: simplify lockdep handling
  posix-timers: fix shadowed variables
  timer_list: add annotations to workqueue.c
  hrtimer: use nanosleep specific restart_block fields
  hrtimer: add nanosleep specific restart_block member
</content>
</entry>
<entry>
<title>kgdb: clocksource watchdog</title>
<updated>2008-04-17T18:05:38Z</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2008-02-15T20:55:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7c3078b637882303b1dcf6a16229d0e35f6b60a5'/>
<id>urn:sha1:7c3078b637882303b1dcf6a16229d0e35f6b60a5</id>
<content type='text'>
In order to not trip the clocksource watchdog, kgdb must touch the
clocksource watchdog on the return to normal system run state.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>clocksource: make clocksource watchdog cycle through online CPUs</title>
<updated>2008-04-17T10:22:31Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@suse.de</email>
</author>
<published>2008-01-30T12:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6993fc5bbc5d63ccd55985b39c34417e430e75e9'/>
<id>urn:sha1:6993fc5bbc5d63ccd55985b39c34417e430e75e9</id>
<content type='text'>
This way it checks if the clocks are synchronized between CPUs too.
This might be able to detect slowly drifting TSCs which only
go wrong over longer time.

Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>clocksource: revert: use init_timer_deferrable for clocksource_watchdog</title>
<updated>2008-03-25T19:13:25Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-03-25T08:01:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=898a19de1502649877091b398229026b4142c0e2'/>
<id>urn:sha1:898a19de1502649877091b398229026b4142c0e2</id>
<content type='text'>
Revert

commit 1077f5a917b7c630231037826b344b2f7f5b903f
Author: Parag Warudkar &lt;parag.warudkar@gmail.com&gt;
Date:   Wed Jan 30 13:30:01 2008 +0100

    clocksource.c: use init_timer_deferrable for clocksource_watchdog
    
    clocksource_watchdog can use a deferrable timer - reduces wakeups from
    idle per second.

The watchdog timer needs to run with the specified interval. Otherwise
it will miss the possible wrap of the watchdog clocksource.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: stable@kernel.org

</content>
</entry>
<entry>
<title>revert "clocksource: make clocksource watchdog cycle through online CPUs"</title>
<updated>2008-03-20T01:53:37Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-03-20T00:01:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3150e63df41450a795bbd0bd98a8e70da74e0285'/>
<id>urn:sha1:3150e63df41450a795bbd0bd98a8e70da74e0285</id>
<content type='text'>
Revert commit 1ada5cba6a0318f90e45b38557e7b5206a9cba38 ("clocksource:
make clocksource watchdog cycle through online CPUs") due to the
regression reported by Gabriel C at

	http://lkml.org/lkml/2008/2/24/281

(short vesion: it makes TSC be marked as always unstable on his
machine).

Cc: Andi Kleen &lt;ak@suse.de&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Robert Hancock &lt;hancockr@shaw.ca&gt;
Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: Gabriel C &lt;nix.or.die@googlemail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>clocksource: remove redundant code</title>
<updated>2008-02-08T17:22:29Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-02-08T12:19:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=818c357802e2791880057fe752dc9ce9e210f772'/>
<id>urn:sha1:818c357802e2791880057fe752dc9ce9e210f772</id>
<content type='text'>
Flag CLOCK_SOURCE_WATCHDOG is cleared twice.  Note clocksource_change_rating()
won't do anyting with the cs flag.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: john stultz &lt;johnstul@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>time: fix sysfs_show_{available,current}_clocksources() buffer overflow problem</title>
<updated>2008-02-06T18:41:03Z</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2008-02-06T09:36:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e2cb1018a8a583b83d56c80f46507da6f3f2b57'/>
<id>urn:sha1:5e2cb1018a8a583b83d56c80f46507da6f3f2b57</id>
<content type='text'>
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(&amp;clocksource_lock);
	list_for_each_entry(src, &amp;clocksource_list, list) {
		curr += sprintf(curr, "%s ", src-&gt;name);
	}
	spin_unlock_irq(&amp;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: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Cc: WANG Cong &lt;xiyou.wangcong@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: john stultz &lt;johnstul@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>clocksource: add unregister function to disable unusable clocksources</title>
<updated>2008-01-30T12:30:02Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2008-01-30T12:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4713e22ce81eb8b3353e16435362eb3d0ec95640'/>
<id>urn:sha1:4713e22ce81eb8b3353e16435362eb3d0ec95640</id>
<content type='text'>
On x86 the PIT might become an unusable clocksource. Add an unregister
function to provide a possibilty to remove the PIT from the list of
available clock sources.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
