-
Notifications
You must be signed in to change notification settings - Fork 6
Support trampoline for LoongArch #5483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bpf-next_base
Are you sure you want to change the base?
Support trampoline for LoongArch #5483
Conversation
Upstream branch: bd07bd1 |
6a06f9d
to
45c71f6
Compare
Upstream branch: cd7312a |
28aac86
to
4e2ceb2
Compare
45c71f6
to
4516bd2
Compare
Upstream branch: e30329b |
4e2ceb2
to
dad1726
Compare
4516bd2
to
983d136
Compare
Add branch jump function: larch_insn_gen_beq larch_insn_gen_bne Add instruction copy function: larch_insn_text_copy Co-developed-by: George Guo <[email protected]> Signed-off-by: George Guo <[email protected]> Co-developed-by: Youling Tang <[email protected]> Signed-off-by: Youling Tang <[email protected]> Signed-off-by: Chenghao Duan <[email protected]>
Implement the bpf_arch_text_poke function for the LoongArch architecture. On LoongArch, since symbol addresses in the direct mapping region cannot be reached via relative jump instructions from the paged mapping region, we use the move_imm+jirl instruction pair as absolute jump instructions. These require 2-5 instructions, so we reserve 5 NOP instructions in the program as placeholders for function jumps. Co-developed-by: George Guo <[email protected]> Signed-off-by: George Guo <[email protected]> Signed-off-by: Chenghao Duan <[email protected]>
BPF trampoline is the critical infrastructure of the BPF subsystem, acting as a mediator between kernel functions and BPF programs. Numerous important features, such as using BPF program for zero overhead kernel introspection, rely on this key component. The related tests have passed, Including the following technical points: 1. fentry 2. fmod_ret 3. fexit Co-developed-by: George Guo <[email protected]> Signed-off-by: George Guo <[email protected]> Signed-off-by: Chenghao Duan <[email protected]>
Update the code to rename validate_code to validate_ctx. validate_code is used to check the validity of code. validate_ctx is used to check both code validity and table entry correctness. Co-developed-by: George Guo <[email protected]> Signed-off-by: George Guo <[email protected]> Signed-off-by: Chenghao Duan <[email protected]>
Upstream branch: 99fe8af |
dad1726
to
d345d5a
Compare
Pull request for series with
subject: Support trampoline for LoongArch
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=973377