Re: [PATCH 5/6] syscalls: add define syscall prefix macro

Heiko Carstens
2010-02-03T13:01:11Z

On Tue, Feb 02, 2010 at 04:21:55PM -0500, Jason Baron wrote:
> Add a new 'SYSCALL_PREFIX_DEFINE#()' style macro to include/linux/syscalls.h.
> This allows us to create syscalls via:
>
> SYSCALL_PREFIX_DEFINE1(32_, mmap, struct mmap_arg_struct __user *, arg);
>
> The standard 'SYSCALL_DEFINE#()' macro forces 'sys_blah', but for the 32 compat
> calls we want 'sys32_blah'.

Not really. That's what you want for x86. But the generic name for compat syscalls
is compat_sys_whatever. The arch specific compat syscalls don't follow a common
naming scheme (yet).
Especially if you consider the idea to get automated correct sign extension via
hpa's planned script for compat syscalls it would be good if you would just name
that define something like SYSCALL_COMPAT.. or COMPAT_SYSCALL..
That way it would be easy to add a hook in there.