* [PATCH 5.4] bpf, selftests: Adjust few selftest result_unpriv outcomes
@ 2021-06-01 17:02 Shaoying Xu
2021-06-08 14:49 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Shaoying Xu @ 2021-06-01 17:02 UTC (permalink / raw)
To: stable; +Cc: shaoyi, fllinden
From: Daniel Borkmann <daniel@iogearbox.net>
commit 1bad6fd52be4ce12d207e2820ceb0f29ab31fc53 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>
[shaoyi@amazon.com - backport to 5.4 with small contextual change]
Signed-off-by: Shaoying Xu <shaoyi@amazon.com>
Cc: <stable@vger.kernel.org>
---
tools/testing/selftests/bpf/verifier/stack_ptr.c | 2 --
tools/testing/selftests/bpf/verifier/value_ptr_arith.c | 8 --------
2 files changed, 10 deletions(-)
diff --git a/tools/testing/selftests/bpf/verifier/stack_ptr.c b/tools/testing/selftests/bpf/verifier/stack_ptr.c
index 7276620ef242..53d2a5a5ec58 100644
--- a/tools/testing/selftests/bpf/verifier/stack_ptr.c
+++ b/tools/testing/selftests/bpf/verifier/stack_ptr.c
@@ -291,8 +291,6 @@
BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 0),
BPF_EXIT_INSN(),
},
- .result_unpriv = REJECT,
- .errstr_unpriv = "invalid stack off=0 size=1",
.result = ACCEPT,
.retval = 42,
},
diff --git a/tools/testing/selftests/bpf/verifier/value_ptr_arith.c b/tools/testing/selftests/bpf/verifier/value_ptr_arith.c
index 28d44e6aa0b7..f9c91b95080e 100644
--- a/tools/testing/selftests/bpf/verifier/value_ptr_arith.c
+++ b/tools/testing/selftests/bpf/verifier/value_ptr_arith.c
@@ -300,8 +300,6 @@
},
.fixup_map_array_48b = { 3 },
.result = ACCEPT,
- .result_unpriv = REJECT,
- .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range",
.retval = 1,
},
{
@@ -371,8 +369,6 @@
},
.fixup_map_array_48b = { 3 },
.result = ACCEPT,
- .result_unpriv = REJECT,
- .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range",
.retval = 1,
},
{
@@ -472,8 +468,6 @@
},
.fixup_map_array_48b = { 3 },
.result = ACCEPT,
- .result_unpriv = REJECT,
- .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range",
.retval = 1,
},
{
@@ -766,8 +760,6 @@
},
.fixup_map_array_48b = { 3 },
.result = ACCEPT,
- .result_unpriv = REJECT,
- .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range",
.retval = 1,
},
{
--
2.16.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 5.4] bpf, selftests: Adjust few selftest result_unpriv outcomes
2021-06-01 17:02 [PATCH 5.4] bpf, selftests: Adjust few selftest result_unpriv outcomes Shaoying Xu
@ 2021-06-08 14:49 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-06-08 14:49 UTC (permalink / raw)
To: Shaoying Xu; +Cc: stable, fllinden
On Tue, Jun 01, 2021 at 05:02:41PM +0000, Shaoying Xu wrote:
> From: Daniel Borkmann <daniel@iogearbox.net>
>
> commit 1bad6fd52be4ce12d207e2820ceb0f29ab31fc53 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>
> [shaoyi@amazon.com - backport to 5.4 with small contextual change]
What about 5.10 and 5.12, why wouldn't they also need this?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-08 14:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 17:02 [PATCH 5.4] bpf, selftests: Adjust few selftest result_unpriv outcomes Shaoying Xu
2021-06-08 14:49 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).