aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpi-mul.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2024-08-02 08:46:17 -0700
committerThomas Gleixner <tglx@linutronix.de>2024-08-02 18:37:13 +0200
commit4ac1dd3245b9067f929ab30141bb0475e9e32fc5 (patch)
treeed88e578ab43ce539cd5dac73b5f81953b6d792e /lib/crypto/mpi/mpi-mul.c
parentf33a5d4bd9c2e545857b2cf7481eb721bcab867c (diff)
clocksource: Set cs_watchdog_read() checks based on .uncertainty_margin
Right now, cs_watchdog_read() does clocksource sanity checks based on WATCHDOG_MAX_SKEW, which sets a floor on any clocksource's .uncertainty_margin. These sanity checks can therefore act inappropriately for clocksources with large uncertainty margins. One reason for a clocksource to have a large .uncertainty_margin is when that clocksource has long read-out latency, given that it does not make sense for the .uncertainty_margin to be smaller than the read-out latency. With the current checks, cs_watchdog_read() could reject all normal reads from a clocksource with long read-out latencies, such as those from legacy clocksources that are no longer implemented in hardware. Therefore, recast the cs_watchdog_read() checks in terms of the .uncertainty_margin values of the clocksources involved in the timespan in question. The first covers two watchdog reads and one cs read, so use twice the watchdog .uncertainty_margin plus that of the cs. The second covers only a pair of watchdog reads, so use twice the watchdog .uncertainty_margin. Reported-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20240802154618.4149953-4-paulmck@kernel.org
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions