diff options
| author | 2026-08-05 16:39:33 -0700 | |
|---|---|---|
| committer | 2026-08-06 15:46:43 +0200 | |
| commit | d65739bf93be5160c1e0af00064874bbe262d5b6 (patch) | |
| tree | aba6421ef0054537a2d66515aefb898148cb4b30 /scripts/Makefile.thinlto | |
| parent | Merge branch 'bpf-allow-selected-kfuncs-under-bpf_spin_lock' (diff) | |
bpf: Account for preempt and IRQ state in RCU protection
Disabling preemption or local IRQs keeps the current CPU in an RCU
read-side critical section, but in_rcu_cs() does not account for either
state. The verifier therefore rejects safe kptr accesses and invalidates
pointers when another RCU source ends.
Include preemption-disabled and IRQ-disabled state in in_rcu_cs().
Invalidate RCU-protected pointers on RCU unlock, preempt enable, or IRQ
restore only after the final protection ends.
Signed-off-by: Ning Ding <dingning04@gmail.com>
Link: https://lore.kernel.org/bpf/20260805233940.3966981-2-dingning04@gmail.com
[ kkd: Simplify was_in_rcu_cs on spin unlock and adjust the selftest. ]
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
