diff options
author | Yonghong Song <yonghong.song@linux.dev> | 2023-07-28 04:11:56 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-07-28 04:52:33 +0300 |
commit | 1f9a1ea821ff25353a0e80d971e7958cd55b47a3 (patch) | |
tree | 3761503de2b1677a7d392b52710ee428d1a023d6 /include/uapi/linux/bpf.h | |
parent | 10d78a66a5f29fbbde1b09b5139c17c436b08c6e (diff) | |
download | linux-1f9a1ea821ff25353a0e80d971e7958cd55b47a3.tar.xz |
bpf: Support new sign-extension load insns
Add interpreter/jit support for new sign-extension load insns
which adds a new mode (BPF_MEMSX).
Also add verifier support to recognize these insns and to
do proper verification with new insns. In verifier, besides
to deduce proper bounds for the dst_reg, probed memory access
is also properly handled.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230728011156.3711870-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r-- | include/uapi/linux/bpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 7fc98f4b63e9..14fd26b09e4b 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -19,6 +19,7 @@ /* ld/ldx fields */ #define BPF_DW 0x18 /* double word (64-bit) */ +#define BPF_MEMSX 0x80 /* load with sign extension */ #define BPF_ATOMIC 0xc0 /* atomic memory ops - op type in immediate */ #define BPF_XADD 0xc0 /* exclusive add - legacy name */ |