aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorXu Kuohai <[email protected]>2024-08-26 15:16:23 +0800
committerAlexei Starovoitov <[email protected]>2024-08-28 08:41:33 -0700
commitbd737fcb64856d582335a7245be60fbb591c0bfd (patch)
tree7ca7182162675dddfdc24a7e8f4b8c10a0ecfb58 /tools/testing/selftests/bpf/progs/test_autoload.c
parentd205d4af3a5ee840edecfa5f6b389d7d03b0786d (diff)
bpf, arm64: Get rid of fpb
bpf prog accesses stack using BPF_FP as the base address and a negative immediate number as offset. But arm64 ldr/str instructions only support non-negative immediate number as offset. To simplify the jited result, commit 5b3d19b9bd40 ("bpf, arm64: Adjust the offset of str/ldr(immediate) to positive number") introduced FPB to represent the lowest stack address that the bpf prog being jited may access, and with this address as the baseline, it converts BPF_FP plus negative immediate offset number to FPB plus non-negative immediate offset. Considering that for a given bpf prog, the jited stack space is fixed with A64_SP as the lowest address and BPF_FP as the highest address. Thus we can get rid of FPB and converts BPF_FP plus negative immediate offset to A64_SP plus non-negative immediate offset. Signed-off-by: Xu Kuohai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions