From bc0fa952dc76986e46d019986ae8e31e7eacc55d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 23 Feb 2023 15:14:08 +0100 Subject: [PATCH] 5.4-stable patches added patches: bpf-add-missing-header-file-include.patch --- .../bpf-add-missing-header-file-include.patch | 49 +++++++++++++++++++ queue-5.4/series | 1 + 2 files changed, 50 insertions(+) create mode 100644 queue-5.4/bpf-add-missing-header-file-include.patch diff --git a/queue-5.4/bpf-add-missing-header-file-include.patch b/queue-5.4/bpf-add-missing-header-file-include.patch new file mode 100644 index 00000000000..3b79d6dea8e --- /dev/null +++ b/queue-5.4/bpf-add-missing-header-file-include.patch @@ -0,0 +1,49 @@ +From f3dd0c53370e70c0f9b7e931bbec12916f3bb8cc Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +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 + +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 include incidentally through +other header files ( 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 +header file to make everybody see it. + +Fixes: 74e19ef0ff80 ("uaccess: Add speculation barrier to copy_from_user()") +Reported-by: kernel test robot +Reported-by: Viresh Kumar +Reported-by: Huacai Chen +Tested-by: Geert Uytterhoeven +Tested-by: Dave Hansen +Acked-by: Alexei Starovoitov +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + kernel/bpf/core.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/kernel/bpf/core.c ++++ b/kernel/bpf/core.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/queue-5.4/series b/queue-5.4/series index 3b36476cac9..a2f4fd29609 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -16,3 +16,4 @@ uaccess-add-speculation-barrier-to-copy_from_user.patch wifi-mwifiex-add-missing-compatible-string-for-sd8787.patch ext4-fix-function-prototype-mismatch-for-ext4_feat_ktype.patch revert-net-sched-taprio-make-qdisc_leaf-see-the-per-netdev-queue-pfifo-child-qdiscs.patch +bpf-add-missing-header-file-include.patch -- 2.47.3