summaryrefslogtreecommitdiffstats
path: root/kernel/bpf
diff options
context:
space:
mode:
authorKui-Feng Lee <thinker.li@gmail.com>2024-02-09 03:37:47 +0100
committerMartin KaFai Lau <martin.lau@kernel.org>2024-02-14 00:16:44 +0100
commit77c0208e199ccb0986fb3612f2409c8cdcb036ad (patch)
treef8b3520a1efab15f6e766f7f559887c2964606f5 /kernel/bpf
parentbpf, docs: Update ISA document title (diff)
downloadlinux-77c0208e199ccb0986fb3612f2409c8cdcb036ad.tar.xz
linux-77c0208e199ccb0986fb3612f2409c8cdcb036ad.zip
bpf: add btf pointer to struct bpf_ctx_arg_aux.
Enable the providers to use types defined in a module instead of in the kernel (btf_vmlinux). Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com> Link: https://lore.kernel.org/r/20240209023750.1153905-2-thinker.li@gmail.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'kernel/bpf')
-rw-r--r--kernel/bpf/btf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 8e06d29961f1..cf100b5573ca 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -6266,7 +6266,7 @@ bool btf_ctx_access(int off, int size, enum bpf_access_type type,
}
info->reg_type = ctx_arg_info->reg_type;
- info->btf = btf_vmlinux;
+ info->btf = ctx_arg_info->btf ? : btf_vmlinux;
info->btf_id = ctx_arg_info->btf_id;
return true;
}