From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbdJMUlY (ORCPT ); Fri, 13 Oct 2017 16:41:24 -0400 Received: from mga01.intel.com ([192.55.52.88]:41461 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbdJMUlX (ORCPT ); Fri, 13 Oct 2017 16:41:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,372,1503385200"; d="scan'208";a="1024982891" Subject: [RFC][PATCH] x86, syscalls: use SYSCALL_DEFINE() macros for sys_modify_ldt() To: linux-kernel@vger.kernel.org Cc: Dave Hansen , x86@kernel.org, luto@kernel.org From: Dave Hansen Date: Fri, 13 Oct 2017 13:39:29 -0700 Message-Id: <20171013203929.2260049F@viggo.jf.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I noticed that we don't have tracepoints for sys_modify_ldt(). I think that's because we define it directly instead of using the normal SYSCALL_DEFINEx() macros. Is there a reason for that, or were they just missed when the macros were created? Cc: x86@kernel.org Cc: Andy Lutomirski --- b/arch/x86/include/asm/syscalls.h | 2 +- b/arch/x86/kernel/ldt.c | 5 +++-- b/arch/x86/um/ldt.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff -puN arch/x86/kernel/ldt.c~x86-syscall-macros-modify_ldt arch/x86/kernel/ldt.c --- a/arch/x86/kernel/ldt.c~x86-syscall-macros-modify_ldt 2017-10-13 13:30:12.802553391 -0700 +++ b/arch/x86/kernel/ldt.c 2017-10-13 13:30:12.817553391 -0700 @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -294,8 +295,8 @@ out: return error; } -asmlinkage int sys_modify_ldt(int func, void __user *ptr, - unsigned long bytecount) +SYSCALL_DEFINE3(modify_ldt, int , func , void __user * , ptr , + unsigned long , bytecount) { int ret = -ENOSYS; diff -puN arch/x86/include/asm/syscalls.h~x86-syscall-macros-modify_ldt arch/x86/include/asm/syscalls.h --- a/arch/x86/include/asm/syscalls.h~x86-syscall-macros-modify_ldt 2017-10-13 13:30:12.812553391 -0700 +++ b/arch/x86/include/asm/syscalls.h 2017-10-13 13:30:12.818553391 -0700 @@ -21,7 +21,7 @@ asmlinkage long sys_ioperm(unsigned long asmlinkage long sys_iopl(unsigned int); /* kernel/ldt.c */ -asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); +asmlinkage long sys_modify_ldt(int, void __user *, unsigned long); /* kernel/signal.c */ asmlinkage long sys_rt_sigreturn(void); diff -puN arch/x86/um/ldt.c~x86-syscall-macros-modify_ldt arch/x86/um/ldt.c --- a/arch/x86/um/ldt.c~x86-syscall-macros-modify_ldt 2017-10-13 13:30:12.814553391 -0700 +++ b/arch/x86/um/ldt.c 2017-10-13 13:30:12.818553391 -0700 @@ -369,7 +369,8 @@ void free_ldt(struct mm_context *mm) mm->arch.ldt.entry_count = 0; } -int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount) +SYSCALL_DEFINE3(modify_ldt, int , func , void __user * , ptr , + unsigned long , bytecount) { return do_modify_ldt_skas(func, ptr, bytecount); } _