<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/time/clocksource.c, branch v2.6.25</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.25</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.25'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-03-25T19:13:25Z</updated>
<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>
<entry>
<title>clocksource: make clocksource watchdog cycle through online CPUs</title>
<updated>2008-01-30T12:30:02Z</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=1ada5cba6a0318f90e45b38557e7b5206a9cba38'/>
<id>urn:sha1:1ada5cba6a0318f90e45b38557e7b5206a9cba38</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.c: use init_timer_deferrable for clocksource_watchdog</title>
<updated>2008-01-30T12:30:01Z</updated>
<author>
<name>Parag Warudkar</name>
<email>parag.warudkar@gmail.com</email>
</author>
<published>2008-01-30T12:30:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1077f5a917b7c630231037826b344b2f7f5b903f'/>
<id>urn:sha1:1077f5a917b7c630231037826b344b2f7f5b903f</id>
<content type='text'>
clocksource_watchdog can use a deferrable timer - reduces wakeups from
idle per second.

Signed-off-by: Parag Warudkar &lt;parag.warudkar@gmail.com&gt;
Cc: john stultz &lt;johnstul@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&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>Driver core: change sysdev classes to use dynamic kobject names</title>
<updated>2008-01-25T04:40:40Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2007-12-20T01:09:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af5ca3f4ec5cc4432a42a73b050dd8898ce8fd00'/>
<id>urn:sha1:af5ca3f4ec5cc4432a42a73b050dd8898ce8fd00</id>
<content type='text'>
All kobjects require a dynamically allocated name now. We no longer
need to keep track if the name is statically assigned, we can just
unconditionally free() all kobject names on cleanup.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>kernel/time/clocksource.c: Use list_for_each_entry instead of list_for_each</title>
<updated>2007-10-19T18:53:38Z</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>matthias.kaehlcke@gmail.com</email>
</author>
<published>2007-10-19T06:39:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2e1975868ac9d41211fcaa6f2c5e44c4e7ff9e5b'/>
<id>urn:sha1:2e1975868ac9d41211fcaa6f2c5e44c4e7ff9e5b</id>
<content type='text'>
kernel/time/clocksource.c: Convert list_for_each to
list_for_each_entry in clocksource_resume(),
sysfs_override_clocksource() and show_available_clocksources()

Signed-off-by: Matthias Kaehlcke &lt;matthias.kaehlcke@gmail.com&gt;
Acked-by: 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: fix lock order in the resume path</title>
<updated>2007-05-15T15:54:00Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2007-05-15T08:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8f89441b37536fea92b1ed7004e5e2dda011473d'/>
<id>urn:sha1:8f89441b37536fea92b1ed7004e5e2dda011473d</id>
<content type='text'>
lockdep complains about the lock nesting of clocksource and watchdog lock
in the resume path.

Change the resume marker to a bit operation and remove the lock from this
path.

Signed-off-by: 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>
</feed>
