Skip to contentSkip to conversation

x86/syscalls: clear 'offset' and 'prefix' in case they are set in env

PATCH Applied Masahiro Yamada 2 participants 2 messages May 25, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/syscalls: clear 'offset' and 'prefix' in case they are set in env

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'.

---

 arch/x86/entry/syscalls/Makefile | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/entry/syscalls/Makefile +2 -0
index 8eb014bca8c9..5b3efed0e4e8 100644
@@ -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 \
Signature · 1 line
2.27.0
#1 lore raw

[tip: x86/entry] x86/syscalls: Clear 'offset' and 'prefix' in case they are set in env

The following commit has been merged into the x86/entry branch of tip:

The following commit has been merged into the x86/entry branch of tip:

Commit-ID:     1eb8a49836949a77c4f7d738786719e7fde0c333
Gitweb:        https://git.kernel.org/tip/1eb8a49836949a77c4f7d738786719e7fde0c333
Author:        Masahiro Yamada <[email protected]>
AuthorDate:    Tue, 25 May 2021 20:54:20 +09:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Tue, 25 May 2021 16:59:23 +02:00

x86/syscalls: Clear 'offset' and 'prefix' in case they are set in env

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'.

Fixes 3cba325b358f ("x86/syscalls: Switch to generic syscallhdr.sh")
---
 arch/x86/entry/syscalls/Makefile | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/entry/syscalls/Makefile +2 -0
index 8eb014b..5b3efed 100644
@@ -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 \