From: Sasha Levin Date: Tue, 24 Jan 2023 12:04:24 +0000 (-0500) Subject: Fixes for 6.1 X-Git-Tag: v5.10.166~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1fed19e461b0e0ad5d7bfbbc5ac0b3dd33d7b4e;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 6.1 Signed-off-by: Sasha Levin --- diff --git a/queue-6.1/revert-selftests-bpf-check-null-propagation-only-nei.patch b/queue-6.1/revert-selftests-bpf-check-null-propagation-only-nei.patch new file mode 100644 index 00000000000..c2a52d1f80b --- /dev/null +++ b/queue-6.1/revert-selftests-bpf-check-null-propagation-only-nei.patch @@ -0,0 +1,82 @@ +From 18f9b41cfe5c6b184b3ec5f20679ed980fa04f54 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 24 Jan 2023 07:04:13 -0500 +Subject: Revert "selftests/bpf: check null propagation only neither reg is + PTR_TO_BTF_ID" + +This reverts commit 2e5d5c4ae77dedc7eba0e496474ab93f05b25adf. + +Signed-off-by: Sasha Levin +--- + .../bpf/prog_tests/jeq_infer_not_null.c | 9 ---- + .../bpf/progs/jeq_infer_not_null_fail.c | 42 ------------------- + 2 files changed, 51 deletions(-) + delete mode 100644 tools/testing/selftests/bpf/prog_tests/jeq_infer_not_null.c + delete mode 100644 tools/testing/selftests/bpf/progs/jeq_infer_not_null_fail.c + +diff --git a/tools/testing/selftests/bpf/prog_tests/jeq_infer_not_null.c b/tools/testing/selftests/bpf/prog_tests/jeq_infer_not_null.c +deleted file mode 100644 +index 3add34df5767..000000000000 +--- a/tools/testing/selftests/bpf/prog_tests/jeq_infer_not_null.c ++++ /dev/null +@@ -1,9 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0 +- +-#include +-#include "jeq_infer_not_null_fail.skel.h" +- +-void test_jeq_infer_not_null(void) +-{ +- RUN_TESTS(jeq_infer_not_null_fail); +-} +diff --git a/tools/testing/selftests/bpf/progs/jeq_infer_not_null_fail.c b/tools/testing/selftests/bpf/progs/jeq_infer_not_null_fail.c +deleted file mode 100644 +index f46965053acb..000000000000 +--- a/tools/testing/selftests/bpf/progs/jeq_infer_not_null_fail.c ++++ /dev/null +@@ -1,42 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0 +- +-#include "vmlinux.h" +-#include +-#include "bpf_misc.h" +- +-char _license[] SEC("license") = "GPL"; +- +-struct { +- __uint(type, BPF_MAP_TYPE_HASH); +- __uint(max_entries, 1); +- __type(key, u64); +- __type(value, u64); +-} m_hash SEC(".maps"); +- +-SEC("?raw_tp") +-__failure __msg("R8 invalid mem access 'map_value_or_null") +-int jeq_infer_not_null_ptr_to_btfid(void *ctx) +-{ +- struct bpf_map *map = (struct bpf_map *)&m_hash; +- struct bpf_map *inner_map = map->inner_map_meta; +- u64 key = 0, ret = 0, *val; +- +- val = bpf_map_lookup_elem(map, &key); +- /* Do not mark ptr as non-null if one of them is +- * PTR_TO_BTF_ID (R9), reject because of invalid +- * access to map value (R8). +- * +- * Here, we need to inline those insns to access +- * R8 directly, since compiler may use other reg +- * once it figures out val==inner_map. +- */ +- asm volatile("r8 = %[val];\n" +- "r9 = %[inner_map];\n" +- "if r8 != r9 goto +1;\n" +- "%[ret] = *(u64 *)(r8 +0);\n" +- : [ret] "+r"(ret) +- : [inner_map] "r"(inner_map), [val] "r"(val) +- : "r8", "r9"); +- +- return ret; +-} +-- +2.39.0 + diff --git a/queue-6.1/series b/queue-6.1/series index e7879d9230b..482827020fd 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -192,3 +192,4 @@ lockref-stop-doing-cpu_relax-in-the-cmpxchg-loop.patch ata-pata_cs5535-don-t-build-on-uml.patch firmware-coreboot-check-size-of-table-entry-and-use-.patch btrfs-zoned-enable-metadata-over-commit-for-non-zns-.patch +revert-selftests-bpf-check-null-propagation-only-nei.patch