On Fri, Apr 15, 2022 at 9:30 PM Kui-Feng Lee <kuifeng@xxxxxx> wrote: > > 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@xxxxxx> > --- the overall approach makes sense to me, I'll leave it up to Alexei to validate nitty-gritty details of x86 assembly :) Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > arch/x86/net/bpf_jit_comp.c | 38 +++++++++++++++++++++++++++++++++++++ > include/linux/bpf.h | 17 +++++++++++++---- > kernel/bpf/syscall.c | 7 +++++-- > kernel/bpf/trampoline.c | 20 +++++++++++++++---- > 4 files changed, 72 insertions(+), 10 deletions(-) > [...]