diff options
author | Xu Kuohai <xukuohai@huawei.com> | 2024-08-26 15:16:23 +0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-08-28 08:41:33 -0700 |
commit | bd737fcb64856d582335a7245be60fbb591c0bfd (patch) | |
tree | 7ca7182162675dddfdc24a7e8f4b8c10a0ecfb58 /scripts/generate_rust_analyzer.py | |
parent | d205d4af3a5ee840edecfa5f6b389d7d03b0786d (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 <xukuohai@huawei.com>
Link: https://lore.kernel.org/r/20240826071624.350108-2-xukuohai@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions