<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/kernel/time, branch master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/kernel/time?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/kernel/time?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2026-11-01T17:19:12Z</updated>
<entry>
<title>Merge tag 'timers-urgent-2026-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2026-11-01T17:19:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-11-01T17:19:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=7a3d2740d1b1b5ed8d22e1e5430de3b5046cf6a9'/>
<id>urn:sha1:7a3d2740d1b1b5ed8d22e1e5430de3b5046cf6a9</id>
<content type='text'>
Pull timer fixes from Ingo Molnar:

 - Fix on-stack hrtimer cleanup in play_idle_precise(), and
   add the hrtimer_on_stack cleanup class to facilitate the fix
   (Hui Su)

 - Fix clock_getres() system call's handling of NULL output
   pointer in the !CONFIG_POSIX_TIMERS case (Hungyu Lin)

 - Fix get_cpu_itimer() to return TICK_NSEC when the sampled CPU time
   is exactly equal to the nonzero expiry (Hungyu Lin)

 - Fix do_timens_ktime_to_host() time offset subtraction underflow
   check (Hungyu Lin)

 - Report zero remaining time for disarmed SIGEV_NONE posix timers,
   and add a self-test to detect this bug in the future (Hung-Jui Lin)

 - Fix NOHZ 'full kick' handling bug that can cause missed
   tick updates (Peng Wang)

 - Fix field access bug in the vdso/gettimeofday code that works
   only by accident (Thomas Weißschuh)

 - Fix &amp; prevent immediate clocksource watchdog rerun after a delay
   (Karl Mehltretter)

* tag 'timers-urgent-2026-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: Prevent immediate watchdog rerun after a delay
  vdso/gettimeofday: Correct the read of tz_minuteswest and tz_dsttime
  tick/nohz: Reevaluate the tick for kicks flushed outside hardirq
  selftests: timers: Add a test for disarmed SIGEV_NONE timers
  posix-timers: Report zero remaining time for disarmed SIGEV_NONE timers
  time/namespace: Fix overflow when converting absolute deadlines
  timers/itimer: Keep a nonzero value at CPU timer expiry
  posix-timers: Accept NULL clock_getres() output in stubs
  sched/idle: Use hrtimer cleanup class in play_idle_precise()
  hrtimer: Add cleanup class for on-stack timers
</content>
</entry>
<entry>
<title>clocksource: Prevent immediate watchdog rerun after a delay</title>
<updated>2026-10-27T20:26:16Z</updated>
<author>
<name>Karl Mehltretter</name>
<email>kmehltretter@gmail.com</email>
</author>
<published>2026-10-26T01:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=f322d7f7ae56bce728ba03a387e35380bc4ad939'/>
<id>urn:sha1:f322d7f7ae56bce728ba03a387e35380bc4ad939</id>
<content type='text'>
The watchdog rewrite made the clocksource check handle long intervals
between two measurements, but missed that the timer expiry needs to be
rebased after such a delay.

When a watchdog invocation is delayed by more than one interval, adding
WATCHDOG_INTERVAL to the previous expiry leaves the timer expiry in the
past. That causes an immediate second invocation. The resulting short
measurement interval can mark a clocksource unstable.

Cure this by rearming the timer based on jiffies, which places the next
expiry one full watchdog interval into the future.

Fixes: 763aacf86f1b ("clocksource: Rewrite watchdog code completely")
Signed-off-by: Karl Mehltretter &lt;kmehltretter@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261026010200.96371-1-kmehltretter@gmail.com
Closes: https://lore.kernel.org/r/20261010065509.72916-1-kmehltretter@gmail.com/
</content>
</entry>
<entry>
<title>Merge tag 'timers-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2026-10-26T03:54:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-26T03:54:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=ed2bc044a7c8c9759bbe1165b8e487d07dd53b73'/>
<id>urn:sha1:ed2bc044a7c8c9759bbe1165b8e487d07dd53b73</id>
<content type='text'>
Pull timer fixes from Ingo Molnar:

 - Clear timer_base::pending_map on CPU hot-unplug, that can
   cause temporal timeout processing anomalous on the next
   hot-replug (Liang Hao)

 - Fix PID refcount leak in the posix-cpu-timers do_cpu_nanosleep()
   signal path (Cen Zhang)

 - Require (CAP_SYS_TIME) permission to set auxiliary clocks
   via aux_clock_set() (Daehyeon Ko)

 - Update offsets on sequence counter retry in
   ktime_get_update_offsets_now() (Thomas Weißschuh)

* tag 'timers-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Update offsets on sequence counter retry in ktime_get_update_offsets_now()
  timekeeping: Require permission to set auxiliary clocks
  posix-cpu-timers: Fix pid refcount leak in do_cpu_nanosleep() signal path
  timers: Clear pending_map on CPU hotplug
</content>
</entry>
<entry>
<title>tick/nohz: Reevaluate the tick for kicks flushed outside hardirq</title>
<updated>2026-10-25T21:43:19Z</updated>
<author>
<name>Peng Wang</name>
<email>peng_wang@linux.alibaba.com</email>
</author>
<published>2026-10-23T14:51:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=e389ae428847a2e6a3b698b5967df68ccf90361c'/>
<id>urn:sha1:e389ae428847a2e6a3b698b5967df68ccf90361c</id>
<content type='text'>
The nohz full kick relies on interrupt exit to reevaluate the
tick. However, a remote kick can also be flushed from task context without
an interrupt exit guaranteed to follow. If a tick dependency is set or an
earlier timer is queued after the idle-exit reevaluation, the required tick
update can be delayed until another interrupt.

Reevaluate the tick directly from the callback outside hardirq context.
Keep the existing interrupt exit handling for hardirq callbacks. The
offline flush remains harmless because tick_sched_timer_dying() has already
cleared TS_FLAG_NOHZ.

Fixes: 4b44a21dd640 ("irq_work, smp: Allow irq_work on call_single_queue")
Fixes: a5183862e76f ("tick/nohz: Conditionally restart tick on idle exit")
Suggested-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Co-developed-by: He Rongguang &lt;herongguang@linux.alibaba.com&gt;
Signed-off-by: He Rongguang &lt;herongguang@linux.alibaba.com&gt;
Signed-off-by: Peng Wang &lt;peng_wang@linux.alibaba.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Reviewed-by: Frederic Weisbecker &lt;frederic@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261023145101.8217-1-peng_wang@linux.alibaba.com
</content>
</entry>
<entry>
<title>posix-timers: Report zero remaining time for disarmed SIGEV_NONE timers</title>
<updated>2026-10-25T21:43:19Z</updated>
<author>
<name>Hung-Jui Lin</name>
<email>alex.lin.programmer@gmail.com</email>
</author>
<published>2026-10-23T15:14:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=141a27750ec3d91ad9d1ad1764ebb5e51b963478'/>
<id>urn:sha1:141a27750ec3d91ad9d1ad1764ebb5e51b963478</id>
<content type='text'>
SIGEV_NONE timers are never queued. common_timer_get() emulates their
expiry by computing the remaining time from the stored expiry value.
Because an armed SIGEV_NONE oneshot timer is not queued, its it_status
stays POSIX_TIMER_DISARMED. So common_timer_get() cannot use it_status to
skip a disarmed SIGEV_NONE timer and evaluates the stored expiry value for
all SIGEV_NONE timers.

Disarming a timer with timer_settime() and a zero it_value cancels the
timer and sets it_status to POSIX_TIMER_DISARMED, but leaves the expiry
value unchanged. As a consequence, timer_gettime() on a disarmed SIGEV_NONE
timer reports the remaining time of the previous arming until that time has
passed, instead of zero as POSIX requires for a disarmed timer. Example
with a CLOCK_MONOTONIC timer armed with it_value = 10ms and it_interval =
100ms, then disarmed with an all-zero itimerspec:

  armed:    it_value = 0.009999000  it_interval = 0.100000000
  disarmed: it_value = 0.008700792  it_interval = 0.000000000

SIGEV_SIGNAL timers and SIGEV_NONE CPU timers report zero in the same
situation. All clocks which use common_timer_get() are affected, including
the alarm timer clocks.

Mark SIGEV_NONE timers as POSIX_TIMER_ARMED when they are armed, so that
common_timer_get() returns early for every disarmed timer. Forward
SIGEV_NONE interval timers in common_timer_get() regardless of it_status,
as they are never queued and therefore never forwarded by the expiry code.

After the change the disarmed timer above reports zero. Armed SIGEV_NONE
oneshot and interval timers on CLOCK_MONOTONIC, CLOCK_REALTIME,
CLOCK_BOOTTIME and CLOCK_BOOTTIME_ALARM still report their remaining time,
and the posix_timers selftest passes.

Fixes: becf8b5d00f4 ("[PATCH] hrtimer: convert posix timers completely")
Signed-off-by: Hung-Jui Lin &lt;alex.lin.programmer@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261023151411.28685-1-alex.lin.programmer@gmail.com
</content>
</entry>
<entry>
<title>time/namespace: Fix overflow when converting absolute deadlines</title>
<updated>2026-10-25T21:43:19Z</updated>
<author>
<name>Hungyu Lin</name>
<email>dennylin0707@gmail.com</email>
</author>
<published>2026-10-20T23:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=d69cfd33b5a8d176124c564513b9ceb933595d93'/>
<id>urn:sha1:d69cfd33b5a8d176124c564513b9ceb933595d93</id>
<content type='text'>
do_timens_ktime_to_host() subtracts the namespace offset from an absolute
deadline and clamps the result to [0, KTIME_MAX]. A negative offset can
make a large deadline overflow to a negative value. Since ktime_t is
signed and KTIME_MAX is its maximum value, the subsequent comparison
against KTIME_MAX can never detect this overflow.

For example, with a -1 second boottime offset, an absolute CLOCK_BOOTTIME
timerfd deadline of KTIME_MAX can expire immediately. An absolute
clock_nanosleep() using the same clock and deadline can also return
immediately instead of waiting.

