missing syscalls
I have run the "missing syscalls" check for the cross compilers I have available at the moment.
alpha: 38
arm: 8
mips: 3
sparc: 4
sparc64: 0x86_64: 2
ia64: 10
i386: 0 (this is the reference anyway)
Result is pasted in below.
Sam
============== alpha ================
CALL /home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:128:2: warning: #warning syscall creat not implemented <stdin>:148:2: warning: #warning syscall time not implemented <stdin>:176:2: warning: #warning syscall getpid not implemented <stdin>:192:2: warning: #warning syscall getuid not implemented <stdin>:204:2: warning: #warning syscall alarm not implemented <stdin>:212:2: warning: #warning syscall pause not implemented <stdin>:216:2: warning: #warning syscall utime not implemented <stdin>:284:2: warning: #warning syscall getgid not implemented <stdin>:292:2: warning: #warning syscall geteuid not implemented <stdin>:296:2: warning: #warning syscall getegid not implemented <stdin>:352:2: warning: #warning syscall getppid not implemented <stdin>:688:2: warning: #warning syscall fdatasync not implemented <stdin>:1220:2: warning: #warning syscall kexec_load not implemented <stdin>:1260:2: warning: #warning syscall migrate_pages not implemented <stdin>:1264:2: warning: #warning syscall openat not implemented <stdin>:1268:2: warning: #warning syscall mkdirat not implemented <stdin>:1272:2: warning: #warning syscall mknodat not implemented <stdin>:1276:2: warning: #warning syscall fchownat not implemented <stdin>:1280:2: warning: #warning syscall futimesat not implemented <stdin>:1288:2: warning: #warning syscall unlinkat not implemented <stdin>:1292:2: warning: #warning syscall renameat not implemented <stdin>:1296:2: warning: #warning syscall linkat not implemented <stdin>:1300:2: warning: #warning syscall symlinkat not implemented <stdin>:1304:2: warning: #warning syscall readlinkat not implemented <stdin>:1308:2: warning: #warning syscall fchmodat not implemented <stdin>:1312:2: warning: #warning syscall faccessat not implemented <stdin>:1316:2: warning: #warning syscall pselect6 not implemented <stdin>:1320:2: warning: #warning syscall ppoll not implemented <stdin>:1324:2: warning: #warning syscall unshare not implemented <stdin>:1328:2: warning: #warning syscall set_robust_list not implemented <stdin>:1332:2: warning: #warning syscall get_robust_list not implemented <stdin>:1336:2: warning: #warning syscall splice not implemented <stdin>:1340:2: warning: #warning syscall sync_file_range not implemented <stdin>:1344:2: warning: #warning syscall tee not implemented <stdin>:1348:2: warning: #warning syscall vmsplice not implemented <stdin>:1352:2: warning: #warning syscall move_pages not implemented <stdin>:1356:2: warning: #warning syscall getcpu not implemented <stdin>:1360:2: warning: #warning syscall epoll_pwait not implemented
============== arm ================
CALL /home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1092:2: warning: #warning syscall fadvise64 not implemented <stdin>:1176:2: warning: #warning syscall fadvise64_64 not implemented <stdin>:1220:2: warning: #warning syscall kexec_load not implemented <stdin>:1260:2: warning: #warning syscall migrate_pages not implemented <stdin>:1316:2: warning: #warning syscall pselect6 not implemented <stdin>:1320:2: warning: #warning syscall ppoll not implemented <stdin>:1340:2: warning: #warning syscall sync_file_range not implemented <stdin>:1360:2: warning: #warning syscall epoll_pwait not implemented
============== mips ================
CALL /home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:424:2: warning: #warning syscall select not implemented <stdin>:856:2: warning: #warning syscall vfork not implemented <stdin>:1176:2: warning: #warning syscall fadvise64_64 not implemented
============== sparc ================
CALL /home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:752:2: warning: #warning syscall setresuid not implemented <stdin>:756:2: warning: #warning syscall getresuid not implemented <stdin>:776:2: warning: #warning syscall setresgid not implemented <stdin>:780:2: warning: #warning syscall getresgid not implemented
============== sparc64 ================
CALL /home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
============== x86_64 ================
CALL /home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1356:2: warning: #warning syscall getcpu not implemented <stdin>:1360:2: warning: #warning syscall epoll_pwait not implemented
============== ia64 ================
CALL /home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:104:2: warning: #warning syscall fork not implemented <stdin>:148:2: warning: #warning syscall time not implemented <stdin>:204:2: warning: #warning syscall alarm not implemented <stdin>:212:2: warning: #warning syscall pause not implemented <stdin>:216:2: warning: #warning syscall utime not implemented <stdin>:356:2: warning: #warning syscall getpgrp not implemented <stdin>:856:2: warning: #warning syscall vfork not implemented <stdin>:1316:2: warning: #warning syscall pselect6 not implemented <stdin>:1320:2: warning: #warning syscall ppoll not implemented <stdin>:1360:2: warning: #warning syscall epoll_pwait not implemented
Quoted 3 lines · Sam Ravnborg
============== arm ================
CALL/home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1092:2: warning: #warning syscall fadvise64 not implemented
and probably never will be.
Quoted 1 line
<stdin>:1220:2: warning: #warning syscall
kexec_loadnot implemented
For the ARM kexec-using folk to decide.
Quoted 1 line
<stdin>:1260:2: warning: #warning syscall
migrate_pagesnot implemented
Does this make sense for ARM? I've no idea.
Quoted 2 lines
<stdin>:1176:2: warning: #warning syscall
fadvise64_64not implemented <stdin>:1340:2: warning: #warning syscallsync_file_rangenot implemented
These two are replaced by a special ARM version which sane argument ordering. My patch for a previous version of the syscall check stuff shut these warnings up.
Quoted 3 lines
<stdin>:1316:2: warning: #warning syscall pselect6 not implemented <stdin>:1320:2: warning: #warning syscall ppoll not implemented <stdin>:1360:2: warning: #warning syscall
epoll_pwaitnot implemented
Maybe sometime in the future.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 13 lines · Russell King
Quoted 3 lines · Sam Ravnborg
============== arm ================
CALL/home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1092:2: warning: #warning syscall fadvise64 not implementedand probably never will be.
Quoted 1 line
<stdin>:1220:2: warning: #warning syscall
kexec_loadnot implementedFor the ARM kexec-using folk to decide.
Quoted 1 line
<stdin>:1260:2: warning: #warning syscall
migrate_pagesnot implemented
Quoted 8 lines
Does this make sense for ARM? I've no idea.
Quoted 2 lines
<stdin>:1176:2: warning: #warning syscall
fadvise64_64not implemented <stdin>:1340:2: warning: #warning syscallsync_file_rangenot implementedThese two are replaced by a special ARM version which sane argument ordering. My patch for a previous version of the syscall check stuff shut these warnings up.
Should they be ignored only for arm (and arm26?) or in general?
Sam
Quoted 11 lines · Sam Ravnborg
Quoted 10 lines · Russell King
Quoted 3 lines · Sam Ravnborg
============== arm ================
CALL/home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1092:2: warning: #warning syscall fadvise64 not implementedand probably never will be.
Quoted 1 line
<stdin>:1220:2: warning: #warning syscall
kexec_loadnot implementedFor the ARM kexec-using folk to decide.
Actually, this is the result of a typo, and should be fixed.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
<stdin>:1260:2: warning: #warning syscall
migrate_pagesnot implementedDoes this make sense for ARM? I've no idea.
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
<stdin>:1176:2: warning: #warning syscall
fadvise64_64not implemented <stdin>:1340:2: warning: #warning syscallsync_file_rangenot implementedThese two are replaced by a special ARM version which sane argument ordering. My patch for a previous version of the syscall check stuff shut these warnings up.
Should they be ignored only for arm (and arm26?) or in general?
for ARM only, as per my original patch.
+#define __IGNORE_fadvise64_64 /* we provide our own - see above */
+#define __IGNORE_sync_file_range /* we provide our own - see above */
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
From: Russell King <[email protected]>
Date: Sun, 1 Apr 2007 20:15:12 +0100
Quoted 7 lines · Sam Ravnborg
Quoted 3 lines
============== arm ================
CALL/home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1092:2: warning: #warning syscall fadvise64 not implementedand probably never will be.
Quoted 7 lines
Quoted 1 line
<stdin>:1220:2: warning: #warning syscall
kexec_loadnot implementedFor the ARM kexec-using folk to decide.
Quoted 1 line
<stdin>:1260:2: warning: #warning syscall
migrate_pagesnot implementedDoes this make sense for ARM? I've no idea.
You should hook both of these syscalls up even if the config option that enables them usually is not, or cannot currently be, enabled.
The cond_syscall()'s will make sure they always link properly and provide a -ENOSYS implementation.
Hooking them up makes it easier to check future missed cases without us having to add a plethora of ifdefs to the missing syscall checks for each platform.
Quoted 9 lines · David Miller
You should hook both of these syscalls up even if the config option that enables them usually is not, or cannot currently be, enabled.
The cond_syscall()'s will make sure they always link properly and provide a
-ENOSYSimplementation.Hooking them up makes it easier to check future missed cases without us having to add a plethora of ifdefs to the missing syscall checks for each platform.
I haven't looked at the missing syscall check implementation, but it seems like it's poorly designed if we have to add ifdefs for each arch. Why not allow arches a mechanism to state which syscalls they intentionally don't implement?
From: Matthew Wilcox <[email protected]>
Date: Sun, 1 Apr 2007 14:09:47 -0600
Quoted 4 lines
I haven't looked at the missing syscall check implementation, but it seems like it's poorly designed if we have to add ifdefs for each arch. Why not allow arches a mechanism to state which syscalls they intentionally don't implement?
The whole idea is for the arch's to just find out that a new syscall exists when someone adds a new one and some tries a build on that platform the next time. If the arch's still have to do work then the whole exercise is pointless.
Quoted 8 lines · David Miller
From: Matthew Wilcox <[email protected]>
Date: Sun, 1 Apr 2007 14:09:47 -0600Quoted 4 lines
I haven't looked at the missing syscall check implementation, but it seems like it's poorly designed if we have to add ifdefs for each arch. Why not allow arches a mechanism to state which syscalls they intentionally don't implement?
Quoted 4 lines
The whole idea is for the arch's to just find out that a new syscall exists when someone adds a new one and some tries a build on that platform the next time. If the arch's still have to do work then the whole exercise is pointless.
By and large, the missing syscalls are older ones, eg socketcall or utime, and they tend to be missing for good reason. I think it's entirely appropriate that the arch has to do work when a new syscall is added -- either implement it, or state that it's not supposed to be implemented.
Quoted 7 lines · Matthew Wilcox
Quoted 6 lines · David Miller
You should hook both of these syscalls up even if the config option that enables them usually is not, or cannot currently be, enabled.
The cond_syscall()'s will make sure they always link properly and provide a
-ENOSYSimplementation.
Quoted 8 lines
Quoted 3 lines
Hooking them up makes it easier to check future missed cases without us having to add a plethora of ifdefs to the missing syscall checks for each platform.
I haven't looked at the missing syscall check implementation, but it seems like it's poorly designed if we have to add ifdefs for each arch. Why not allow arches a mechanism to state which syscalls they intentionally don't implement?
It's a stupid script so it is easy to fool.
The following patch makes x86_64 shut up:
include/asm-x86_64/unistd.h +3 -0
@@ -620,6 +620,9 @@ __SYSCALL(__NR_vmsplice, sys_vmsplice)#define __NR_move_pages 279 __SYSCALL(__NR_move_pages, sys_move_pages) +#define __NR_getcpu/* 318 - not relevant */ +#define __NR_epoll_pwait/* 319 - not relevant */ +#define __NR_syscall_max __NR_move_pages#ifndef __NO_STUBS
NOTE - I am NOT proposing this patch. It is purely an example how to in an arch specific fashion to shut up the syscall check.
Quoted 25 lines · Sam Ravnborg
Quoted 7 lines · Matthew Wilcox
Quoted 6 lines · David Miller
You should hook both of these syscalls up even if the config option that enables them usually is not, or cannot currently be, enabled.
The cond_syscall()'s will make sure they always link properly and provide a
-ENOSYSimplementation.Quoted 8 lines
Quoted 3 lines
Hooking them up makes it easier to check future missed cases without us having to add a plethora of ifdefs to the missing syscall checks for each platform.
I haven't looked at the missing syscall check implementation, but it seems like it's poorly designed if we have to add ifdefs for each arch. Why not allow arches a mechanism to state which syscalls they intentionally don't implement?
It's a stupid script so it is easy to fool.
The following patch makesx86_64shut up:include/asm-x86_64/unistd.h +0
-0
include/asm-x86_64/unistd.h __SYSCALL(__NR_vmsplice, sys_vmsplice) · line 625
Quoted 6 lines
include/asm-x86_64/unistd.h +3
-0@@ -620,6 +620,9 @@ __SYSCALL(__NR_vmsplice, sys_vmsplice)#define __NR_move_pages 279 __SYSCALL(__NR_move_pages, sys_move_pages) +#define __NR_getcpu/* 318 - not relevant */ +#define __NR_epoll_pwait/* 319 - not relevant */ +
If a syscall is not relevant, define __IGNORE_getcpu etc instead.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Arnd Bergmann
maintainerinclude/asm-x86_64/unistd.h __SYSCALL(__NR_vmsplice, sys_vmsplice) · line 624
Quoted 2 lines · On Sunday 01 April 2007 22:19:29 Sam Ravnborg wrote:
include/asm-x86_64/unistd.h +2
-0+#define __NR_getcpu/* 318 - not relevant */ +#define __NR_epoll_pwait/* 319 - not relevant */
This looks like it is potentially harmful, since it breaks user space code that does things like
int my_getcpy(void)
{
#ifdef __NR_getcpu return syscall(__NR_getcpu); #endif return -1; }
Arnd <><
Quoted 4 lines
==============
x86_64================
CALL/home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1356:2: warning: #warning syscall getcpu not implemented
It's implemented as a vsyscall.
Quoted 1 line
<stdin>:1360:2: warning: #warning syscall
epoll_pwaitnot implemented
That one is missing.
-Andi
Quoted 6 lines · Andi Kleen
Quoted 4 lines
==============
x86_64================
CALL/home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1356:2: warning: #warning syscall getcpu not implementedIt's implemented as a vsyscall.
Can I assume you take care of silence the warning? A dummy entry in unistd will do the trick.
Sam
Quoted 10 lines · Sam Ravnborg
Quoted 6 lines · Andi Kleen
Quoted 4 lines
==============
x86_64================
CALL/home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1356:2: warning: #warning syscall getcpu not implementedIt's implemented as a vsyscall.
Can I assume you take care of silence the warning? A dummy entry in unistd will do the trick.
As Arnd points out that would break reasonable user space checks.
-Andi
Quoted 7 lines · Andi Kleen
Quoted 6 lines · Sam Ravnborg
Quoted 5 lines · Andi Kleen
Quoted 4 lines
==============
x86_64================
CALL/home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:1356:2: warning: #warning syscall getcpu not implemented
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It's implemented as a vsyscall.
Can I assume you take care of silence the warning? A dummy entry in unistd will do the trick.
As Arnd points out that would break reasonable user space checks.
Actually, this specific case would also be wrong -- you wouldn't want programs to return -1, you'd want them to call the vsyscall.
From: Sam Ravnborg <[email protected]>
Date: Sun, 1 Apr 2007 18:01:23 +0200
Quoted 6 lines
============== sparc ================
CALL/home/sam/kernel/kbuild.git/scripts/checksyscalls.sh
<stdin>:752:2: warning: #warning syscall setresuid not implemented <stdin>:756:2: warning: #warning syscall getresuid not implemented <stdin>:776:2: warning: #warning syscall setresgid not implemented <stdin>:780:2: warning: #warning syscall getresgid not implemented
I figured out what was going on here.
Sparc 32-bit only has the "setresuid32", "getresuid32" variants, it never had the plain ones and there is no value to adding those old versions into the syscall table.