summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2026-04-22 10:45:34 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2026-04-22 10:45:34 +0300
commit0ef8b96051555aaded204c9e65edbd3656d9613f (patch)
treea022be92054b90a25165b1d2edc65f0629842272 /scripts
parent4653682c6f6559e3209586f7bb30183f36375f00 (diff)
downloadlinux-0ef8b96051555aaded204c9e65edbd3656d9613f.tar.xz
LoongArch: BPF: Support small struct arguments for trampoline
In the current BPF code, the struct argument size is at most 16 bytes, enforced by the verifier. According to the Procedure Call Standard for LoongArch, the struct argument size below 16 bytes are provided as part of the 8 argument registers, that is to say, the struct argument may be passed in a pair of registers if its size is more than 8 bytes and no more than 16 bytes. Extend the BPF trampoline JIT to support attachment to functions that take small structures (up to 16 bytes) as argument, save and restore a number of "argument registers" rather than a number of arguments. With this patch, the following related testcases passed: sudo ./test_progs -a tracing_struct/struct_args sudo ./test_progs -a tracing_struct/union_args Link: https://github.com/loongson/la-abi-specs/blob/release/lapcs.adoc#structures Acked-by: Hengqi Chen <hengqi.chen@gmail.com> Tested-by: Hengqi Chen <hengqi.chen@gmail.com> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions