<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/time, branch v3.1.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/time?h=v3.1.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/time?h=v3.1.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-08-10T17:26:09Z</updated>
<entry>
<title>alarmtimers: Avoid possible denial of service with high freq periodic timers</title>
<updated>2011-08-10T17:26:09Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-08-10T17:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6af7e471e5a7746b8024d70b4363d3dfe41d36b8'/>
<id>urn:sha1:6af7e471e5a7746b8024d70b4363d3dfe41d36b8</id>
<content type='text'>
Its possible to jam up the alarm timers by setting very small interval
timers, which will cause the alarmtimer subsystem to spend all of its time
firing and restarting timers. This can effectivly lock up a box.

A deeper fix is needed, closely mimicking the hrtimer code, but for now
just cap the interval to 100us to avoid userland hanging the system.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: stable@kernel.org
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>alarmtimers: Memset itimerspec passed into alarm_timer_get</title>
<updated>2011-08-10T14:10:09Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-08-04T14:51:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ea7802f630d356acaf66b3c0b28c00a945fc35dc'/>
<id>urn:sha1:ea7802f630d356acaf66b3c0b28c00a945fc35dc</id>
<content type='text'>
Following common_timer_get, zero out the itimerspec passed in.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: stable@kernel.org
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>alarmtimers: Avoid possible null pointer traversal</title>
<updated>2011-08-10T14:09:53Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-08-04T14:25:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=971c90bfa2f0b4fe52d6d9002178d547706f1343'/>
<id>urn:sha1:971c90bfa2f0b4fe52d6d9002178d547706f1343</id>
<content type='text'>
We don't check if old_setting is non null before assigning it, so
correct this.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: stable@kernel.org
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2011-07-22T23:52:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-07-22T23:52:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=112ec469663e09ffc815761254b52f3ca787ce83'/>
<id>urn:sha1:112ec469663e09ffc815761254b52f3ca787ce83</id>
<content type='text'>
* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  time: Fix stupid KERN_WARN compile issue
  rtc: Avoid accumulating time drift in suspend/resume
  time: Avoid accumulating time drift in suspend/resume
  time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime
</content>
</entry>
<entry>
<title>time: Fix stupid KERN_WARN compile issue</title>
<updated>2011-07-20T22:42:55Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-07-20T22:42:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cbaa51524b3224813814607177a00c350ee35d12'/>
<id>urn:sha1:cbaa51524b3224813814607177a00c350ee35d12</id>
<content type='text'>
Terribly embarassing. Don't know how I committed this, but its
KERN_WARNING not KERN_WARN.

This fixes the following compile error:
kernel/time/timekeeping.c: In function ‘__timekeeping_inject_sleeptime’:
kernel/time/timekeeping.c:608: error: ‘KERN_WARN’ undeclared (first use in this function)
kernel/time/timekeeping.c:608: error: (Each undeclared identifier is reported only once
kernel/time/timekeeping.c:608: error: for each function it appears in.)
kernel/time/timekeeping.c:608: error: expected ‘)’ before string constant
make[2]: *** [kernel/time/timekeeping.o] Error 1

Reported-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: Avoid accumulating time drift in suspend/resume</title>
<updated>2011-06-21T23:55:37Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-06-01T05:53:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cb33217b1b2523895eb328a0b13fb3b1c4000969'/>
<id>urn:sha1:cb33217b1b2523895eb328a0b13fb3b1c4000969</id>
<content type='text'>
Because the read_persistent_clock interface is usually backed by
only a second granular interface, each time we read from the persistent
clock for suspend/resume, we introduce a half second (on average) of error.

In order to avoid this error accumulating as the system is suspended
over and over, this patch measures the time delta between the persistent
clock and the system CLOCK_REALTIME.

If the delta is less then 2 seconds from the last suspend, we compensate
by using the previous time delta (keeping it close). If it is larger
then 2 seconds, we assume the clock was set or has been changed, so we
do no correction and update the delta.

Note: If NTP is running, ths could seem to "fight" with the NTP corrected
time, where as if the system time was off by 1 second, and NTP slewed the
value in, a suspend/resume cycle could undo this correction, by trying to
restore the previous offset from the persistent clock.  However, without
this patch, since each read could cause almost a full second worth of
error, its possible to get almost 2 seconds of error just from the
suspend/resume cycle alone, so this about equal to any offset added by
the compensation.

Further on systems that suspend/resume frequently, this should keep time
closer then NTP could compensate for if the errors were allowed to
accumulate.

Credits to Arve Hjønnevåg for suggesting this solution.

CC: Arve Hjønnevåg &lt;arve@android.com&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: Catch invalid timespec sleep values in __timekeeping_inject_sleeptime</title>
<updated>2011-06-21T23:55:36Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-06-02T01:18:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cb5de2f8d0306be38f9b377b8a5c56acca7dbc3d'/>
<id>urn:sha1:cb5de2f8d0306be38f9b377b8a5c56acca7dbc3d</id>
<content type='text'>
Arve suggested making sure we catch possible negative sleep time
intervals that could be passed into timekeeping_inject_sleeptime.

CC: Arve Hjønnevåg &lt;arve@android.com&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>alarmtimers: Return -ENOTSUPP if no RTC device is present</title>
<updated>2011-06-21T23:32:28Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-06-17T01:47:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1c6b39ad3f01514fd8dd84b5b412bafb75c19388'/>
<id>urn:sha1:1c6b39ad3f01514fd8dd84b5b412bafb75c19388</id>
<content type='text'>
Toralf Förster and Richard Weinberger noted that if there is
no RTC device, the alarm timers core prints out an annoying
"ALARM timers will not wake from suspend" message.

This warning has been removed in a previous patch, however
the issue still remains:  The original idea was to support
alarm timers even if there was no rtc device, as long as the
system didn't go into suspend.

However, after further consideration, communicating to the application
that alarmtimers are not fully functional seems like the better
solution.

So this patch makes it so we return -ENOTSUPP to any posix _ALARM
clockid calls if there is no backing RTC device on the system.

Further this changes the behavior where when there is no rtc device
we will check for one on clock_getres, clock_gettime, timer_create,
and timer_nsleep instead of on suspend.

CC: Toralf Förster &lt;toralf.foerster@gmx.de&gt;
CC: Richard Weinberger &lt;richard@nod.at
CC: Peter Zijlstra &lt;peterz@infradead.org&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reported-by: Toralf Förster &lt;toralf.foerster@gmx.de&gt;
Reported by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>alarmtimers: Handle late rtc module loading</title>
<updated>2011-06-21T22:38:33Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-06-17T01:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c008ba58af24dc5d0d8e9fe6e59d876910254761'/>
<id>urn:sha1:c008ba58af24dc5d0d8e9fe6e59d876910254761</id>
<content type='text'>
The alarmtimers code currently picks a rtc device to use at
late init time. However, if your rtc driver is loaded as a module,
it may be registered after the alarmtimers late init code, leaving
the alarmtimers nonfunctional.

This patch moves the the rtcdevice selection to when we actually try
to use it, allowing us to make use of rtc modules that may have been
loaded at any point since bootup.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Meelis Roos &lt;mroos@ut.ee&gt;
Reported-by: Meelis Roos &lt;mroos@ut.ee&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: Make watchdog robust vs. interruption</title>
<updated>2011-06-16T17:30:53Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-06-16T14:22:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b5199515c25cca622495eb9c6a8a1d275e775088'/>
<id>urn:sha1:b5199515c25cca622495eb9c6a8a1d275e775088</id>
<content type='text'>
The clocksource watchdog code is interruptible and it has been
observed that this can trigger false positives which disable the TSC.

The reason is that an interrupt storm or a long running interrupt
handler between the read of the watchdog source and the read of the
TSC brings the two far enough apart that the delta is larger than the
unstable treshold. Move both reads into a short interrupt disabled
region to avoid that.

Reported-and-tested-by: Vernon Mauery &lt;vernux@us.ibm.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: stable@kernel.org
</content>
</entry>
</feed>
