Skip to content

Commit 360e5b7

Browse files
borkmanngregkh
authored andcommitted
bpf, selftests: Adjust few selftest result_unpriv outcomes
commit 1bad6fd upstream Given we don't need to simulate the speculative domain for registers with immediates anymore since the verifier uses direct imm-based rewrites instead of having to mask, we can also lift a few cases that were previously rejected. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5abcd13 commit 360e5b7

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

‎tools/testing/selftests/bpf/verifier/stack_ptr.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,6 @@
295295
BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 0),
296296
BPF_EXIT_INSN(),
297297
},
298-
.result_unpriv = REJECT,
299-
.errstr_unpriv = "invalid write to stack R1 off=0 size=1",
300298
.result = ACCEPT,
301299
.retval = 42,
302300
},

‎tools/testing/selftests/bpf/verifier/value_ptr_arith.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,6 @@
302302
},
303303
.fixup_map_array_48b = { 3 },
304304
.result = ACCEPT,
305-
.result_unpriv = REJECT,
306-
.errstr_unpriv = "R0 pointer arithmetic of map value goes out of range",
307305
.retval = 1,
308306
},
309307
{
@@ -373,8 +371,6 @@
373371
},
374372
.fixup_map_array_48b = { 3 },
375373
.result = ACCEPT,
376-
.result_unpriv = REJECT,
377-
.errstr_unpriv = "R0 pointer arithmetic of map value goes out of range",
378374
.retval = 1,
379375
},
380376
{
@@ -474,8 +470,6 @@
474470
},
475471
.fixup_map_array_48b = { 3 },
476472
.result = ACCEPT,
477-
.result_unpriv = REJECT,
478-
.errstr_unpriv = "R0 pointer arithmetic of map value goes out of range",
479473
.retval = 1,
480474
},
481475
{
@@ -768,8 +762,6 @@
768762
},
769763
.fixup_map_array_48b = { 3 },
770764
.result = ACCEPT,
771-
.result_unpriv = REJECT,
772-
.errstr_unpriv = "R0 pointer arithmetic of map value goes out of range",
773765
.retval = 1,
774766
},
775767
{

0 commit comments

Comments
 (0)