]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Feb 2023 14:14:25 +0000 (15:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Feb 2023 14:14:25 +0000 (15:14 +0100)
added patches:
bpf-add-missing-header-file-include.patch

queue-5.15/bpf-add-missing-header-file-include.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/bpf-add-missing-header-file-include.patch b/queue-5.15/bpf-add-missing-header-file-include.patch
new file mode 100644 (file)
index 0000000..0437812
--- /dev/null
@@ -0,0 +1,49 @@
+From f3dd0c53370e70c0f9b7e931bbec12916f3bb8cc Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Wed, 22 Feb 2023 09:52:32 -0800
+Subject: bpf: add missing header file include
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit f3dd0c53370e70c0f9b7e931bbec12916f3bb8cc upstream.
+
+Commit 74e19ef0ff80 ("uaccess: Add speculation barrier to
+copy_from_user()") built fine on x86-64 and arm64, and that's the extent
+of my local build testing.
+
+It turns out those got the <linux/nospec.h> include incidentally through
+other header files (<linux/kvm_host.h> in particular), but that was not
+true of other architectures, resulting in build errors
+
+  kernel/bpf/core.c: In function ‘___bpf_prog_run’:
+  kernel/bpf/core.c:1913:3: error: implicit declaration of function ‘barrier_nospec’
+
+so just make sure to explicitly include the proper <linux/nospec.h>
+header file to make everybody see it.
+
+Fixes: 74e19ef0ff80 ("uaccess: Add speculation barrier to copy_from_user()")
+Reported-by: kernel test robot <lkp@intel.com>
+Reported-by: Viresh Kumar <viresh.kumar@linaro.org>
+Reported-by: Huacai Chen <chenhuacai@loongson.cn>
+Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Tested-by: Dave Hansen <dave.hansen@linux.intel.com>
+Acked-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/bpf/core.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/bpf/core.c
++++ b/kernel/bpf/core.c
+@@ -32,6 +32,7 @@
+ #include <linux/perf_event.h>
+ #include <linux/extable.h>
+ #include <linux/log2.h>
++#include <linux/nospec.h>
+ #include <asm/barrier.h>
+ #include <asm/unaligned.h>
index 8e57ac7dc55454d94885d7cdb3047898e838d873..da24ff7af1cd63aa2a5dd2fa67ce03c267a2cab1 100644 (file)
@@ -34,3 +34,4 @@ scripts-pahole-flags.sh-use-pahole-version.sh.patch
 lib-kconfig.debug-use-config_pahole_version.patch
 lib-kconfig.debug-allow-btf-dwarf5-with-pahole-1.21.patch
 revert-net-sched-taprio-make-qdisc_leaf-see-the-per-netdev-queue-pfifo-child-qdiscs.patch
+bpf-add-missing-header-file-include.patch