summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/verifier
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2026-04-11 13:09:32 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-04-11 15:24:41 -0700
commitae3f8ca2ba505d62173bb2f6bf6f6edf951b909e (patch)
treefca52137230bc0bf73e6c096bbc2c6fa830a16b3 /tools/testing/selftests/bpf/verifier
parent57205e2dd962d2c0e2093cf9b06dad6ba7737844 (diff)
downloadlinux-next-ae3f8ca2ba505d62173bb2f6bf6f6edf951b909e.tar.gz
linux-next-ae3f8ca2ba505d62173bb2f6bf6f6edf951b909e.zip
bpf: Move checks for reserved fields out of the main pass
Check reserved fields of each insn once in a prepass instead of repeatedly rechecking them during the main verifier pass. Link: https://lore.kernel.org/r/20260411200932.41797-1-alexei.starovoitov@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/verifier')
-rw-r--r--tools/testing/selftests/bpf/verifier/junk_insn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/verifier/junk_insn.c b/tools/testing/selftests/bpf/verifier/junk_insn.c
index 7d10b0a48f51..735d3b9510cf 100644
--- a/tools/testing/selftests/bpf/verifier/junk_insn.c
+++ b/tools/testing/selftests/bpf/verifier/junk_insn.c
@@ -10,7 +10,7 @@
{
"junk insn2",
.insns = {
- BPF_RAW_INSN(1, 0, 0, 0, 0),
+ BPF_RAW_INSN(BPF_LDX | BPF_MEM | BPF_W, 0, 0, 0, 1),
BPF_EXIT_INSN(),
},
.errstr = "BPF_LDX uses reserved fields",