]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, x86: Create bpf_tramp_run_ctx on the caller thread's stack
authorKui-Feng Lee <kuifeng@fb.com>
Tue, 10 May 2022 20:59:20 +0000 (13:59 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 11 May 2022 00:50:51 +0000 (17:50 -0700)
commit2090565d8e6647b9d60d6f173bacf0d53c2be2c3
treee8d33e6dd2ab53ecff083f843e677a5cabaf6656
parent68bb64c22631484d9f78a199a4db869a3642fbd0
bpf, x86: Create bpf_tramp_run_ctx on the caller thread's stack

BPF trampolines will create a bpf_tramp_run_ctx, a bpf_run_ctx, on
stacks and set/reset the current bpf_run_ctx before/after calling a
bpf_prog.

Signed-off-by: Kui-Feng Lee <kuifeng@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220510205923.3206889-3-kuifeng@fb.com
arch/x86/net/bpf_jit_comp.c
include/linux/bpf.h
kernel/bpf/syscall.c
kernel/bpf/trampoline.c