The following two selftest cases triggers oops on LoongArch: $ ./test_progs -a ns_bpf_qdisc -a tracing_struct This series tries to fix/workaround these issues. See individual commit for details. v3 -> v4: * Completely rework of previous version * Fix more subtle issues Hengqi Chen (8): LoongArch: BPF: Remove duplicated flags check LoongArch: BPF: Remove duplicated bpf_flush_icache() LoongArch: BPF: No support of struct argument in trampoline programs LoongArch: BPF: No text_poke() for kernel text LoongArch: BPF: Don't assume trampoline size is page aligned LoongArch: BPF: Make trampoline size stable LoongArch: BPF: Make error handling robust in arch_prepare_bpf_trampoline() LoongArch: BPF: Sign extend struct ops return values properly arch/loongarch/net/bpf_jit.c | 67 +++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 16 deletions(-) -- 2.43.5