diff options
| author | Sebastian Andrzej Siewior <[email protected]> | 2025-01-08 09:04:50 +0000 |
|---|---|---|
| committer | Petr Pavlu <[email protected]> | 2025-03-10 10:54:45 +0000 |
| commit | e151955bacf881e1f918613558e04f2f976169e4 (patch) | |
| tree | 61ad84173aa5c23a24d676902ba19bb2281b82e7 /lib/timerqueue.c | |
| parent | powerpc/ftrace: Use RCU in all users of __module_text_address(). (diff) | |
| download | kernel-e151955bacf881e1f918613558e04f2f976169e4.tar.gz kernel-e151955bacf881e1f918613558e04f2f976169e4.zip | |
cfi: Use RCU while invoking __module_address().
__module_address() can be invoked within a RCU section, there is no
requirement to have preemption disabled.
The _notrace() variant was introduced in commit 14c4c8e41511a ("cfi: Use
rcu_read_{un}lock_sched_notrace"). The recursive case where
__cfi_slowpath_diag() could end up calling itself is no longer present,
as all that logic is gone since commit 89245600941e ("cfi: Switch to
-fsanitize=kcfi").
Sami Tolvanen said that KCFI checks don't perform function calls.
Elliot Berman verified it with
| modprobe -a dummy_stm stm_ftrace stm_p_basic
| mkdir -p /sys/kernel/config/stp-policy/dummy_stm.0.my-policy/default
| echo function > /sys/kernel/tracing/current_tracer
| echo 1 > /sys/kernel/tracing/tracing_on
| echo dummy_stm.0 > /sys/class/stm_source/ftrace/stm_source_link
Replace the rcu_read_lock_sched_notrace() section around
__module_address() with RCU.
Cc: Elliot Berman <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Sami Tolvanen <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: [email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: Elliot Berman <[email protected]> # sm8650-qrd [1]
Link: https://lore.kernel.org/all/[email protected] [1]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Petr Pavlu <[email protected]>
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions
