From 50ae8771e74c42f68e0ce31bb9df7911f77eb3d1 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Feb 27 2023 11:39:26 +0000 Subject: bpf: add missing header file include (bsc#1012628). --- diff --git a/patches.kernel.org/6.2.1-012-bpf-add-missing-header-file-include.patch b/patches.kernel.org/6.2.1-012-bpf-add-missing-header-file-include.patch new file mode 100644 index 0000000..8d75fa4 --- /dev/null +++ b/patches.kernel.org/6.2.1-012-bpf-add-missing-header-file-include.patch @@ -0,0 +1,55 @@ +From: Linus Torvalds +Date: Wed, 22 Feb 2023 09:52:32 -0800 +Subject: [PATCH] bpf: add missing header file include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +References: bsc#1012628 +Patch-mainline: 6.2.1 +Git-commit: f3dd0c53370e70c0f9b7e931bbec12916f3bb8cc + +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 +Signed-off-by: Jiri Slaby +--- + kernel/bpf/core.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c +index 430c66d5..f9c3b103 100644 +--- a/kernel/bpf/core.c ++++ b/kernel/bpf/core.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + + #include +-- +2.35.3 + diff --git a/series.conf b/series.conf index d5ef633..d82f0e7 100644 --- a/series.conf +++ b/series.conf @@ -38,6 +38,7 @@ patches.kernel.org/6.2.1-009-platform-x86-nvidia-wmi-ec-backlight-Add-force-.patch patches.kernel.org/6.2.1-010-ext4-Fix-function-prototype-mismatch-for-ext4_f.patch patches.kernel.org/6.2.1-011-randstruct-disable-Clang-15-support.patch + patches.kernel.org/6.2.1-012-bpf-add-missing-header-file-include.patch ######################################################## # Build fixes that apply to the vanilla kernel too.