[目次] [HOME]

システムコールとカーネルの関数

システムコールの番号とカーネルソース中でシステムコールを実装している関数を バージョン 2.0, 2.2, 2.4(2.4-test4) に関してまとめた. 表中で______ となっている項目は sys_ni_syscall(void) で実装しているが,呼ぶと エラーを返す.

システムコールの名前は linux/include/asm-i386/unistd.h で定義されている __NR_fork などから __NR_ を除いたもので示している.

2.2系列と2.4系列の差は uid, gid が32ビットに拡張された部分が主で上位互換となっている模様.

2.4-test5
2.2.14 2.0.38
No. 名前 (unistd.h) 関数名 (entry.S) 名前 (unistd.h) 関数名 (entry.S) 名前 (unistd.h) 関数名 (entry.S)
0   ______   ______ setup sys_setup
1 exit sys_exit exit sys_exit exit sys_exit
2 fork sys_fork fork sys_fork fork sys_fork
3 read sys_read read sys_read read sys_read
4 write sys_write write sys_write write sys_write
5 open sys_open open sys_open open sys_open
6 close sys_close close sys_close close sys_close
7 waitpid sys_waitpid waitpid sys_waitpid waitpid sys_waitpid
8 creat sys_creat creat sys_creat creat sys_creat
9 link sys_link link sys_link link sys_link
10 unlink sys_unlink unlink sys_unlink unlink sys_unlink
11 execve sys_execve execve sys_execve execve sys_execve
12 chdir sys_chdir chdir sys_chdir chdir sys_chdir
13 time sys_time time sys_time time sys_time
14 mknod sys_mknod mknod sys_mknod mknod sys_mknod
15 chmod sys_chmod chmod sys_chmod chmod sys_chmod
16 lchown sys_lchown16 lchown sys_lchown chown sys_chown
17 break ______ break ______ break sys_break
18 oldstat sys_stat oldstat sys_stat oldstat sys_stat
19 lseek sys_lseek lseek sys_lseek lseek sys_lseek
20 getpid sys_getpid getpid sys_getpid getpid sys_getpid
21 mount sys_mount mount sys_mount mount sys_mount
22 umount sys_oldumount umount sys_oldumount umount sys_umount
23 setuid sys_setuid16 setuid sys_setuid setuid sys_setuid
24 getuid sys_getuid16 getuid sys_getuid getuid sys_getuid
25 stime sys_stime stime sys_stime stime sys_stime
26 ptrace sys_ptrace ptrace sys_ptrace ptrace sys_ptrace
27 alarm sys_alarm alarm sys_alarm alarm sys_alarm
28 oldfstat sys_fstat oldfstat sys_fstat oldfstat sys_fstat
29 pause sys_pause pause sys_pause pause sys_pause
30 utime sys_utime utime sys_utime utime sys_utime
31 stty ______ stty ______ stty sys_stty
32 gtty ______ gtty ______ gtty sys_gtty
33 access sys_access access sys_access access sys_access
34 nice sys_nice nice sys_nice nice sys_nice
35 ftime ______ ftime ______ ftime sys_ftime
36 sync sys_sync sync sys_sync sync sys_sync
37 kill sys_kill kill sys_kill kill sys_kill
38 rename sys_rename rename sys_rename rename sys_rename
39 mkdir sys_mkdir mkdir sys_mkdir mkdir sys_mkdir
40 rmdir sys_rmdir rmdir sys_rmdir rmdir sys_rmdir
41 dup sys_dup dup sys_dup dup sys_dup
42 pipe sys_pipe pipe sys_pipe pipe sys_pipe
43 times sys_times times sys_times times sys_times
44 prof ______ prof ______ prof sys_prof
45 brk sys_brk brk sys_brk brk sys_brk
46 setgid sys_setgid16 setgid sys_setgid setgid sys_setgid
47 getgid sys_getgid16 getgid sys_getgid getgid sys_getgid
48 signal sys_signal signal sys_signal signal sys_signal
49 geteuid sys_geteuid16 geteuid sys_geteuid geteuid sys_geteuid
50 getegid sys_getegid16 getegid sys_getegid getegid sys_getegid
51 acct sys_acct acct sys_acct acct sys_acct
52 umount2 sys_umount umount2 sys_umount phys sys_phys
53 lock ______ lock ______ lock sys_lock
54 ioctl sys_ioctl ioctl sys_ioctl ioctl sys_ioctl
55 fcntl sys_fcntl fcntl sys_fcntl fcntl sys_fcntl
56 mpx ______ mpx ______ mpx sys_mpx
57 setpgid sys_setpgid setpgid sys_setpgid setpgid sys_setpgid
58 ulimit ______ ulimit ______ ulimit sys_ulimit
59 oldolduname sys_olduname oldolduname sys_olduname oldolduname sys_olduname
60 umask sys_umask umask sys_umask umask sys_umask
61 chroot sys_chroot chroot sys_chroot chroot sys_chroot
62 ustat sys_ustat ustat sys_ustat ustat sys_ustat
63 dup2 sys_dup2 dup2 sys_dup2 dup2 sys_dup2
64 getppid sys_getppid getppid sys_getppid getppid sys_getppid
65 getpgrp sys_getpgrp getpgrp sys_getpgrp getpgrp sys_getpgrp
66 setsid sys_setsid setsid sys_setsid setsid sys_setsid
67 sigaction sys_sigaction sigaction sys_sigaction sigaction sys_sigaction
68 sgetmask sys_sgetmask sgetmask sys_sgetmask sgetmask sys_sgetmask
69 ssetmask sys_ssetmask ssetmask sys_ssetmask ssetmask sys_ssetmask
70 setreuid sys_setreuid16 setreuid sys_setreuid setreuid sys_setreuid
71 setregid sys_setregid16 setregid sys_setregid setregid sys_setregid
72 sigsuspend sys_sigsuspend sigsuspend sys_sigsuspend sigsuspend sys_sigsuspend
73 sigpending sys_sigpending sigpending sys_sigpending sigpending sys_sigpending
74 sethostname sys_sethostname sethostname sys_sethostname sethostname sys_sethostname
75 setrlimit sys_setrlimit setrlimit sys_setrlimit setrlimit sys_setrlimit
76 getrlimit sys_old_getrlimit getrlimit sys_getrlimit getrlimit sys_getrlimit
77 getrusage sys_getrusage getrusage sys_getrusage getrusage sys_getrusage
78 gettimeofday sys_gettimeofday gettimeofday sys_gettimeofday gettimeofday sys_gettimeofday
79 settimeofday sys_settimeofday settimeofday sys_settimeofday settimeofday sys_settimeofday
80 getgroups sys_getgroups16 getgroups sys_getgroups getgroups sys_getgroups
81 setgroups sys_setgroups16 setgroups sys_setgroups setgroups sys_setgroups
82 select old_select select old_select select old_select
83 symlink sys_symlink symlink sys_symlink symlink sys_symlink
84 oldlstat sys_lstat oldlstat sys_lstat oldlstat sys_lstat
85 readlink sys_readlink readlink sys_readlink readlink sys_readlink
86 uselib sys_uselib uselib sys_uselib uselib sys_uselib
87 swapon sys_swapon swapon sys_swapon swapon sys_swapon
88 reboot sys_reboot reboot sys_reboot reboot sys_reboot
89 readdir old_readdir readdir old_readdir readdir old_readdir
90 mmap old_mmap mmap old_mmap mmap old_mmap
91 munmap sys_munmap munmap sys_munmap munmap sys_munmap
92 truncate sys_truncate truncate sys_truncate truncate sys_truncate
93 ftruncate sys_ftruncate ftruncate sys_ftruncate ftruncate sys_ftruncate
94 fchmod sys_fchmod fchmod sys_fchmod fchmod sys_fchmod
95 fchown sys_fchown16 fchown sys_fchown fchown sys_fchown
96 getpriority sys_getpriority getpriority sys_getpriority getpriority sys_getpriority
97 setpriority sys_setpriority setpriority sys_setpriority setpriority sys_setpriority
98 profil ______ profil ______ profil sys_profil
99 statfs sys_statfs statfs sys_statfs statfs sys_statfs
100 fstatfs sys_fstatfs fstatfs sys_fstatfs fstatfs sys_fstatfs
101 ioperm sys_ioperm ioperm sys_ioperm ioperm sys_ioperm
102 socketcall sys_socketcall socketcall sys_socketcall socketcall sys_socketcall
103 syslog sys_syslog syslog sys_syslog syslog sys_syslog
104 setitimer sys_setitimer setitimer sys_setitimer setitimer sys_setitimer
105 getitimer sys_getitimer getitimer sys_getitimer getitimer sys_getitimer
106 stat sys_newstat stat sys_newstat stat sys_newstat
107 lstat sys_newlstat lstat sys_newlstat lstat sys_newlstat
108 fstat sys_newfstat fstat sys_newfstat fstat sys_newfstat
109 olduname sys_uname olduname sys_uname olduname sys_uname
110 iopl sys_iopl iopl sys_iopl iopl sys_iopl
111 vhangup sys_vhangup vhangup sys_vhangup vhangup sys_vhangup
112 idle ______ idle sys_idle idle sys_idle
113 vm86old sys_vm86old vm86old sys_vm86old vm86 sys_vm86old
114 wait4 sys_wait4 wait4 sys_wait4 wait4 sys_wait4
115 swapoff sys_swapoff swapoff sys_swapoff swapoff sys_swapoff
116 sysinfo sys_sysinfo sysinfo sys_sysinfo sysinfo sys_sysinfo
117 ipc sys_ipc ipc sys_ipc ipc sys_ipc
118 fsync sys_fsync fsync sys_fsync fsync sys_fsync
119 sigreturn sys_sigreturn sigreturn sys_sigreturn sigreturn sys_sigreturn
120 clone sys_clone clone sys_clone clone sys_clone
121 setdomainname sys_setdomainname setdomainname sys_setdomainname setdomainname sys_setdomainname
122 uname sys_newuname uname sys_newuname uname sys_newuname
123 modify_ldt sys_modify_ldt modify_ldt sys_modify_ldt modify_ldt sys_modify_ldt
124 adjtimex sys_adjtimex adjtimex sys_adjtimex adjtimex sys_adjtimex
125 mprotect sys_mprotect mprotect sys_mprotect mprotect sys_mprotect
126 sigprocmask sys_sigprocmask sigprocmask sys_sigprocmask sigprocmask sys_sigprocmask
127 create_module sys_create_module create_module sys_create_module create_module sys_create_module
128 init_module sys_init_module init_module sys_init_module init_module sys_init_module
129 delete_module sys_delete_module delete_module sys_delete_module delete_module sys_delete_module
130 get_kernel_syms sys_get_kernel_syms get_kernel_syms sys_get_kernel_syms get_kernel_syms sys_get_kernel_syms
131 quotactl sys_quotactl quotactl sys_quotactl quotactl sys_quotactl
132 getpgid sys_getpgid getpgid sys_getpgid getpgid sys_getpgid
133 fchdir sys_fchdir fchdir sys_fchdir fchdir sys_fchdir
134 bdflush sys_bdflush bdflush sys_bdflush bdflush sys_bdflush
135 sysfs sys_sysfs sysfs sys_sysfs sysfs sys_sysfs
136 personality sys_personality personality sys_personality personality sys_personality
137 afs_syscall ______ afs_syscall ______ afs_syscall 0
138 setfsuid sys_setfsuid16 setfsuid sys_setfsuid setfsuid sys_setfsuid
139 setfsgid sys_setfsgid16 setfsgid sys_setfsgid setfsgid sys_setfsgid
140 _llseek sys_llseek _llseek sys_llseek _llseek sys_llseek
141 getdents sys_getdents getdents sys_getdents getdents sys_getdents
142 _newselect sys_select _newselect sys_select _newselect sys_select
143 flock sys_flock flock sys_flock flock sys_flock
144 msync sys_msync msync sys_msync msync sys_msync
145 readv sys_readv readv sys_readv readv sys_readv
146 writev sys_writev writev sys_writev writev sys_writev
147 getsid sys_getsid getsid sys_getsid getsid sys_getsid
148 fdatasync sys_fdatasync fdatasync sys_fdatasync fdatasync sys_fdatasync
149 _sysctl sys_sysctl _sysctl sys_sysctl _sysctl sys_sysctl
150 mlock sys_mlock mlock sys_mlock mlock sys_mlock
151 munlock sys_munlock munlock sys_munlock munlock sys_munlock
152 mlockall sys_mlockall mlockall sys_mlockall mlockall sys_mlockall
153 munlockall sys_munlockall munlockall sys_munlockall munlockall sys_munlockall
154 sched_setparam sys_sched_setparam sched_setparam sys_sched_setparam sched_setparam sys_sched_setparam
155 sched_getparam sys_sched_getparam sched_getparam sys_sched_getparam sched_getparam sys_sched_getparam
156 sched_setscheduler sys_sched_setscheduler sched_setscheduler sys_sched_setscheduler sched_setscheduler sys_sched_setscheduler
157 sched_getscheduler sys_sched_getscheduler sched_getscheduler sys_sched_getscheduler sched_getscheduler sys_sched_getscheduler
158 sched_yield sys_sched_yield sched_yield sys_sched_yield sched_yield sys_sched_yield
159 sched_get_priority_max sys_sched_get_priority_max sched_get_priority_max sys_sched_get_priority_max sched_get_priority_max sys_sched_get_priority_max
160 sched_get_priority_min sys_sched_get_priority_min sched_get_priority_min sys_sched_get_priority_min sched_get_priority_min sys_sched_get_priority_min
161 sched_rr_get_interval sys_sched_rr_get_interval sched_rr_get_interval sys_sched_rr_get_interval sched_rr_get_interval sys_sched_rr_get_interval
162 nanosleep sys_nanosleep nanosleep sys_nanosleep nanosleep sys_nanosleep
163 mremap sys_mremap mremap sys_mremap mremap sys_mremap
164 setresuid sys_setresuid16 setresuid sys_setresuid   
165 getresuid sys_getresuid16 getresuid sys_getresuid   
166 vm86 sys_vm86 vm86 sys_vm86   sys_vm86
167 query_module sys_query_module query_module sys_query_module   
168 poll sys_poll poll sys_poll poll  
169 nfsservctl sys_nfsservctl nfsservctl sys_nfsservctl   
170 setresgid sys_setresgid16 setresgid sys_setresgid   
171 getresgid sys_getresgid16 getresgid sys_getresgid   
172 prctl sys_prctl prctl sys_prctl   
173 rt_sigreturn sys_rt_sigreturn rt_sigreturn sys_rt_sigreturn   
174 rt_sigaction sys_rt_sigaction rt_sigaction sys_rt_sigaction   
175 rt_sigprocmask sys_rt_sigprocmask rt_sigprocmask sys_rt_sigprocmask   
176 rt_sigpending sys_rt_sigpending rt_sigpending sys_rt_sigpending   
177 rt_sigtimedwait sys_rt_sigtimedwait rt_sigtimedwait sys_rt_sigtimedwait   
178 rt_sigqueueinfo sys_rt_sigqueueinfo rt_sigqueueinfo sys_rt_sigqueueinfo   
179 rt_sigsuspend sys_rt_sigsuspend rt_sigsuspend sys_rt_sigsuspend   
180 pread sys_pread pread sys_pread   
181 pwrite sys_pwrite pwrite sys_pwrite   
182 chown sys_chown16 chown sys_chown   
183 getcwd sys_getcwd getcwd sys_getcwd   
184 capget sys_capget capget sys_capget   
185 capset sys_capset capset sys_capset   
186 sigaltstack sys_sigaltstack sigaltstack sys_sigaltstack   
187 sendfile sys_sendfile sendfile sys_sendfile   
188 getpmsg sys_ni_syscall getpmsg ______ getpmsg
189 putpmsg sys_ni_syscall putpmsg ______ putpmsg
190 vfork sys_vfork vfork sys_vfork   
191 ugetrlimit sys_getrlimit     
192 mmap2 sys_mmap2     
193 truncate64 sys_truncate64     
194 ftruncate64 sys_ftruncate64     
195 stat64 sys_stat64     
196 lstat64 sys_lstat64     
197 fstat64 sys_fstat64     
198 lchown32 sys_lchown     
199 getuid32 sys_getuid     
200 getgid32 sys_getgid     
201 geteuid32 sys_geteuid     
202 getegid32 sys_getegid     
203 setreuid32 sys_setreuid     
204 setregid32 sys_setregid     
205 getgroups32 sys_getgroups     
206 setgroups32 sys_setgroups     
207 fchown32 sys_fchown     
208 setresuid32 sys_setresuid     
209 getresuid32 sys_getresuid     
210 setresgid32 sys_setresgid     
211 getresgid32 sys_getresgid     
212 chown32 sys_chown     
213 setuid32 sys_setuid     
214 setgid32 sys_setgid     
215 setfsuid32 sys_setfsuid     
216 setfsgid32 sys_setfsgid     
217 pivot_root sys_pivot_root     
218 mincore sys_mincore     
219 madvise sys_madvise