* [PATCH] x86/sigreturn: use SYSCALL_DEFINE0
@ 2018-03-14 9:41 Tautschnig, Michael
2018-03-14 20:04 ` Thomas Gleixner
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Tautschnig, Michael @ 2018-03-14 9:41 UTC (permalink / raw)
To: x86, linux-api, linux-kernel
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Jaswinder Singh,
Andi Kleen, Dominik Brodowski
All definitions of syscalls in x86 except for those patched here have
already been using the appropriate SYSCALL_DEFINE*.
Signed-off-by: Michael Tautschnig <tautschn@amazon.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jaswinder Singh <jaswinder@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
---
arch/x86/kernel/signal.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index b9e00e8..40ba242 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -25,6 +25,7 @@
#include <linux/user-return-notifier.h>
#include <linux/uprobes.h>
#include <linux/context_tracking.h>
+#include <linux/syscalls.h>
#include <asm/processor.h>
#include <asm/ucontext.h>
@@ -601,7 +602,7 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
* Do a signal return; undo the signal stack.
*/
#ifdef CONFIG_X86_32
-asmlinkage unsigned long sys_sigreturn(void)
+SYSCALL_DEFINE0(sigreturn)
{
struct pt_regs *regs = current_pt_regs();
struct sigframe __user *frame;
@@ -633,7 +634,7 @@ asmlinkage unsigned long sys_sigreturn(void)
}
#endif /* CONFIG_X86_32 */
-asmlinkage long sys_rt_sigreturn(void)
+SYSCALL_DEFINE0(rt_sigreturn)
{
struct pt_regs *regs = current_pt_regs();
struct rt_sigframe __user *frame;
--
2.7.3.AMZN
Amazon Web Services UK Limited. Registered in England and Wales with registration number 08650665 with its registered office at 1 Principal Place, Worship Street, London, EC2A 2FA, United Kingdom.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/sigreturn: use SYSCALL_DEFINE0
2018-03-14 9:41 [PATCH] x86/sigreturn: use SYSCALL_DEFINE0 Tautschnig, Michael
@ 2018-03-14 20:04 ` Thomas Gleixner
2018-03-14 20:36 ` Dominik Brodowski
2018-03-14 20:45 ` [tip:x86/urgent] x86/sigreturn: Use SYSCALL_DEFINE0 tip-bot for Tautschnig, Michael
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2018-03-14 20:04 UTC (permalink / raw)
To: Tautschnig, Michael
Cc: x86, linux-api, linux-kernel, Ingo Molnar, H. Peter Anvin,
Jaswinder Singh, Andi Kleen, Dominik Brodowski
On Wed, 14 Mar 2018, Tautschnig, Michael wrote:
> All definitions of syscalls in x86 except for those patched here have
> already been using the appropriate SYSCALL_DEFINE*.
Dominik, do you have more urgent stuff queued in that area?
If yes, please add: Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
If not, I simply route it through x86/urgent for 4.16.
Thanks,
tglx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/sigreturn: use SYSCALL_DEFINE0
2018-03-14 20:04 ` Thomas Gleixner
@ 2018-03-14 20:36 ` Dominik Brodowski
0 siblings, 0 replies; 6+ messages in thread
From: Dominik Brodowski @ 2018-03-14 20:36 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Tautschnig, Michael, x86, linux-api, linux-kernel, Ingo Molnar,
H. Peter Anvin, Jaswinder Singh, Andi Kleen
On Wed, Mar 14, 2018 at 09:04:13PM +0100, Thomas Gleixner wrote:
> On Wed, 14 Mar 2018, Tautschnig, Michael wrote:
>
> > All definitions of syscalls in x86 except for those patched here have
> > already been using the appropriate SYSCALL_DEFINE*.
>
> Dominik, do you have more urgent stuff queued in that area?
>
> If yes, please add: Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>
> If not, I simply route it through x86/urgent for 4.16.
Thanks for asking! Nothing urgent from my side, only stuff for 4.17, so it
would be great if you could route it through x86/urgent.
Thanks,
Dominik
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tip:x86/urgent] x86/sigreturn: Use SYSCALL_DEFINE0
2018-03-14 9:41 [PATCH] x86/sigreturn: use SYSCALL_DEFINE0 Tautschnig, Michael
2018-03-14 20:04 ` Thomas Gleixner
@ 2018-03-14 20:45 ` tip-bot for Tautschnig, Michael
2018-03-19 20:17 ` [PATCH] x86/sigreturn: use SYSCALL_DEFINE0 kbuild test robot
2018-03-19 22:27 ` kbuild test robot
3 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Tautschnig, Michael @ 2018-03-14 20:45 UTC (permalink / raw)
To: linux-tip-commits
Cc: tautschn, linux-kernel, jaswinder, ak, tglx, mingo, linux, tautschn, hpa
Commit-ID: 1227b344de283f96c41de02cde4b26d5290f5302
Gitweb: https://git.kernel.org/tip/1227b344de283f96c41de02cde4b26d5290f5302
Author: Tautschnig, Michael <tautschn@amazon.co.uk>
AuthorDate: Wed, 14 Mar 2018 09:41:42 +0000
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 14 Mar 2018 21:43:09 +0100
x86/sigreturn: Use SYSCALL_DEFINE0
All definitions of syscalls in x86 except for those patched here have
already been using the appropriate SYSCALL_DEFINE*.
Signed-off-by: Michael Tautschnig <tautschn@amazon.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: linux-api@vger.kernel.org
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Jaswinder Singh <jaswinder@infradead.org>
Cc: "linux-api@vger.kernel.org"
Cc: "x86@kernel.org"
Link: https://lkml.kernel.org/r/9C9981F4-0E5E-42A7-8788-70F3DEAD258D@amazon.com
---
arch/x86/kernel/signal.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 4cdc0b27ec82..da270b95fe4d 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -25,6 +25,7 @@
#include <linux/user-return-notifier.h>
#include <linux/uprobes.h>
#include <linux/context_tracking.h>
+#include <linux/syscalls.h>
#include <asm/processor.h>
#include <asm/ucontext.h>
@@ -601,7 +602,7 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
* Do a signal return; undo the signal stack.
*/
#ifdef CONFIG_X86_32
-asmlinkage unsigned long sys_sigreturn(void)
+SYSCALL_DEFINE0(sigreturn)
{
struct pt_regs *regs = current_pt_regs();
struct sigframe __user *frame;
@@ -633,7 +634,7 @@ badframe:
}
#endif /* CONFIG_X86_32 */
-asmlinkage long sys_rt_sigreturn(void)
+SYSCALL_DEFINE0(rt_sigreturn)
{
struct pt_regs *regs = current_pt_regs();
struct rt_sigframe __user *frame;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/sigreturn: use SYSCALL_DEFINE0
2018-03-14 9:41 [PATCH] x86/sigreturn: use SYSCALL_DEFINE0 Tautschnig, Michael
2018-03-14 20:04 ` Thomas Gleixner
2018-03-14 20:45 ` [tip:x86/urgent] x86/sigreturn: Use SYSCALL_DEFINE0 tip-bot for Tautschnig, Michael
@ 2018-03-19 20:17 ` kbuild test robot
2018-03-19 22:27 ` kbuild test robot
3 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2018-03-19 20:17 UTC (permalink / raw)
To: Tautschnig, Michael
Cc: kbuild-all, x86, linux-api, linux-kernel, Thomas Gleixner,
Ingo Molnar, H. Peter Anvin, Jaswinder Singh, Andi Kleen,
Dominik Brodowski
[-- Attachment #1: Type: text/plain, Size: 2576 bytes --]
Hi Michael,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v4.16-rc4]
[also build test ERROR on next-20180319]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Tautschnig-Michael/x86-sigreturn-use-SYSCALL_DEFINE0/20180316-110516
config: i386-randconfig-c0-03200324 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
In file included from arch/x86/kernel/signal.c:28:0:
>> include/linux/syscalls.h:194:18: error: conflicting types for 'sys_sigreturn'
asmlinkage long sys_##sname(void)
^
arch/x86/kernel/signal.c:605:1: note: in expansion of macro 'SYSCALL_DEFINE0'
SYSCALL_DEFINE0(sigreturn)
^~~~~~~~~~~~~~~
In file included from arch/x86/kernel/signal.c:45:0:
arch/x86/include/asm/syscalls.h:37:26: note: previous declaration of 'sys_sigreturn' was here
asmlinkage unsigned long sys_sigreturn(void);
^~~~~~~~~~~~~
--
In file included from arch/x86//kernel/signal.c:28:0:
>> include/linux/syscalls.h:194:18: error: conflicting types for 'sys_sigreturn'
asmlinkage long sys_##sname(void)
^
arch/x86//kernel/signal.c:605:1: note: in expansion of macro 'SYSCALL_DEFINE0'
SYSCALL_DEFINE0(sigreturn)
^~~~~~~~~~~~~~~
In file included from arch/x86//kernel/signal.c:45:0:
arch/x86/include/asm/syscalls.h:37:26: note: previous declaration of 'sys_sigreturn' was here
asmlinkage unsigned long sys_sigreturn(void);
^~~~~~~~~~~~~
vim +/sys_sigreturn +194 include/linux/syscalls.h
bed1ffca Frederic Weisbecker 2009-03-13 191
bed1ffca Frederic Weisbecker 2009-03-13 192 #define SYSCALL_DEFINE0(sname) \
99e621f7 Al Viro 2013-03-05 193 SYSCALL_METADATA(_##sname, 0); \
bed1ffca Frederic Weisbecker 2009-03-13 @194 asmlinkage long sys_##sname(void)
bed1ffca Frederic Weisbecker 2009-03-13 195
:::::: The code at line 194 was first introduced by commit
:::::: bed1ffca022cc876fb83161d26670e9b5d3cf36b tracing/syscalls: core infrastructure for syscalls tracing, enhancements
:::::: TO: Frederic Weisbecker <fweisbec@gmail.com>
:::::: CC: Ingo Molnar <mingo@elte.hu>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28743 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/sigreturn: use SYSCALL_DEFINE0
2018-03-14 9:41 [PATCH] x86/sigreturn: use SYSCALL_DEFINE0 Tautschnig, Michael
` (2 preceding siblings ...)
2018-03-19 20:17 ` [PATCH] x86/sigreturn: use SYSCALL_DEFINE0 kbuild test robot
@ 2018-03-19 22:27 ` kbuild test robot
3 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2018-03-19 22:27 UTC (permalink / raw)
To: Tautschnig, Michael
Cc: kbuild-all, x86, linux-api, linux-kernel, Thomas Gleixner,
Ingo Molnar, H. Peter Anvin, Jaswinder Singh, Andi Kleen,
Dominik Brodowski
[-- Attachment #1: Type: text/plain, Size: 4028 bytes --]
Hi Michael,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v4.16-rc4]
[also build test ERROR on next-20180319]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Tautschnig-Michael/x86-sigreturn-use-SYSCALL_DEFINE0/20180316-110516
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
>> arch/x86//kernel/signal.c:605:1691: error: conflicting types for 'sys_sigreturn'
SYSCALL_DEFINE0(sigreturn)
^
In file included from arch/x86//kernel/signal.c:45:0:
arch/x86/include/asm/syscalls.h:37:44: note: previous declaration of 'sys_sigreturn' was here
asmlinkage unsigned long sys_sigreturn(void);
^~
vim +/sys_sigreturn +605 arch/x86//kernel/signal.c
600
601 /*
602 * Do a signal return; undo the signal stack.
603 */
604 #ifdef CONFIG_X86_32
> 605 SYSCALL_DEFINE0(sigreturn)
606 {
607 struct pt_regs *regs = current_pt_regs();
608 struct sigframe __user *frame;
609 sigset_t set;
610
611 frame = (struct sigframe __user *)(regs->sp - 8);
612
613 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
614 goto badframe;
615 if (__get_user(set.sig[0], &frame->sc.oldmask) || (_NSIG_WORDS > 1
616 && __copy_from_user(&set.sig[1], &frame->extramask,
617 sizeof(frame->extramask))))
618 goto badframe;
619
620 set_current_blocked(&set);
621
622 /*
623 * x86_32 has no uc_flags bits relevant to restore_sigcontext.
624 * Save a few cycles by skipping the __get_user.
625 */
626 if (restore_sigcontext(regs, &frame->sc, 0))
627 goto badframe;
628 return regs->ax;
629
630 badframe:
631 signal_fault(regs, frame, "sigreturn");
632
633 return 0;
634 }
635 #endif /* CONFIG_X86_32 */
636
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 62383 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-03-19 22:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-14 9:41 [PATCH] x86/sigreturn: use SYSCALL_DEFINE0 Tautschnig, Michael
2018-03-14 20:04 ` Thomas Gleixner
2018-03-14 20:36 ` Dominik Brodowski
2018-03-14 20:45 ` [tip:x86/urgent] x86/sigreturn: Use SYSCALL_DEFINE0 tip-bot for Tautschnig, Michael
2018-03-19 20:17 ` [PATCH] x86/sigreturn: use SYSCALL_DEFINE0 kbuild test robot
2018-03-19 22:27 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).