System call registration mess?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux