Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf: save the start of functions in bpf_prog_aux

Introduce a new subprog_start field in bpf_prog_aux. This field may
be used by JIT compilers wanting to know the real absolute xlated
offset of the function being jitted. The func_info[func_id] may have
served this purpose, but func_info may be NULL, so JIT compilers
can't rely on it.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20251019202145.3944697-3-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Anton Protopopov and committed by
Alexei Starovoitov
f7d72d0b 6ea5fc92

+2
+1
include/linux/bpf.h
··· 1623 1623 u32 ctx_arg_info_size; 1624 1624 u32 max_rdonly_access; 1625 1625 u32 max_rdwr_access; 1626 + u32 subprog_start; 1626 1627 struct btf *attach_btf; 1627 1628 struct bpf_ctx_arg_aux *ctx_arg_info; 1628 1629 void __percpu *priv_stack_ptr;
+1
kernel/bpf/verifier.c
··· 21607 21607 func[i]->aux->func_idx = i; 21608 21608 /* Below members will be freed only at prog->aux */ 21609 21609 func[i]->aux->btf = prog->aux->btf; 21610 + func[i]->aux->subprog_start = subprog_start; 21610 21611 func[i]->aux->func_info = prog->aux->func_info; 21611 21612 func[i]->aux->func_info_cnt = prog->aux->func_info_cnt; 21612 21613 func[i]->aux->poke_tab = prog->aux->poke_tab;