x86: Syscall table cleanups
Subsystems (3)
cover x86: Syscall table cleanups
Here are a few patches following up to the syscall table generation patches that are now in the -tip tree.
Brian Gerst (3):
x86/uml/syscalls: Remove array index from syscall initializers x86/syscalls: Remove -Wno-override-init for syscall tables x86/syscalls: Don't sdjust CFLAGS for syscall tables
arch/x86/entry/Makefile | 10 ---------- arch/x86/um/sys_call_table_32.c | 2 +- arch/x86/um/sys_call_table_64.c | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-)
Signature · 1 line
2.31.1
PATCH 1/3 x86/uml/syscalls: Remove array index from syscall initializers
Commit 44fe4895f47c ("Stop filling syscall arrays with *_sys_ni_syscall") removed the index from the initializers for native x86 syscall tables, but missed the UML syscall tables.
--- arch/x86/um/sys_call_table_32.c | 2 +- arch/x86/um/sys_call_table_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/um/sys_call_table_32.c +1 -1
@@ -31,7 +31,7 @@#include <asm/syscalls_32.h> #undef __SYSCALL -#define __SYSCALL (nr, sym) [ nr ] = sym, +#define __SYSCALL (nr, sym) sym,extern asmlinkage long sys_ni_syscall (unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long );
arch/x86/um/sys_call_table_64.c +1 -1
@@ -39,7 +39,7 @@#include <asm/syscalls_64.h> #undef __SYSCALL -#define __SYSCALL (nr, sym) [ nr ] = sym, +#define __SYSCALL (nr, sym) sym,extern asmlinkage long sys_ni_syscall (unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long );
Signature · 1 line
2.31.1
Re: [PATCH 1/3] x86/uml/syscalls: Remove array index from syscall initializers
Quoted 4 lines · Brian Gerst
Commit
44fe4895f47c("Stop filling syscall arrays with*_sys_ni_syscall") removed the index from the initializers for native x86 syscall tables, but missed the UML syscall tables.
Ah, right.
I missed cleaning up this in UML. Thanks.
Quoted 33 lines
Signed-off-by Brian Gerst <[email protected]>--- arch/x86/um/sys_call_table_32.c | 2 +- arch/x86/um/sys_call_table_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/x86/um/sys_call_table_32.c +1
-1@@ -31,7 +31,7 @@#include <asm/syscalls_32.h> #undef __SYSCALL -#define __SYSCALL (nr, sym) [ nr ] = sym, +#define __SYSCALL (nr, sym) sym,extern asmlinkage long sys_ni_syscall (unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long );arch/x86/um/sys_call_table_64.c +1
-2@@ -39,7 +39,7 @@#include <asm/syscalls_64.h> #undef __SYSCALL -#define __SYSCALL (nr, sym) [ nr ] = sym, +#define __SYSCALL (nr, sym) sym,extern asmlinkage long sys_ni_syscall (unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long ); --
Quoted 2 lines
2.31.1
--
Best Regards
Masahiro Yamada
[tip: x86/entry] x86/uml/syscalls: Remove array index from syscall initializers
In reply to Brian GerstThe 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: d48ca5b98fa5d21444e04bb17373d339200b679a Gitweb: https://git.kernel.org/tip/d48ca5b98fa5d21444e04bb17373d339200b679a Author: Brian Gerst <[email protected]> AuthorDate: Mon, 24 May 2021 14:17:05 -04:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 25 May 2021 16:59:23 +02:00
x86/uml/syscalls: Remove array index from syscall initializers
The recent syscall table generator rework removed the index from the initializers for native x86 syscall tables, but missed the UML syscall tables.
--- arch/x86/um/sys_call_table_32.c | 2 +- arch/x86/um/sys_call_table_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/um/sys_call_table_32.c +1 -1
@@ -31,7 +31,7 @@#include <asm/syscalls_32.h> #undef __SYSCALL -#define __SYSCALL (nr, sym) [ nr ] = sym, +#define __SYSCALL (nr, sym) sym,extern asmlinkage long sys_ni_syscall (unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long );
arch/x86/um/sys_call_table_64.c +1 -1
@@ -39,7 +39,7 @@#include <asm/syscalls_64.h> #undef __SYSCALL -#define __SYSCALL (nr, sym) [ nr ] = sym, +#define __SYSCALL (nr, sym) sym,extern asmlinkage long sys_ni_syscall (unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long ,unsigned long );
PATCH 2/3 x86/syscalls: Remove -Wno-override-init for syscall tables
In reply to Brian GerstCommit 44fe4895f47c ("Stop filling syscall arrays with *_sys_ni_syscall") removes the need for -Wno-override-init, since the table is now filled sequentially instead of overriding a default value.
--- arch/x86/entry/Makefile | 4 ---- 1 file changed, 4 deletions(-)
arch/x86/entry/Makefile +0 -4
@@ -17,10 +17,6 @@ CFLAGS_syscall_64.o += -fno-stack-protector CFLAGS_syscall_32.o += -fno-stack-protector CFLAGS_syscall_x32.o += -fno-stack-protector -CFLAGS_syscall_64.o += $(call cc-option,-Wno-override-init,) -CFLAGS_syscall_32.o += $(call cc-option,-Wno-override-init,) -CFLAGS_syscall_x32.o += $(call cc-option,-Wno-override-init,) - obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o obj-y += common.o
Signature · 1 line
2.31.1
Re: [PATCH 2/3] x86/syscalls: Remove -Wno-override-init for syscall tables
Quoted 7 lines · Brian Gerst
Commit
44fe4895f47c("Stop filling syscall arrays with*_sys_ni_syscall") removes the need for -Wno-override-init, since the table is now filled sequentially instead of overriding a default value.Signed-off-by Brian Gerst <[email protected]>---
Quoted 19 lines
arch/x86/entry/Makefile | 4 ---- 1 file changed, 4 deletions(-)arch/x86/entry/Makefile +0
-5@@ -17,10 +17,6 @@ CFLAGS_syscall_64.o += -fno-stack-protector CFLAGS_syscall_32.o += -fno-stack-protector CFLAGS_syscall_x32.o += -fno-stack-protector -CFLAGS_syscall_64.o += $(call cc-option,-Wno-override-init,) -CFLAGS_syscall_32.o += $(call cc-option,-Wno-override-init,) -CFLAGS_syscall_x32.o += $(call cc-option,-Wno-override-init,) - obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o obj-y += common.o --
Quoted 2 lines
2.31.1
--
Best Regards
Masahiro Yamada
[tip: x86/entry] x86/syscalls: Remove -Wno-override-init for syscall tables
In reply to Brian GerstThe 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: fd9e8691f38712892fa2ac73132dcc8b85b07a8f Gitweb: https://git.kernel.org/tip/fd9e8691f38712892fa2ac73132dcc8b85b07a8f Author: Brian Gerst <[email protected]> AuthorDate: Mon, 24 May 2021 14:17:06 -04:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 25 May 2021 16:59:23 +02:00
x86/syscalls: Remove -Wno-override-init for syscall tables
Commit 44fe4895f47c ("Stop filling syscall arrays with *_sys_ni_syscall") removes the need for -Wno-override-init, since the table is now filled sequentially instead of overriding a default value.
--- arch/x86/entry/Makefile | 4 ---- 1 file changed, 4 deletions(-)
arch/x86/entry/Makefile +0 -4
@@ -17,10 +17,6 @@ CFLAGS_syscall_64.o += -fno-stack-protector CFLAGS_syscall_32.o += -fno-stack-protector CFLAGS_syscall_x32.o += -fno-stack-protector -CFLAGS_syscall_64.o += $(call cc-option,-Wno-override-init,) -CFLAGS_syscall_32.o += $(call cc-option,-Wno-override-init,) -CFLAGS_syscall_x32.o += $(call cc-option,-Wno-override-init,) - obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o obj-y += common.o
PATCH 3/3 x86/syscalls: Don't sdjust CFLAGS for syscall tables
In reply to Brian GerstThe syscall_*.c files only contain data (the syscall tables). There is no need to adjust CFLAGS for tracing and stack protector since they contain no code.
--- arch/x86/entry/Makefile | 6 ------ 1 file changed, 6 deletions(-)
arch/x86/entry/Makefile +0 -6
@@ -8,14 +8,8 @@ UBSAN_SANITIZE := n KCOV_INSTRUMENT := n CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_syscall_64.o = $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_syscall_32.o = $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_syscall_x32.o = $(CC_FLAGS_FTRACE) CFLAGS_common.o += -fno-stack-protector -CFLAGS_syscall_64.o += -fno-stack-protector -CFLAGS_syscall_32.o += -fno-stack-protector -CFLAGS_syscall_x32.o += -fno-stack-protector obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o obj-y += common.o
Signature · 1 line
2.31.1
Re: [PATCH 3/3] x86/syscalls: Don't sdjust CFLAGS for syscall tables
Quoted 7 lines · Brian Gerst
The syscall_*.c files only contain data (the syscall tables). There is no need to adjust CFLAGS for tracing and stack protector since they contain no code.
Signed-off-by Brian Gerst <[email protected]>---
Quoted 25 lines
arch/x86/entry/Makefile | 6 ------ 1 file changed, 6 deletions(-)arch/x86/entry/Makefile +0
-7@@ -8,14 +8,8 @@ UBSAN_SANITIZE := n KCOV_INSTRUMENT := n CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_syscall_64.o = $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_syscall_32.o = $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_syscall_x32.o = $(CC_FLAGS_FTRACE) CFLAGS_common.o += -fno-stack-protector -CFLAGS_syscall_64.o += -fno-stack-protector -CFLAGS_syscall_32.o += -fno-stack-protector -CFLAGS_syscall_x32.o += -fno-stack-protector obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o obj-y += common.o --2.31.1
Signature · 2 lines
Best Regards Masahiro Yamada
[tip: x86/entry] x86/syscalls: Don't adjust CFLAGS for syscall tables
In reply to Brian GerstThe 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: 48f7eee81cd53a94699d28959566b41a9dcac1d9 Gitweb: https://git.kernel.org/tip/48f7eee81cd53a94699d28959566b41a9dcac1d9 Author: Brian Gerst <[email protected]> AuthorDate: Mon, 24 May 2021 14:17:07 -04:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Tue, 25 May 2021 16:59:23 +02:00
x86/syscalls: Don't adjust CFLAGS for syscall tables
The syscall_*.c files only contain data (the syscall tables). There is no need to adjust CFLAGS for tracing and stack protector since they contain no code.
--- arch/x86/entry/Makefile | 6 ------ 1 file changed, 6 deletions(-)
arch/x86/entry/Makefile +0 -6
@@ -8,14 +8,8 @@ UBSAN_SANITIZE := n KCOV_INSTRUMENT := n CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_syscall_64.o = $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_syscall_32.o = $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_syscall_x32.o = $(CC_FLAGS_FTRACE) CFLAGS_common.o += -fno-stack-protector -CFLAGS_syscall_64.o += -fno-stack-protector -CFLAGS_syscall_32.o += -fno-stack-protector -CFLAGS_syscall_x32.o += -fno-stack-protector obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o obj-y += common.o