From: Greg Kroah-Hartman Date: Thu, 21 Jan 2021 10:31:53 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v4.4.253~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=668c7142f96b4e328afcfe1fed94dbf87f51fe8f;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: bpf-fix-selftest-compilation-on-clang-11.patch --- diff --git a/queue-5.10/bpf-fix-selftest-compilation-on-clang-11.patch b/queue-5.10/bpf-fix-selftest-compilation-on-clang-11.patch new file mode 100644 index 00000000000..0bb66453db0 --- /dev/null +++ b/queue-5.10/bpf-fix-selftest-compilation-on-clang-11.patch @@ -0,0 +1,53 @@ +From fb3558127cb62ba2dea9e3d0efa1bb1d7e5eee2a Mon Sep 17 00:00:00 2001 +From: Andrei Matei +Date: Tue, 24 Nov 2020 22:52:55 -0500 +Subject: bpf: Fix selftest compilation on clang 11 + +From: Andrei Matei + +commit fb3558127cb62ba2dea9e3d0efa1bb1d7e5eee2a upstream. + +Before this patch, profiler.inc.h wouldn't compile with clang-11 (before +the __builtin_preserve_enum_value LLVM builtin was introduced in +https://reviews.llvm.org/D83242). + +Another test that uses this builtin (test_core_enumval) is conditionally +skipped if the compiler is too old. In that spirit, this patch inhibits +part of populate_cgroup_info(), which needs this CO-RE builtin. The +selftests build again on clang-11. + +The affected test (the profiler test) doesn't pass on clang-11 because +it's missing https://reviews.llvm.org/D85570, but at least the test suite +as a whole compiles. The test's expected failure is already called out in +the README. + +Signed-off-by: Andrei Matei +Signed-off-by: Daniel Borkmann +Tested-by: Florian Lehner +Acked-by: Yonghong Song +Link: https://lore.kernel.org/bpf/20201125035255.17970-1-andreimatei1@gmail.com +Cc: Lorenz Bauer +Signed-off-by: Greg Kroah-Hartman + +--- + tools/testing/selftests/bpf/progs/profiler.inc.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/tools/testing/selftests/bpf/progs/profiler.inc.h ++++ b/tools/testing/selftests/bpf/progs/profiler.inc.h +@@ -256,6 +256,7 @@ static INLINE void* populate_cgroup_info + BPF_CORE_READ(task, nsproxy, cgroup_ns, root_cset, dfl_cgrp, kn); + struct kernfs_node* proc_kernfs = BPF_CORE_READ(task, cgroups, dfl_cgrp, kn); + ++#if __has_builtin(__builtin_preserve_enum_value) + if (ENABLE_CGROUP_V1_RESOLVER && CONFIG_CGROUP_PIDS) { + int cgrp_id = bpf_core_enum_value(enum cgroup_subsys_id___local, + pids_cgrp_id___local); +@@ -275,6 +276,7 @@ static INLINE void* populate_cgroup_info + } + } + } ++#endif + + cgroup_data->cgroup_root_inode = get_inode_from_kernfs(root_kernfs); + cgroup_data->cgroup_proc_inode = get_inode_from_kernfs(proc_kernfs); diff --git a/queue-5.10/series b/queue-5.10/series index 3a029d03eee..b476838597e 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -1 +1,2 @@ revert-kconfig-remove-kvmconfig-and-xenconfig-shorthands.patch +bpf-fix-selftest-compilation-on-clang-11.patch