public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>, Borislav Petkov <bp@alien8.de>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Sergei Trofimovich <slyfox@gentoo.org>
Subject: [RFC][PATCH 1/2] syscalls.h: Make SyS_foo() declaration static
Date: Wed, 06 May 2015 14:18:32 -0400	[thread overview]
Message-ID: <20150506182359.053170180@goodmis.org> (raw)
In-Reply-To: 20150506181831.145849116@goodmis.org

[-- Attachment #1: 0001-syscalls.h-Make-SyS_foo-declaration-static.patch --]
[-- Type: text/plain, Size: 1614 bytes --]

From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

Nothing should call the syscall wrapper alias (SyS_foo) directly.
It is only used to force the system call to sign extend its arguments.
See commit 1a94bc34768e "System call wrapper infrastructure".

By declaring it static, we can also remove the protoype that was
added by commit f9597f24c089 "syscalls.h: add forward declarations for
inplace syscall wrappers", that fixed the warnings that were generated
because the call was not static.

Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Sergei Trofimovich <slyfox@gentoo.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/linux/syscalls.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 76d1e38aabe1..f8e5b696670c 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -195,8 +195,7 @@ extern struct trace_event_functions exit_syscall_print_funcs;
 	asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))	\
 		__attribute__((alias(__stringify(SyS##name))));		\
 	static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));	\
-	asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));	\
-	asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))	\
+	asmlinkage static long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))	\
 	{								\
 		long ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__));	\
 		__MAP(x,__SC_TEST,__VA_ARGS__);				\
-- 
2.1.4



  reply	other threads:[~2015-05-06 18:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 18:18 [RFC][PATCH 0/2] kallsyms: Nuke the SyS_* aliases Steven Rostedt
2015-05-06 18:18 ` Steven Rostedt [this message]
2015-05-06 18:18 ` [RFC][PATCH 2/2] kallsyms: Do not display SyS_foo() syscall aliases in kallsyms Steven Rostedt
2015-05-22 10:55   ` Borislav Petkov
2015-05-22 12:42     ` Steven Rostedt
2017-06-15 14:26   ` [RFC, " Pratyush Anand
2017-06-15 14:30     ` Steven Rostedt
2017-06-15 14:37       ` Pratyush Anand
2017-06-15 14:36     ` Pratyush Anand

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=20150506182359.053170180@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=bp@alien8.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=slyfox@gentoo.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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