diff options
| author | Mykyta Yatsenko <yatsenko@meta.com> | 2026-04-22 22:41:07 +0300 |
|---|---|---|
| committer | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-04-22 23:44:29 +0300 |
| commit | 12628ffaf98b708a80857a462613119b9e16de4c (patch) | |
| tree | b6acea7b01aa97f3ad2fff7c87fea51d586bb08e /include/linux/execmem.h | |
| parent | 439ebd5b5708f236f7a4a9784194f7ecb77cd814 (diff) | |
| download | linux-12628ffaf98b708a80857a462613119b9e16de4c.tar.xz | |
bpf: Add bpf_prog_run_array_sleepable()
Add bpf_prog_run_array_sleepable() for running BPF program arrays
on faultable tracepoints. Unlike bpf_prog_run_array_uprobe(), it
includes per-program recursion checking for private stack safety
and hardcodes is_uprobe to false.
Skip dummy_bpf_prog at the top of the loop. When
bpf_prog_array_delete_safe() replaces a detached program with
dummy_bpf_prog on allocation failure, the dummy is statically
allocated and has NULL active, stats, and aux fields. Identify
it by prog->len == 0, since every real program has at least one
instruction.
Keep bpf_prog_run_array_uprobe() unchanged for uprobe callers.
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/20260422-sleepable_tracepoints-v13-2-99005dff21ef@meta.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'include/linux/execmem.h')
0 files changed, 0 insertions, 0 deletions
