diff options
| author | Paul Chaignon <paul.chaignon@gmail.com> | 2023-10-22 19:18:56 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-10-23 08:14:13 +0000 |
| commit | 18760ed77c0da6e2bcb29109739ccc108653db22 (patch) | |
| tree | b3bd9e3de227aedeec1603bb69c515d47f35bb0a /sys/linux/bpf.txt | |
| parent | 361b23dca53619ee1dfd92dd6a74a7f3e58f270c (diff) | |
sys/linux: support new BPF opcode BPF_MEMSX
Commit [1] upstream added support for new sign-extended load
instructions. Those instructions rely on a new mode, BPF_MEMSX, for the
opcode. This commit adds that mode to the BPF description.
Note that several other instructions were defined at the same type, but
our BPF instruction descriptions are currently generic enough that no
other changes are needed. In the future, we may want to make those
descriptions more specific to avoid wasting fuzzing time on unsupported
instruction formats.
1 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1f9a1ea821ff
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Diffstat (limited to 'sys/linux/bpf.txt')
| -rw-r--r-- | sys/linux/bpf.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/linux/bpf.txt b/sys/linux/bpf.txt index f4b018ada..169d5aef0 100644 --- a/sys/linux/bpf.txt +++ b/sys/linux/bpf.txt @@ -412,7 +412,7 @@ type bpf_insn_st64_reg[SRC, DST, OFF] bpf_insn_ldst_t[const, BPF_STX, const, BPF bpf_ldst_insn = BPF_LD, BPF_LDX, BPF_ST, BPF_STX bpf_ldst_size = BPF_W0, BPF_H0, BPF_B0, BPF_DW0 -bpf_ldst_mode = BPF_IMM0, BPF_ABS0, BPF_IND0, BPF_MEM0, BPF_XADD0 +bpf_ldst_mode = BPF_IMM0, BPF_ABS0, BPF_IND0, BPF_MEM0, BPF_XADD0, BPF_MEMSX0 define BPF_W0 BPF_W >> 3 define BPF_H0 BPF_H >> 3 @@ -424,6 +424,7 @@ define BPF_ABS0 BPF_ABS >> 5 define BPF_IND0 BPF_IND >> 5 define BPF_MEM0 BPF_MEM >> 5 define BPF_XADD0 BPF_XADD >> 5 +define BPF_MEMSX0 BPF_MEMSX >> 5 type bpf_insn_alu_t[CLASS_TYPE, CLASS, SOURCE_TYPE, SOURCE, OP_TYPE, OP, DST, SRC, OFF, IMM] { code_class CLASS_TYPE[CLASS, int8:3] |