The earlier tim &lt; offset check already handles the lower bound. A
negative subtraction result in the remaining branch therefore indicates
overflow. Detect that result and clamp it to KTIME_MAX.

Fixes: 89dd8eecfe961 ("time: Add do_timens_ktime_to_host() helper")
Signed-off-by: Hungyu Lin &lt;dennylin0707@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261020233433.20997-1-dennylin0707@gmail.com
</content>
</entry>
<entry>
<title>timers/itimer: Keep a nonzero value at CPU timer expiry</title>
<updated>2026-10-25T21:43:19Z</updated>
<author>
<name>Hungyu Lin</name>
<email>dennylin0707@gmail.com</email>
</author>
<published>2026-10-20T22:39:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=ef60f61208a30eb5b941b707debdf04517271b4f'/>
<id>urn:sha1:ef60f61208a30eb5b941b707debdf04517271b4f</id>
<content type='text'>
get_cpu_itimer() returns a zero remaining time when the sampled CPU time
is exactly equal to the nonzero expiry. This makes an armed ITIMER_VIRTUAL
or ITIMER_PROF timer appear disarmed.

The cputime cleanup replaced cputime_le(), which implements &lt;=, with &lt;.
Restore the inclusive comparison so the equality case returns TICK_NSEC,
like the overdue case and set_process_cpu_timer().

Fixes: 648616343cdb ("[S390] cputime: add sparse checking and cleanup")
Signed-off-by: Hungyu Lin &lt;dennylin0707@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261020223957.87842-1-dennylin0707@gmail.com
</content>
</entry>
<entry>
<title>posix-timers: Accept NULL clock_getres() output in stubs</title>
<updated>2026-10-25T21:43:19Z</updated>
<author>
<name>Hungyu Lin</name>
<email>dennylin0707@gmail.com</email>
</author>
<published>2026-10-20T16:11:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=5b819071e4346256c4edbae5cc2095dff25694fc'/>
<id>urn:sha1:5b819071e4346256c4edbae5cc2095dff25694fc</id>
<content type='text'>
With CONFIG_POSIX_TIMERS disabled, clock_getres() returns -EFAULT for a
supported clock when the result pointer is NULL. POSIX permits a NULL
result pointer to suppress returning the clock resolution.

Only copy the result when a destination is provided, in both the native
and time32 stubs. This matches the full POSIX timer implementation and
preserves clock ID validation.

Fixes: baa73d9e478f ("posix-timers: Make them configurable")
Fixes: d822cdcce43f ("posix-timers: Move compat versions of clock_gettime/settime/getres")
Signed-off-by: Hungyu Lin &lt;dennylin0707@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261020161121.85042-1-dennylin0707@gmail.com
</content>
</entry>
<entry>
<title>hrtimer: Add cleanup class for on-stack timers</title>
<updated>2026-10-25T21:43:19Z</updated>
<author>
<name>Hui Su</name>
<email>sh_def@163.com</email>
</author>
<published>2026-10-16T01:09:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=064bcd117e8a1a266bb92b840f63862999b7cb87'/>
<id>urn:sha1:064bcd117e8a1a266bb92b840f63862999b7cb87</id>
<content type='text'>
hrtimer_setup_on_stack() requires callers to destroy the timer before its
backing stack storage goes out of scope, but the setup interface does not
encode the required teardown pairing.

Add an hrtimer_on_stack cleanup class that pairs on-stack setup with
destroy_hrtimer_on_stack(). Document the existing setup API's lifetime
requirement.

The cleanup class provides debug-object teardown, not timer
cancellation. Callers must ensure that no hrtimer operation can still
access the timer before the scope ends; in particular, the timer must
no longer be queued and any running callback must have completed.

Signed-off-by: Hui Su &lt;sh_def@163.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Link: https://patch.msgid.link/5f48c32490d19f51035e4209174f9cfe44472c71.1792083743.git.sh_def@163.com
</content>
</entry>
<entry>
<title>timekeeping: Update offsets on sequence counter retry in ktime_get_update_offsets_now()</title>
<updated>2026-10-23T19:52:01Z</updated>
<author>
<name>Thomas Weißschuh (Schneider Electric)</name>
<email>thomas.weissschuh@linutronix.de</email>
</author>
<published>2026-10-23T11:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=6541fbc942f3b63bb8bd44e34eee6223e0abe719'/>
<id>urn:sha1:6541fbc942f3b63bb8bd44e34eee6223e0abe719</id>
<content type='text'>
The sequence counter of the cwsseq target is modified during the
sequence counter loop. If the loop retries, cwsseq will now match
but the offsets contain the values from the previous loop iteration.
These are not guaranteed to be consistent in themselves or with the
current loops "now.

Save the target's original sequence counter value so that the update
also happens on loop retries.

Fixes: 868a3e915f7f ("hrtimer: Make offset update smarter")
Signed-off-by: Thomas Weißschuh (Schneider Electric) &lt;thomas.weissschuh@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@kernel.org&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261023-timekeeping-clock_was_set_seq-v1-1-61c4c53d031c@linutronix.de
</content>
</entry>
</feed>
