summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2026-09-03 23:47:51 +0200
committerAlexei Starovoitov <ast@kernel.org>2026-09-03 19:22:52 -0700
commit9d02927fdf4e930893c92e35fed01a2704496900 (patch)
tree019068093403c54409431c74c90bbb268966c61d /scripts
parent687b2729ce4c90a3cec76db85d3649e8f5086f85 (diff)
downloadlinux-9d02927fdf4e930893c92e35fed01a2704496900.tar.gz
linux-9d02927fdf4e930893c92e35fed01a2704496900.zip
bpf: Mark faultable stack helpers as sleepable
The faultable variants of bpf_get_stack() and bpf_get_task_stack() pass may_fault=true into the common stack collection code. Resolving user-space build IDs may then call build_id_parse_file() and block on filesystem reads. Neither helper prototype sets might_sleep. Since prototype selection uses the sleepability of the whole program, the verifier can still allow these helpers from a non-sleepable region within that program, such as an explicit RCU or preemption-disabled region. The task-stack helper can also be called from a non-sleepable timer callback of a sleepable program. Mark both faultable prototypes as sleepable. The existing helper context check then rejects these calls while continuing to allow them in genuinely sleepable contexts. Fixes: d4dd9775ec24 ("bpf: wire up sleepable bpf_get_stack() and bpf_get_task_stack() helpers") Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20260903214758.2727663-6-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions