<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/kernel/time.c, branch linux-2.6.33.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-11-07T21:47:23Z</updated>
<entry>
<title>time: Change jiffies_to_clock_t() argument type to unsigned long</title>
<updated>2011-11-07T21:47:23Z</updated>
<author>
<name>hank</name>
</author>
<published>2011-09-20T20:53:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33a7811d55f239dc688867920da9d49d806596d2'/>
<id>urn:sha1:33a7811d55f239dc688867920da9d49d806596d2</id>
<content type='text'>
commit cbbc719fccdb8cbd87350a05c0d33167c9b79365 upstream.

The parameter's origin type is long. On an i386 architecture, it can
easily be larger than 0x80000000, causing this function to convert it
to a sign-extended u64 type.

Change the type to unsigned long so we get the correct result.

Signed-off-by: hank &lt;pyu@redhat.com&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
[ build fix ]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Revert "time: Remove xtime_cache"</title>
<updated>2009-12-22T22:10:37Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-12-22T22:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83f57a11d84460dfe2afdb5a8bc759953428e38b'/>
<id>urn:sha1:83f57a11d84460dfe2afdb5a8bc759953428e38b</id>
<content type='text'>
This reverts commit 7bc7d637452383d56ba4368d4336b0dde1bb476d, as
requested by John Stultz. Quoting John:

 "Petr Titěra reported an issue where he saw odd atime regressions with
  2.6.33 where there were a full second worth of nanoseconds in the
  nanoseconds field.

  He also reviewed the time code and narrowed down the problem: unhandled
  overflow of the nanosecond field caused by rounding up the
  sub-nanosecond accumulated time.

  Details:

   * At the end of update_wall_time(), we currently round up the
  sub-nanosecond portion of accumulated time when storing it into xtime.
  This was added to avoid time inconsistencies caused when the
  sub-nanosecond portion was truncated when storing into xtime.
  Unfortunately we don't handle the possible second overflow caused by
  that rounding.

   * Previously the xtime_cache code hid this overflow by normalizing the
  xtime value when storing into the xtime_cache.

   * We could try to handle the second overflow after the rounding up, but
  since this affects the timekeeping's internal state, this would further
  complicate the next accumulation cycle, causing small errors in ntp
  steering. As much as I'd like to get rid of it, the xtime_cache code is
  known to work.

   * The correct fix is really to include the sub-nanosecond portion in the
  timekeeping accessor function, so we don't need to round up at during
  accumulation. This would greatly simplify the accumulation code.
  Unfortunately, we can't do this safely until the last three
  non-GENERIC_TIME arches (sparc32, arm, cris) are converted  (those
  patches are in -mm) and we kill off the spots where arches set xtime
  directly. This is all 2.6.34 material, so I think reverting the
  xtime_cache change is the best approach for now.

  Many thanks to Petr for both reporting and finding the issue!"

Reported-by: Petr Titěra &lt;P.Titera@century.cz&gt;
Requested-by: john stultz &lt;johnstul@us.ibm.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-12-09T03:27:08Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-12-09T03:27:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=60d8ce2cd6c283132928c11f3fd57ff4187287e0'/>
<id>urn:sha1:60d8ce2cd6c283132928c11f3fd57ff4187287e0</id>
<content type='text'>
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  timers, init: Limit the number of per cpu calibration bootup messages
  posix-cpu-timers: optimize and document timer_create callback
  clockevents: Add missing include to pacify sparse
  x86: vmiclock: Fix printk format
  x86: Fix printk format due to variable type change
  sparc: fix printk for change of variable type
  clocksource/events: Fix fallout of generic code changes
  nohz: Allow 32-bit machines to sleep for more than 2.15 seconds
  nohz: Track last do_timer() cpu
  nohz: Prevent clocksource wrapping during idle
  nohz: Type cast printk argument
  mips: Use generic mult/shift factor calculation for clocks
  clocksource: Provide a generic mult/shift factor calculation
  clockevents: Use u32 for mult and shift factors
  nohz: Introduce arch_needs_cpu
  nohz: Reuse ktime in sub-functions of tick_check_idle.
  time: Remove xtime_cache
  time: Implement logarithmic time accumulation
</content>
</entry>
<entry>
<title>sched, time: Define nsecs_to_jiffies()</title>
<updated>2009-11-26T11:59:20Z</updated>
<author>
<name>Hidetoshi Seto</name>
</author>
<published>2009-11-26T05:49:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7b20df91d43d5e59578b8fc16e895c0c8cbd9b5'/>
<id>urn:sha1:b7b20df91d43d5e59578b8fc16e895c0c8cbd9b5</id>
<content type='text'>
Use of msecs_to_jiffies() for nsecs_to_cputime() have some
problems:

 - The type of msecs_to_jiffies()'s argument is unsigned int, so
   it cannot convert msecs greater than UINT_MAX = about 49.7 days.

 - msecs_to_jiffies() returns MAX_JIFFY_OFFSET if MSB of argument
   is set, assuming that input was negative value.  So it cannot
   convert msecs greater than INT_MAX = about 24.8 days too.

This patch defines a new function nsecs_to_jiffies() that can
deal greater values, and that can deal all incoming values as
unsigned.

