summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTony Ambardar <tony.ambardar@gmail.com>2022-06-17 12:57:34 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2022-06-21 18:52:04 +0200
commit95acd8817e66d031d2e6ee7def3f1e1874819317 (patch)
treef42808f3e806be15132e6978a1f2501eef59372b /include
parentb40b414ec8d971be0b2f6485c3a039b0fa7f078c (diff)
downloadlinux-95acd8817e66d031d2e6ee7def3f1e1874819317.tar.bz2
bpf, x64: Add predicate for bpf2bpf with tailcalls support in JIT
The BPF core/verifier is hard-coded to permit mixing bpf2bpf and tail calls for only x86-64. Change the logic to instead rely on a new weak function 'bool bpf_jit_supports_subprog_tailcalls(void)', which a capable JIT backend can override. Update the x86-64 eBPF JIT to reflect this. Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com> [jakub: drop MIPS bits and tweak patch subject] Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220617105735.733938-2-jakub@cloudflare.com
Diffstat (limited to 'include')
-rw-r--r--include/linux/filter.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index d0cbb31b1b4d..4c1a8b247545 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -914,6 +914,7 @@ u64 __bpf_call_base(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5);
struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog);
void bpf_jit_compile(struct bpf_prog *prog);
bool bpf_jit_needs_zext(void);
+bool bpf_jit_supports_subprog_tailcalls(void);
bool bpf_jit_supports_kfunc_call(void);
bool bpf_helper_changes_pkt_data(void *func);