diff options
| author | Paul Chaignon <paul@cilium.io> | 2020-10-26 18:46:05 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-10-26 19:17:24 +0100 |
| commit | 12c9b837546c3dfe6d9c8617a0401f01f41a069d (patch) | |
| tree | 4fd3782b1c52219757ec690953c57114da00af40 /sys/linux | |
| parent | 97de33592d4162ca8b1f82300ab57404bf686e6e (diff) | |
sys/linux: add PSEUDO_BTF_ID ld_imm BPF instruction
This new ld_imm instruction was introduced in commit 4976b71 ("bpf:
Introduce pseudo_btf_id") upstream.
Signed-off-by: Paul Chaignon <paul@cilium.io>
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/bpf.txt | 13 | ||||
| -rw-r--r-- | sys/linux/bpf.txt.const | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sys/linux/bpf.txt b/sys/linux/bpf.txt index d1050edf3..268f8d7c9 100644 --- a/sys/linux/bpf.txt +++ b/sys/linux/bpf.txt @@ -228,6 +228,7 @@ bpf_insn [ initr0 bpf_insn_init_r0 map bpf_insn_map map_val bpf_insn_map_value + btf_id bpf_insn_btf_id ] [varlen] bpf_insn_generic { @@ -381,6 +382,18 @@ bpf_insn_map_value { imm2 int32 } +bpf_insn_btf_id { + code const[bpf_insn_load_imm_dw, int8] + dst flags[bpf_reg, int8:4] + src const[BPF_PSEUDO_BTF_ID, int8:4] + off const[0, int16] + imm btf_type_id + code2 const[0, int8] + regs2 const[0, int8] + off2 const[0, int16] + imm2 const[0, int32] +} + define bpf_insn_load_imm_dw BPF_LD | BPF_DW | BPF_IMM # Slightly prune state space, these values frequently must be 0. diff --git a/sys/linux/bpf.txt.const b/sys/linux/bpf.txt.const index 7f8e0defd..f5f566d5b 100644 --- a/sys/linux/bpf.txt.const +++ b/sys/linux/bpf.txt.const @@ -179,6 +179,7 @@ BPF_PROG_TYPE_STRUCT_OPS = 27 BPF_PROG_TYPE_TRACEPOINT = 5 BPF_PROG_TYPE_TRACING = 26 BPF_PROG_TYPE_XDP = 6 +BPF_PSEUDO_BTF_ID = 3 BPF_PSEUDO_CALL = 1 BPF_PSEUDO_MAP_FD = 1 BPF_PSEUDO_MAP_VALUE = 2 |
