aboutsummaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorAlexei Starovoitov2017-12-14 17:55:16 -0800
committerDaniel Borkmann2017-12-17 20:34:36 +0100
commitdb496944fdaaf2a67d2f60529f5dc23abf809506 (patch)
tree931b6e2db62ab0e2cea1e1b605dc9ea233c91de1 /COPYING
parent1c2a088a6626d4f51d2f2c97b0cbedbfbf3637f6 (diff)
bpf: arm64: add JIT support for multi-function programs
similar to x64 add support for bpf-to-bpf calls. When program has calls to in-kernel helpers the target call offset is known at JIT time and arm64 architecture needs 2 passes. With bpf-to-bpf calls the dynamically allocated function start is unknown until all functions of the program are JITed. Therefore (just like x64) arm64 JIT needs one extra pass over the program to emit correct call offsets. Implementation detail: Avoid being too clever in 64-bit immediate moves and always use 4 instructions (instead of 3-4 depending on the address) to make sure only one extra pass is needed. If some future optimization would make it worth while to optimize 'call 64-bit imm' further, the JIT would need to do 4 passes over the program instead of 3 as in this patch. For typical bpf program address the mov needs 3 or 4 insns, so unconditional 4 insns to save extra pass is a worthy trade off at this state of JIT. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions