Commit a94bf56d authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Yongzhen Zhang
Browse files

loongarch: Provide noinstr sched_clock_read()

mainline inclusion
from mainline-v6.5-rc1
commit 6b10fef0
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MWTU


CVE: NA

--------------------------------

With the intent to provide local_clock_noinstr(), a variant of
local_clock() that's safe to be called from noinstr code (with the
assumption that any such code will already be non-preemptible),
prepare for things by providing a noinstr sched_clock_read() function.

Specifically, preempt_enable_*() calls out to schedule(), which upsets
noinstr validation efforts.

Signed-off-by: default avatarYongzhen Zhang <zhangyongzhen@kylinos.cn>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mikelley@microsoft.com>  # Hyper-V
Link: https://lore.kernel.org/r/20230519102715.502547082@infradead.org
parent e5228575
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment