diff options
| author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-09-14 15:19:21 +0200 |
|---|---|---|
| committer | Eduard Zingerman <eddyz87@gmail.com> | 2026-09-17 10:55:55 -0700 |
| commit | a452e729b7be317837bb2157d5d88aa3de9873e6 (patch) | |
| tree | 1e34a68c54b0fa496a5f32c441a9d6c608b9acb6 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 40c2096961b4e8f48d1fc17406a90c5a36ac0a8d (diff) | |
| download | linux-next-a452e729b7be317837bb2157d5d88aa3de9873e6.tar.gz linux-next-a452e729b7be317837bb2157d5d88aa3de9873e6.zip | |
selftests/bpf: Test global subprog callback contexts
Exercise global subprogram verification from workqueue callbacks, which
can run in a sleepable context even when the containing program is not
sleepable. An unprotected callback must not let the global subprogram use
implicit RCU protection inherited from the program.
Add a negative case which loads an RCU-protected task kptr in a global
subprogram reached from a workqueue callback. It fails on an unfixed
kernel because the program is incorrectly accepted. Also cover a
workqueue callback protected by an explicit RCU read-side critical
section, where the same global subprogram remains valid.
Call the same harmless global subprogram directly from the main program
and from an unprotected callback. Mark it __weak __noinline so both calls
survive optimization, and check that its instruction statistics account
for both verification contexts. This also verifies that global calls
from callbacks are not rejected wholesale. Workqueue callbacks return
zero explicitly after the global call, as required by their contract.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://patch.msgid.link/20260914131923.2544250-3-memxor@gmail.com
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