Signed-off-by: Hidetoshi Seto &lt;seto.hidetoshi@jp.fujitsu.com&gt;
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Cc: Spencer Candland &lt;spencer@bluehost.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Balbir Singh &lt;balbir@in.ibm.com&gt;
Cc: Amrico Wang &lt;xiyou.wangcong@gmail.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: John Stultz &lt;johnstul@linux.vnet.ibm.com&gt;
LKML-Reference: &lt;4B0E16E7.5070307@jp.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>time: Remove xtime_cache</title>
<updated>2009-10-05T11:52:02Z</updated>
<author>
<name>john stultz</name>
</author>
<published>2009-10-02T23:24:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7bc7d637452383d56ba4368d4336b0dde1bb476d'/>
<id>urn:sha1:7bc7d637452383d56ba4368d4336b0dde1bb476d</id>
<content type='text'>
With the prior logarithmic time accumulation patch, xtime will now
always be within one "tick" of the current time, instead of
possibly half a second off.

This removes the need for the xtime_cache value, which always
stored the time at the last interrupt, so this patch cleans that up
removing the xtime_cache related code.

This is a bit simpler, but still could use some wider testing.

Signed-off-by: John Stultz &lt;johnstul@us.ibm.com&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Clark Williams &lt;williams@redhat.com&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
LKML-Reference: &lt;1254525855.7741.95.camel@localhost.localdomain&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>time: Prevent 32 bit overflow with set_normalized_timespec()</title>
<updated>2009-09-15T08:17:30Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2009-09-14T21:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=12e09337fe238981cb0c87543306e23775d1a143'/>
<id>urn:sha1:12e09337fe238981cb0c87543306e23775d1a143</id>
<content type='text'>
set_normalized_timespec() nsec argument is of type long. The recent
timekeeping changes of ktime_get_ts() feed 

	ts-&gt;tv_nsec + tomono.tv_nsec + nsecs

to set_normalized_timespec(). On 32 bit machines that sum can be
larger than (1 &lt;&lt; 31) and therefor result in a negative value which
screws up the result completely.

Make the nsec argument of set_normalized_timespec() s64 to fix the
problem at hand. This also prevents similar problems for future users
of set_normalized_timespec().

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Carsten Emde &lt;carsten.emde@osadl.org&gt;
LKML-Reference: &lt;new-submission&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: John Stultz &lt;johnstul@us.ibm.com&gt;

</content>
</entry>
<entry>
<title>[CVE-2009-0029] System call wrappers part 01</title>
<updated>2009-01-14T13:15:18Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2009-01-14T13:14:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58fd3aa288939d3097fa04505b25c2f5e6e144d1'/>
<id>urn:sha1:58fd3aa288939d3097fa04505b25c2f5e6e144d1</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>Allow times and time system calls to return small negative values</title>
<updated>2009-01-06T23:59:13Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2009-01-06T22:41:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3d5a27d5862b6425d0879272e24abecf7245105'/>
<id>urn:sha1:e3d5a27d5862b6425d0879272e24abecf7245105</id>
<content type='text'>
At the moment, the times() system call will appear to fail for a period
shortly after boot, while the value it want to return is between -4095 and
-1.  The same thing will also happen for the time() system call on 32-bit
platforms some time in 2106 or so.

On some platforms, such as x86, this is unavoidable because of the system
call ABI, but other platforms such as powerpc have a separate error
indication from the return value, so system calls can in fact return small
negative values without indicating an error.  On those platforms,
force_successful_syscall_return() provides a way to indicate that the
system call return value should not be treated as an error even if it is
in the range which would normally be taken as a negative error number.

This adds a force_successful_syscall_return() call to the time() and
times() system calls plus their 32-bit compat versions, so that they don't
erroneously indicate an error on those platforms whose system call ABI has
a separate error indication.  This will not affect anything on other
platforms.

Joakim Tjernlund added the fix for time() and the compat versions of
time() and times(), after I did the fix for times().

Signed-off-by: Joakim Tjernlund &lt;Joakim.Tjernlund@transmode.se&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&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>select: add a timespec_add_safe() function</title>
<updated>2008-09-06T04:34:57Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2008-08-31T15:09:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df0cc0539b4127bd02f64de2c335b4af1fdb3845'/>
<id>urn:sha1:df0cc0539b4127bd02f64de2c335b4af1fdb3845</id>
<content type='text'>
For the select() rework, it's important to be able to add timespec
structures in an overflow-safe manner.

This patch adds a timespec_add_safe() function for this which is similar in
operation to ktime_add_safe(), but works on a struct timespec.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Make constants in kernel/timeconst.h fixed 64 bits</title>
<updated>2008-05-02T23:18:42Z</updated>
<author>
<name>H. Peter Anvin</name>
</author>
<published>2008-05-02T23:18:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9095fd8a7f41dc7ac0b0b7864f74766a3056f96'/>
<id>urn:sha1:b9095fd8a7f41dc7ac0b0b7864f74766a3056f96</id>
<content type='text'>
Force constants in kernel/timeconst.h (except shift counts) to be 64 bits,
using U64_C() constructor macros, and eliminate constants that cannot
be represented at all in 64 bits.  This avoids warnings with some gcc
versions.

Drop generating 64-bit constants, since we have no real hope of
getting a full set (operation on 64-bit values requires a 128-bit
intermediate result, which gcc only supports on 64-bit platforms, and
only with libgcc support on some.)  Note that the use of these
constants does not depend on if we are on a 32- or 64-bit architecture.

This resolves Bugzilla 10153.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
</entry>
</feed>
