From: Greg Kroah-Hartman Date: Tue, 10 Aug 2021 09:42:22 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.4.280~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75d45ef3fe3c2a281181f398fd56d297df084804;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: bpf-selftests-adjust-few-selftest-result_unpriv-outcomes.patch --- diff --git a/queue-5.4/bpf-selftests-adjust-few-selftest-result_unpriv-outcomes.patch b/queue-5.4/bpf-selftests-adjust-few-selftest-result_unpriv-outcomes.patch new file mode 100644 index 00000000000..c7653a2845e --- /dev/null +++ b/queue-5.4/bpf-selftests-adjust-few-selftest-result_unpriv-outcomes.patch @@ -0,0 +1,73 @@ +From 1bad6fd52be4ce12d207e2820ceb0f29ab31fc53 Mon Sep 17 00:00:00 2001 +From: Daniel Borkmann +Date: Tue, 4 May 2021 08:58:25 +0000 +Subject: bpf, selftests: Adjust few selftest result_unpriv outcomes + +From: Daniel Borkmann + +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 +Acked-by: Alexei Starovoitov +[OP: backport to 5.4, small context adjustment in stack_ptr.c] +Signed-off-by: Ovidiu Panait +Signed-off-by: Greg Kroah-Hartman + +--- + tools/testing/selftests/bpf/verifier/stack_ptr.c | 2 -- + tools/testing/selftests/bpf/verifier/value_ptr_arith.c | 8 -------- + 2 files changed, 10 deletions(-) + +--- 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, + }, +--- a/tools/testing/selftests/bpf/verifier/value_ptr_arith.c ++++ b/tools/testing/selftests/bpf/verifier/value_ptr_arith.c +@@ -301,8 +301,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, + }, + { +@@ -372,8 +370,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, + }, + { +@@ -473,8 +469,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, + }, + { +@@ -767,8 +761,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, + }, + { diff --git a/queue-5.4/series b/queue-5.4/series index 4ca45274eca..cbc5c9bd885 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -75,3 +75,4 @@ soc-ixp4xx-fix-printing-resources.patch spi-meson-spicc-fix-memory-leak-in-meson_spicc_remove.patch soc-ixp4xx-qmgr-fix-invalid-__iomem-access.patch perf-x86-amd-don-t-touch-the-amd64_eventsel_hostonly-bit-inside-the-guest.patch +bpf-selftests-adjust-few-selftest-result_unpriv-outcomes.patch