summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2017-05-30 13:31:27 -0700
committerBruno Martins <bgcngm@gmail.com>2024-01-10 14:16:43 +0000
commit29da450cb1a0e7215d3136320daa461ea28fd628 (patch)
tree5538f200fcc5905e3a8174dbe98725d533739c9b /include/linux
parent1d2bd276c33545f77d64219b555cfed6097102bb (diff)
bpf: free up BPF_JMP | BPF_CALL | BPF_X opcode
free up BPF_JMP | BPF_CALL | BPF_X opcode to be used by actual indirect call by register and use kernel internal opcode to mark call instruction into bpf_tail_call() helper. Change-Id: I1a45b8e3c13848c9689ce288d4862935ede97fa7 Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/filter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index d64498da2a0c..22e9bd1cf047 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -53,6 +53,9 @@ struct bpf_prog_aux;
#define BPF_REG_AX MAX_BPF_REG
#define MAX_BPF_JIT_REG (MAX_BPF_REG + 1)
+/* unused opcode to mark special call to bpf_tail_call() helper */
+#define BPF_TAIL_CALL 0xf0
+
/* BPF program can access up to 512 bytes of stack space. */
#define MAX_BPF_STACK 512