Jason A. Donenfeld
7c77d1f9ba
timekeeping: contribute wall clock to rng on time change
...
commit b8ac29b40183a6038919768b5d189c9bd91ce9b4 upstream.
The rng's random_init() function contributes the real time to the rng at
boot time, so that events can at least start in relation to something
particular in the real world. But this clock might not yet be set that
point in boot, so nothing is contributed. In addition, the relation
between minor clock changes from, say, NTP, and the cycle counter is
potentially useful entropic data.
This commit addresses this by mixing in a time stamp on calls to
settimeofday and adjtimex. No entropy is credited in doing so, so it
doesn't make initialization faster, but it is still useful input to
have.
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-25 11:18:15 +02:00
..
alarmtimer.c
kernel, fs: Introduce and use set_restart_fn() and arch_set_restart_data()
2021-03-24 11:26:44 +01:00
clockevents.c
tick: Remove outgoing CPU from broadcast masks
2019-03-23 18:26:43 +01:00
clocksource.c
clocksource: Retry clock read if long delays detected
2021-07-14 16:53:18 +02:00
hrtimer.c
hrtimer: Ensure timerfd notification for HIGHRES=n
2021-09-15 09:47:26 +02:00
itimer.c
time: Prevent undefined behaviour in timespec64_to_ns()
2020-11-18 19:20:15 +01:00
jiffies.c
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2019-05-06 14:50:46 -07:00
Kconfig
treewide: Add SPDX license identifier - Makefile/Kconfig
2019-05-21 10:50:46 +02:00
Makefile
timekeeping: Provide a generic update_vsyscall() implementation
2019-06-22 21:21:06 +02:00
ntp.c
ntp/y2038: Remove incorrect time_t truncation
2019-11-12 08:13:44 +01:00
ntp_internal.h
ntp: Audit NTP parameters adjustment
2019-04-15 18:14:01 -04:00
posix-clock.c
ptp: fix the race between the release of ptp_clock and cdev
2020-01-04 19:18:48 +01:00
posix-cpu-timers.c
Revert "posix-cpu-timers: Force next expiration recalc after itimer reset"
2021-09-16 12:56:13 +02:00
posix-stubs.c
y2038: syscalls: rename y2038 compat syscalls
2019-02-07 00:13:27 +01:00
posix-timers.c
posix-timers: Preserve return value in clock_adjtime32()
2021-05-11 14:04:04 +02:00
posix-timers.h
posix-timers: Use a callback for cancel synchronization on PREEMPT_RT
2019-08-20 22:05:46 +02:00
sched_clock.c
time/sched_clock: Expire timer in hardirq context
2020-04-17 10:50:02 +02:00
test_udelay.c
tick-broadcast-hrtimer.c
tick: broadcast-hrtimer: Fix a race in bc_set_next
2019-09-27 14:45:55 +02:00
tick-broadcast.c
tick: Fix typos in comments
2019-04-19 19:17:04 +02:00
tick-common.c
tick/common: Touch watchdog in tick_unfreeze() on all CPUs
2020-11-18 19:20:26 +01:00
tick-internal.h
hrtimer: Ensure timerfd notification for HIGHRES=n
2021-09-15 09:47:26 +02:00
tick-oneshot.c
tick-sched.c
tick/nohz: Use WARN_ON_ONCE() to prevent console saturation
2022-04-20 09:19:39 +02:00
tick-sched.h
tick/sched: Update tick_sched struct documentation
2019-03-24 20:29:32 +01:00
time.c
time: Zero the upper 32-bits in __kernel_timespec on 32-bit
2019-12-13 08:42:18 +01:00
timeconst.bc
timeconv.c
timecounter.c
time: Remove license boilerplate
2018-11-23 11:51:21 +01:00
timekeeping.c
timekeeping: contribute wall clock to rng on time change
2022-08-25 11:18:15 +02:00
timekeeping.h
timers/sched_clock: Prevent generic sched_clock wrap caused by tick_freeze()
2019-04-18 14:34:53 +02:00
timekeeping_debug.c
timekeeping/debug: No need to check return value of debugfs_create functions
2019-01-29 20:08:41 +01:00
timekeeping_internal.h
timer.c
timers: Move clearing of base::timer_running under base:: Lock
2021-08-12 13:21:03 +02:00
timer_list.c
timer_list: Guard procfs specific code
2019-06-23 00:08:52 +02:00
vsyscall.c
lib/vdso: Update coarse timekeeper unconditionally
2020-03-05 16:43:49 +01:00