]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
LoongArch: BPF: Add fsession support for trampolines
authorHengqi Chen <hengqi.chen@gmail.com>
Thu, 23 Apr 2026 04:49:36 +0000 (12:49 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 23 Apr 2026 04:49:36 +0000 (12:49 +0800)
commite815df29b6a5e59293500085a010d5882374cb3e
treebdeb7066709bd9621f902740b865a9211c8ed037
parent6ef04707e8eee09360f70812c0ac63c712460bd0
LoongArch: BPF: Add fsession support for trampolines

Implement BPF_TRACE_FSESSION support in LoongArch BPF JIT. The logic
here is almost identical to what has been done in RISC-V JIT.

The key changes are:
  - Allocate stack space for function meta and session cookies
  - Introduce invoke_bpf() as a wrapper around invoke_bpf_prog() that
    populates session cookies before each invocation
  - Implement bpf_jit_supports_fsession() callback

Tested-by: Vincent Li <vincent.mc.li@gmail.com>
Reviewed-by: Menglong Dong <menglong8.dong@gmail.com>
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/net/bpf_jit.c