From: Masahiro Yamada <masahiroy@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
linux-kernel@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
Andy Lutomirski <luto@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH] x86/syscalls: clear 'offset' and 'prefix' in case they are set in env
Date: Tue, 25 May 2021 20:54:20 +0900 [thread overview]
Message-ID: <20210525115420.679416-1-masahiroy@kernel.org> (raw)
If the environment variable 'prefix' is set on the build host,
it is wrongly used as syscall macro prefixes.
$ export prefix=/usr
$ make -s defconfig all
In file included from ./arch/x86/include/asm/unistd.h:20,
from <stdin>:2:
./arch/x86/include/generated/uapi/asm/unistd_64.h:4:9: warning: missing whitespace after the macro name
4 | #define __NR_/usrread 0
| ^~~~~
arch/x86/entry/syscalls/Makefile should clear 'offset' and 'prefix'.
Link: https://lore.kernel.org/lkml/CA+G9fYvFXTHPKwasdVidF7qEHdqwRht8Xg6qm6CCLL0HGaU1ew@mail.gmail.com/
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Fixes: 3cba325b358f ("x86/syscalls: Switch to generic syscallhdr.sh")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/x86/entry/syscalls/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/entry/syscalls/Makefile b/arch/x86/entry/syscalls/Makefile
index 8eb014bca8c9..5b3efed0e4e8 100644
--- a/arch/x86/entry/syscalls/Makefile
+++ b/arch/x86/entry/syscalls/Makefile
@@ -11,6 +11,8 @@ syscall64 := $(src)/syscall_64.tbl
syshdr := $(srctree)/scripts/syscallhdr.sh
systbl := $(srctree)/scripts/syscalltbl.sh
+offset :=
+prefix :=
quiet_cmd_syshdr = SYSHDR $@
cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --abis $(abis) --emit-nr \
--
2.27.0
next reply other threads:[~2021-05-25 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 11:54 Masahiro Yamada [this message]
2021-05-25 15:00 ` [tip: x86/entry] x86/syscalls: Clear " tip-bot2 for Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210525115420.679416-1-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=bp@alien8.de \
--cc=geert@linux-m68k.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=naresh.kamboju@linaro.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®