[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8735hnhz1q.ffs@tglx>
Date: Fri, 06 May 2022 09:59:13 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: kernel test robot <oliver.sang@...el.com>,
"Jason A. Donenfeld" <Jason@...c4.com>
Cc: 0day robot <lkp@...el.com>, Arnd Bergmann <arnd@...db.de>,
Theodore Ts'o <tytso@....edu>,
LKML <linux-kernel@...r.kernel.org>, lkp@...ts.01.org,
linux-crypto@...r.kernel.org, nathan@...nel.org,
"Jason A. Donenfeld" <Jason@...c4.com>
Subject: Re: [timekeeping] 3aeaac747d: PANIC:early_exception
On Fri, May 06 2022 at 11:20, kernel test robot wrote:
> PANIC: early exception 0x0d IP 10:ffffffff812cef11 error 0 cr2 0xffff888004a3aff8
> [ 0.000000][ T0] add_device_randomness (kbuild/src/rand-3/drivers/char/random.c:1028)
> [ 0.000000][ T0] ? dmi_walk_early (kbuild/src/rand-3/drivers/firmware/dmi_scan.c:470)
> [ 0.000000][ T0] dmi_walk_early (kbuild/src/rand-3/drivers/firmware/dmi_scan.c:151)
> [ 0.000000][ T0] dmi_present (kbuild/src/rand-3/drivers/firmware/dmi_scan.c:605)
Duh.
So this wants to be:
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -2380,6 +2381,20 @@ static int timekeeping_validate_timex(co
return 0;
}
+/**
+ * random_get_entropy_fallback - Returns the raw clock source value,
+ * used by random.c for platforms with no valid random_get_entropy().
+ */
+unsigned long random_get_entropy_fallback(void)
+{
+ struct tk_read_base *tkr = &tk_core.timekeeper.tkr_mono;
+ struct clocksource *clock = READ_ONCE(tkr->clock);
+
+ if (!timekeeping_suspended && clock)
+ return clock->read(clock);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(random_get_entropy_fallback);
/**
* do_adjtimex() - Accessor function to NTP __do_adjtimex function
Powered by blists - more mailing lists