From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Jason Baron <jbaron@redhat.com>
Cc: fweisbec@gmail.com, mingo@elte.hu, rostedt@goodmis.org,
linux-kernel@vger.kernel.org, laijs@cn.fujitsu.com,
lizf@cn.fujitsu.com, hpa@zytor.com, tglx@linutronix.de,
mhiramat@redhat.com, benh@kernel.crashing.org,
davem@davemloft.net, lethal@linux-sh.org, schwidefsky@de.ibm.com,
brueckner@linux.vnet.ibm.com, tony.luck@intel.com
Subject: Re: [PATCH 08/12] syscalls: add new COMPAT_SYSCALL_DEFINE#N() macro
Date: Sun, 28 Feb 2010 11:09:02 +0100 [thread overview]
Message-ID: <20100228100902.GA2330@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <4aefea222db757a76ca70f20b6165e5084b99e8e.1267214186.git.jbaron@redhat.com>
On Fri, Feb 26, 2010 at 04:37:30PM -0500, Jason Baron wrote:
> Add COMPAT_SYSCALL_DEFINE#N() macro define common compat syscalls that
> are not arch specific. Prepends "compat_sys_" to the syscall name to identify
> it.
>
> Signed-off-by: Jason Baron <jbaron@redhat.com>
> ---
> include/linux/syscalls.h | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
> index cd7b959..241a19c 100644
> --- a/include/linux/syscalls.h
> +++ b/include/linux/syscalls.h
> @@ -228,6 +228,13 @@ struct perf_event_attr;
> #define ARCH_COMPAT_SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, arch_compat_sys_##name, __VA_ARGS__)
> #define ARCH_COMPAT_SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, arch_compat_sys_##name, __VA_ARGS__)
>
> +#define COMPAT_SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, compat_sys_##name, __VA_ARGS__)
> +#define COMPAT_SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, compat_sys_##name, __VA_ARGS__)
> +#define COMPAT_SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, compat_sys_##name, __VA_ARGS__)
> +#define COMPAT_SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, compat_sys_##name, __VA_ARGS__)
> +#define COMPAT_SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, compat_sys_##name, __VA_ARGS__)
> +#define COMPAT_SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, compat_sys_##name, __VA_ARGS__)
> +
For architectures which select CONFIG_HAVE_SYSCALL_WRAPPERS this adds
unnecessary sign extension code to each compat syscall.
On the other hand we could get rid partly of the arch specific sign extension
code but that would need some other changes before as well.
For example this one:
asmlinkage long compat_sys_gettimeofday(struct compat_timeval __user *tv,
struct timezone __user *tz)
should be converted to a function which takes two compat_uptr_t's and let
the syscall code itself do the proper pointer conversion (compat_ptr()).
Besides that the syscall alias names for these compat calls do look a
bit strange:
000000000008b57c T SyScompat_sys_adjtimex
000000000008b57c T compat_sys_adjtimex
That needs to be fixed as well.
Or simply add a 1:1 wrapper independent of CONFIG_HAVE_SYSCALL_WRAPPERS.
next prev parent reply other threads:[~2010-02-28 10:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 21:36 [PATCH 00/12] tracing: add compat syscall support v2 Jason Baron
2010-02-26 21:37 ` [PATCH 01/12] x86: add NR_syscalls_compat, make ia32 syscall table visible Jason Baron
2010-02-26 21:37 ` [PATCH 02/12] x86: add arch_compat_syscall_addr() Jason Baron
2010-02-26 21:37 ` [PATCH 03/12] compat: have generic is_compat_task for !CONFIG_COMPAT Jason Baron
2010-02-26 21:37 ` [PATCH 04/12] tracing: remove syscall bitmaps in preparation for compat support Jason Baron
2010-02-26 21:37 ` [PATCH 05/12] tracing: add tracing support for compat syscalls Jason Baron
2010-02-26 21:37 ` [PATCH 06/12] syscalls: add ARCH_COMPAT_SYSCALL_DEFINE() Jason Baron
2010-02-26 21:37 ` [PATCH 07/12] x86, compat: convert ia32 layer to use ARCH_COMPAT_SYSCALL_DEFINE#N() Jason Baron
2010-02-26 21:37 ` [PATCH 08/12] syscalls: add new COMPAT_SYSCALL_DEFINE#N() macro Jason Baron
2010-02-28 10:09 ` Heiko Carstens [this message]
2010-03-01 21:05 ` Jason Baron
2010-03-02 6:40 ` Heiko Carstens
2010-02-26 21:37 ` [PATCH 09/12] compat: convert to use COMPAT_SYSCALL_DEFINE#N() Jason Baron
2010-02-26 21:37 ` [PATCH 10/12] compat: convert fs compat to use COMPAT_SYSCALL_DEFINE#N() macros Jason Baron
2010-02-26 21:37 ` [PATCH 11/12] tags: recognize syscalls Jason Baron
2010-02-26 21:37 ` [PATCH 12/12] cleanup: remove arg from TRACE_SYS_ENTER_PROFILE_INIT() macro Jason Baron
2010-03-10 3:25 ` [PATCH 00/12] tracing: add compat syscall support v2 Frederic Weisbecker
2010-03-10 19:03 ` Frederic Weisbecker
2010-03-11 22:12 ` Jason Baron
2010-03-12 3:27 ` Frederic Weisbecker
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=20100228100902.GA2330@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=brueckner@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=jbaron@redhat.com \
--cc=laijs@cn.fujitsu.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
/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