public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* System call registration mess?
@ 2005-07-13  1:18 Wieland Gmeiner
  0 siblings, 0 replies; only message in thread
From: Wieland Gmeiner @ 2005-07-13  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wieland Gmeiner

I want to register a new system call and notice that on several
architectures there is some inconsistency between the system call table
and unistd.h, e.g. (2.6.13-rc2):

in arch/arm/kernel/calls.S:
...
/* 310 */       .long   sys_request_key
                .long   sys_keyctl
                .long   sys_semtimedop
__syscall_end:
...

and in include/asm-arm/unistd.h:
...
#define __NR_request_key                (__NR_SYSCALL_BASE+310)
#define __NR_keyctl                     (__NR_SYSCALL_BASE+311)

#if 0 /* reserved for un-muxing ipc */
#define __NR_semtimedop                 (__NR_SYSCALL_BASE+312)
#endif

#define __NR_vserver                    (__NR_SYSCALL_BASE+313)

/*
 * The following SWIs are ARM private.
 */
#define __ARM_NR_BASE                   (__NR_SYSCALL_BASE+0x0f0000)
...


So it seems that sys_vserver is not declared in the system call table.
Is there any reason for this inconsistency or is this a bug and should
be fixed? If second, should there be something like
.long       sys_ni_syscall           /* reserved for vserver */
 or
.long       sys_vserver
in the syscall table?

Similar inconsistencies can be found in other architecture subtrees,
e.g. in arm26:

arch/arm26/kernel/calls.S:
...
/* 235 */       .long   sys_removexattr
                .long   sys_lremovexattr
                .long   sys_fremovexattr
                .long   sys_tkill
__syscall_end:
...

in include/asm-arm26/unistd.h there is a whole bunch of calls that are
not registered in the system call table:

#define __NR_tkill                      (__NR_SYSCALL_BASE+238)
#define __NR_sendfile64                 (__NR_SYSCALL_BASE+239)
#define __NR_futex                      (__NR_SYSCALL_BASE+240)
...
#define __NR_mq_notify                  (__NR_SYSCALL_BASE+278)
#define __NR_mq_getsetattr              (__NR_SYSCALL_BASE+279)
#define __NR_waitid                     (__NR_SYSCALL_BASE+280)

Should they all get filled up with sys_ni_syscall definitions or with 
their corresponding entries so I can enter my own syscall at the bottom
with correct numbering or what is the proper way to register a new 
syscall in these cases?

Thanks,
Wieland


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-13  1:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-13  1:18 System call registration mess? Wieland Gmeiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox