lkml.org 
[lkml]   [2007]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: -mm merge plans for 2.6.21
From
Date
On Fri, 2007-02-09 at 22:12 +0000, David Woodhouse wrote:
>
> We could _also_ do with a way to warn about unimplemented syscalls on
> any given architecture. I'm thinking about something along the lines
> of
> a kernel/syscalls.c containing nothing but...
>
> #include <asm/unistd.h>
>
> #ifndef __NR_sys_foo
> #warning The sys_foo system call is not implemented on this
> architecture
> #endif
>
> Ideally, that wants to be auto-generated from the union of all
> <asm-*/unistd.h> files, but in practice I suspect we could do it just
> from <asm-i386/unistd.h>. Even I usually manage to add new syscalls on
> i386 after I've done PowerPC.

Realistically speaking, I'm not going to have time to do anything useful
with this before I disappear for a week starting tomorrow. But in case
it helps, I'll throw this in to see if it inspires anyone...

( echo -e "#include <asm/unistd.h>\n#include
<asm-generic/optional-syscalls.h>" ; sed -n '/^#define/s/[^_]*__NR_
\([^[:space:]]*\).*/#if !defined (__NR_\1) \&\& !defined (__IGNORE_
\1)\n#warning System call \1 is not implemented\n#endif/p'
include/asm-i386/unistd.h ) > kernel/syscalls.c

Coupled with an include/optional-syscalls.h which defines __IGNORE_vm86,
__IGNORE_vm86old and then on 64-bit machines a bunch more
__IGNORE_stat64 et al., that should mostly do the trick...

--
dwmw2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-09 23:45    [W:0.067 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site