[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <9c476aa64c9588205817833dbaa622f87c0e0081.1677051600.git.viresh.kumar@linaro.org>
Date: Wed, 22 Feb 2023 13:54:31 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
John Fastabend <john.fastabend@...il.com>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Viresh Kumar <viresh.kumar@...aro.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] bpf: Fix undeclared function 'barrier_nospec' warning
Add the missing header for architectures that don't define
the barrier_nospec() macro. The nospec.h header is added after the
inclusion of barrier.h to avoid redefining the macro for architectures
that already define barrier_nospec() in their respective barrier.h
headers.
Fixes: 74e19ef0ff80 ("uaccess: Add speculation barrier to copy_from_user()")
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
Linus's master branch fails currently to build for arm64 without this commit.
kernel/bpf/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 933869983e2a..92aeb388e422 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -38,6 +38,8 @@
#include <linux/memcontrol.h>
#include <asm/barrier.h>
+#include <linux/nospec.h>
+
#include <asm/unaligned.h>
/* Registers */
--
2.31.1.272.g89b43f80a514
Powered by blists - more mailing lists