The following two selftest cases triggers oops on LoongArch: $ ./test_progs -a ns_bpf_qdisc -a tracing_struct This small series tries to fix/workaround these issues. See individual commit for details. While at it, remove a duplicated flags check in __arch_prepare_bpf_trampoline(). v1 -> v2: * collect Acked-by/Tested-by tags * update sign_extend() in patch 2 as suggested by Huacai Hengqi Chen (3): LoongArch: BPF: Remove duplicated flags check LoongArch: BPF: Sign extend struct ops return values properly LoongArch: BPF: No support of struct argument in trampoline programs arch/loongarch/net/bpf_jit.c | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) -- 2.43.5