Message ID | 20250318143318.656785-8-aspsk@isovalent.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | BPF |
Headers | show |
Series | instruction sets and static keys | expand |
Context | Check | Description |
---|---|---|
bpf/vmtest-bpf-next-VM_Test-0 | success | Logs for Lint |
bpf/vmtest-bpf-next-VM_Test-1 | success | Logs for ShellCheck |
bpf/vmtest-bpf-next-VM_Test-2 | success | Logs for Unittests |
bpf/vmtest-bpf-next-VM_Test-3 | success | Logs for Validate matrix.py |
bpf/vmtest-bpf-next-PR | fail | PR summary |
bpf/vmtest-bpf-next-VM_Test-6 | success | Logs for aarch64-gcc / build-release |
bpf/vmtest-bpf-next-VM_Test-7 | success | Logs for aarch64-gcc / veristat-kernel |
bpf/vmtest-bpf-next-VM_Test-8 | success | Logs for aarch64-gcc / veristat-meta |
bpf/vmtest-bpf-next-VM_Test-9 | success | Logs for s390x-gcc / GCC BPF |
bpf/vmtest-bpf-next-VM_Test-10 | fail | Logs for s390x-gcc / build / build for s390x with gcc |
bpf/vmtest-bpf-next-VM_Test-11 | success | Logs for s390x-gcc / build-release |
bpf/vmtest-bpf-next-VM_Test-12 | success | Logs for s390x-gcc / veristat-kernel |
bpf/vmtest-bpf-next-VM_Test-5 | fail | Logs for aarch64-gcc / build / build for aarch64 with gcc |
bpf/vmtest-bpf-next-VM_Test-13 | success | Logs for s390x-gcc / veristat-meta |
bpf/vmtest-bpf-next-VM_Test-4 | success | Logs for aarch64-gcc / GCC BPF |
bpf/vmtest-bpf-next-VM_Test-14 | success | Logs for set-matrix |
bpf/vmtest-bpf-next-VM_Test-15 | success | Logs for test |
bpf/vmtest-bpf-next-VM_Test-16 | success | Logs for test |
bpf/vmtest-bpf-next-VM_Test-17 | success | Logs for test |
bpf/vmtest-bpf-next-VM_Test-18 | success | Logs for test |
bpf/vmtest-bpf-next-VM_Test-19 | success | Logs for test |
bpf/vmtest-bpf-next-VM_Test-20 | success | Logs for x86_64-gcc / GCC BPF |
bpf/vmtest-bpf-next-VM_Test-21 | fail | Logs for x86_64-gcc / build / build for x86_64 with gcc |
bpf/vmtest-bpf-next-VM_Test-22 | success | Logs for x86_64-gcc / build-release |
bpf/vmtest-bpf-next-VM_Test-23 | success | Logs for x86_64-gcc / veristat-kernel |
bpf/vmtest-bpf-next-VM_Test-24 | success | Logs for x86_64-gcc / veristat-meta |
bpf/vmtest-bpf-next-VM_Test-25 | success | Logs for x86_64-llvm-17 / GCC BPF |
bpf/vmtest-bpf-next-VM_Test-26 | fail | Logs for x86_64-llvm-17 / build / build for x86_64 with llvm-17 |
bpf/vmtest-bpf-next-VM_Test-27 | fail | Logs for x86_64-llvm-17 / build-release / build for x86_64 with llvm-17-O2 |
bpf/vmtest-bpf-next-VM_Test-28 | success | Logs for x86_64-llvm-17 / veristat-kernel |
bpf/vmtest-bpf-next-VM_Test-29 | success | Logs for x86_64-llvm-17 / veristat-meta |
bpf/vmtest-bpf-next-VM_Test-30 | success | Logs for x86_64-llvm-18 / GCC BPF |
bpf/vmtest-bpf-next-VM_Test-31 | fail | Logs for x86_64-llvm-18 / build / build for x86_64 with llvm-18 |
bpf/vmtest-bpf-next-VM_Test-32 | fail | Logs for x86_64-llvm-18 / build-release / build for x86_64 with llvm-18-O2 |
bpf/vmtest-bpf-next-VM_Test-33 | success | Logs for x86_64-llvm-18 / veristat-kernel |
bpf/vmtest-bpf-next-VM_Test-34 | success | Logs for x86_64-llvm-18 / veristat-meta |
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 42ddd2b61866..fb0910083b79 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -1524,6 +1524,7 @@ struct bpf_prog_aux { u32 ctx_arg_info_size; u32 max_rdonly_access; u32 max_rdwr_access; + u32 subprog_start; struct btf *attach_btf; struct bpf_ctx_arg_aux *ctx_arg_info; void __percpu *priv_stack_ptr; diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 0860ef57d5af..7f66002071ed 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -20999,6 +20999,7 @@ static int jit_subprogs(struct bpf_verifier_env *env) func[i]->aux->func_idx = i; /* Below members will be freed only at prog->aux */ func[i]->aux->btf = prog->aux->btf; + func[i]->aux->subprog_start = subprog_start; func[i]->aux->func_info = prog->aux->func_info; func[i]->aux->func_info_cnt = prog->aux->func_info_cnt; func[i]->aux->poke_tab = prog->aux->poke_tab;
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 <aspsk@isovalent.com> --- include/linux/bpf.h | 1 + kernel/bpf/verifier.c | 1 + 2 files changed, 2 insertions(+)