aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2005-05-01 11:58:55 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:58:55 -0400
commitddcd6b175793839e51fdd55debb670a9f512c448 (patch)
tree6a7e9f003eec5a9f62ea8bbb0645eb6595afffdb
parent5e7b83ffc67e15791d9bf8b2a18e4f5fd0eb69b8 (diff)
[PATCH] uml: quick fix syscall table for x86_64
Fix the moved syscall table for the x86_64 SUBARCH: - redirect __NR_chown and such to versions aware of 32-bit UIDs, - avoid the useless hack for sys_nfsservctl, - use sys_sendfile64 in the table rather than sys_sendfile. - __NR_uselib is sys_ni_syscall on x86_64 (which does not support A.OUT). - __NR_getrlimit is sys_getrlimit, not sys_old_getrlimit Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/um/sys-x86_64/sys_call_table.c53
1 files changed, 24 insertions, 29 deletions
diff --git a/arch/um/sys-x86_64/sys_call_table.c b/arch/um/sys-x86_64/sys_call_table.c
index 3f5efbfb46de..a31e0dffb270 100644
--- a/arch/um/sys-x86_64/sys_call_table.c
+++ b/arch/um/sys-x86_64/sys_call_table.c
@@ -14,12 +14,6 @@
14#include "sysdep/syscalls.h" 14#include "sysdep/syscalls.h"
15#include "kern_util.h" 15#include "kern_util.h"
16 16
17#ifdef CONFIG_NFSD
18#define NFSSERVCTL sys_nfsservctl
19#else
20#define NFSSERVCTL sys_ni_syscall
21#endif
22
23#define LAST_GENERIC_SYSCALL __NR_keyctl 17#define LAST_GENERIC_SYSCALL __NR_keyctl
24 18
25#if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL 19#if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL
@@ -52,6 +46,7 @@ extern syscall_handler_t sys_get_mempolicy;
52extern syscall_handler_t sys_set_mempolicy; 46extern syscall_handler_t sys_set_mempolicy;
53extern syscall_handler_t sys_sys_setaltroot; 47extern syscall_handler_t sys_sys_setaltroot;
54 48
49/* On X86-64 all syscalls are aware of 32-bit [ug]ids, so I had to fix this!*/
55syscall_handler_t *sys_call_table[] = { 50syscall_handler_t *sys_call_table[] = {
56 [ __NR_restart_syscall ] = (syscall_handler_t *) sys_restart_syscall, 51 [ __NR_restart_syscall ] = (syscall_handler_t *) sys_restart_syscall,
57 [ __NR_exit ] = (syscall_handler_t *) sys_exit, 52 [ __NR_exit ] = (syscall_handler_t *) sys_exit,
@@ -72,12 +67,12 @@ syscall_handler_t *sys_call_table[] = {
72 [ __NR_time ] = um_time, 67 [ __NR_time ] = um_time,
73 [ __NR_mknod ] = (syscall_handler_t *) sys_mknod, 68 [ __NR_mknod ] = (syscall_handler_t *) sys_mknod,
74 [ __NR_chmod ] = (syscall_handler_t *) sys_chmod, 69 [ __NR_chmod ] = (syscall_handler_t *) sys_chmod,
75 [ __NR_lchown ] = (syscall_handler_t *) sys_lchown16, 70 [ __NR_lchown ] = (syscall_handler_t *) sys_lchown,
76 [ __NR_lseek ] = (syscall_handler_t *) sys_lseek, 71 [ __NR_lseek ] = (syscall_handler_t *) sys_lseek,
77 [ __NR_getpid ] = (syscall_handler_t *) sys_getpid, 72 [ __NR_getpid ] = (syscall_handler_t *) sys_getpid,
78 [ __NR_mount ] = (syscall_handler_t *) sys_mount, 73 [ __NR_mount ] = (syscall_handler_t *) sys_mount,
79 [ __NR_setuid ] = (syscall_handler_t *) sys_setuid16, 74 [ __NR_setuid ] = (syscall_handler_t *) sys_setuid,
80 [ __NR_getuid ] = (syscall_handler_t *) sys_getuid16, 75 [ __NR_getuid ] = (syscall_handler_t *) sys_getuid,
81 [ __NR_ptrace ] = (syscall_handler_t *) sys_ptrace, 76 [ __NR_ptrace ] = (syscall_handler_t *) sys_ptrace,
82 [ __NR_alarm ] = (syscall_handler_t *) sys_alarm, 77 [ __NR_alarm ] = (syscall_handler_t *) sys_alarm,
83 [ __NR_pause ] = (syscall_handler_t *) sys_pause, 78 [ __NR_pause ] = (syscall_handler_t *) sys_pause,
@@ -94,10 +89,10 @@ syscall_handler_t *sys_call_table[] = {
94 [ __NR_pipe ] = (syscall_handler_t *) sys_pipe, 89 [ __NR_pipe ] = (syscall_handler_t *) sys_pipe,
95 [ __NR_times ] = (syscall_handler_t *) sys_times, 90 [ __NR_times ] = (syscall_handler_t *) sys_times,
96 [ __NR_brk ] = (syscall_handler_t *) sys_brk, 91 [ __NR_brk ] = (syscall_handler_t *) sys_brk,
97 [ __NR_setgid ] = (syscall_handler_t *) sys_setgid16, 92 [ __NR_setgid ] = (syscall_handler_t *) sys_setgid,
98 [ __NR_getgid ] = (syscall_handler_t *) sys_getgid16, 93 [ __NR_getgid ] = (syscall_handler_t *) sys_getgid,
99 [ __NR_geteuid ] = (syscall_handler_t *) sys_geteuid16, 94 [ __NR_geteuid ] = (syscall_handler_t *) sys_geteuid,
100 [ __NR_getegid ] = (syscall_handler_t *) sys_getegid16, 95 [ __NR_getegid ] = (syscall_handler_t *) sys_getegid,
101 [ __NR_acct ] = (syscall_handler_t *) sys_acct, 96 [ __NR_acct ] = (syscall_handler_t *) sys_acct,
102 [ __NR_umount2 ] = (syscall_handler_t *) sys_umount, 97 [ __NR_umount2 ] = (syscall_handler_t *) sys_umount,
103 [ __NR_ioctl ] = (syscall_handler_t *) sys_ioctl, 98 [ __NR_ioctl ] = (syscall_handler_t *) sys_ioctl,
@@ -110,26 +105,26 @@ syscall_handler_t *sys_call_table[] = {
110 [ __NR_getppid ] = (syscall_handler_t *) sys_getppid, 105 [ __NR_getppid ] = (syscall_handler_t *) sys_getppid,
111 [ __NR_getpgrp ] = (syscall_handler_t *) sys_getpgrp, 106 [ __NR_getpgrp ] = (syscall_handler_t *) sys_getpgrp,
112 [ __NR_setsid ] = (syscall_handler_t *) sys_setsid, 107 [ __NR_setsid ] = (syscall_handler_t *) sys_setsid,
113 [ __NR_setreuid ] = (syscall_handler_t *) sys_setreuid16, 108 [ __NR_setreuid ] = (syscall_handler_t *) sys_setreuid,
114 [ __NR_setregid ] = (syscall_handler_t *) sys_setregid16, 109 [ __NR_setregid ] = (syscall_handler_t *) sys_setregid,
115 [ __NR_sethostname ] = (syscall_handler_t *) sys_sethostname, 110 [ __NR_sethostname ] = (syscall_handler_t *) sys_sethostname,
116 [ __NR_setrlimit ] = (syscall_handler_t *) sys_setrlimit, 111 [ __NR_setrlimit ] = (syscall_handler_t *) sys_setrlimit,
117 [ __NR_getrlimit ] = (syscall_handler_t *) sys_old_getrlimit, 112 [ __NR_getrlimit ] = (syscall_handler_t *) sys_getrlimit,
118 [ __NR_getrusage ] = (syscall_handler_t *) sys_getrusage, 113 [ __NR_getrusage ] = (syscall_handler_t *) sys_getrusage,
119 [ __NR_gettimeofday ] = (syscall_handler_t *) sys_gettimeofday, 114 [ __NR_gettimeofday ] = (syscall_handler_t *) sys_gettimeofday,
120 [ __NR_settimeofday ] = (syscall_handler_t *) sys_settimeofday, 115 [ __NR_settimeofday ] = (syscall_handler_t *) sys_settimeofday,
121 [ __NR_getgroups ] = (syscall_handler_t *) sys_getgroups16, 116 [ __NR_getgroups ] = (syscall_handler_t *) sys_getgroups,
122 [ __NR_setgroups ] = (syscall_handler_t *) sys_setgroups16, 117 [ __NR_setgroups ] = (syscall_handler_t *) sys_setgroups,
123 [ __NR_symlink ] = (syscall_handler_t *) sys_symlink, 118 [ __NR_symlink ] = (syscall_handler_t *) sys_symlink,
124 [ __NR_readlink ] = (syscall_handler_t *) sys_readlink, 119 [ __NR_readlink ] = (syscall_handler_t *) sys_readlink,
125 [ __NR_uselib ] = (syscall_handler_t *) sys_uselib, 120 [ __NR_uselib ] = (syscall_handler_t *) sys_ni_syscall,
126 [ __NR_swapon ] = (syscall_handler_t *) sys_swapon, 121 [ __NR_swapon ] = (syscall_handler_t *) sys_swapon,
127 [ __NR_reboot ] = (syscall_handler_t *) sys_reboot, 122 [ __NR_reboot ] = (syscall_handler_t *) sys_reboot,
128 [ __NR_munmap ] = (syscall_handler_t *) sys_munmap, 123 [ __NR_munmap ] = (syscall_handler_t *) sys_munmap,
129 [ __NR_truncate ] = (syscall_handler_t *) sys_truncate, 124 [ __NR_truncate ] = (syscall_handler_t *) sys_truncate,
130 [ __NR_ftruncate ] = (syscall_handler_t *) sys_ftruncate, 125 [ __NR_ftruncate ] = (syscall_handler_t *) sys_ftruncate,
131 [ __NR_fchmod ] = (syscall_handler_t *) sys_fchmod, 126 [ __NR_fchmod ] = (syscall_handler_t *) sys_fchmod,
132 [ __NR_fchown ] = (syscall_handler_t *) sys_fchown16, 127 [ __NR_fchown ] = (syscall_handler_t *) sys_fchown,
133 [ __NR_getpriority ] = (syscall_handler_t *) sys_getpriority, 128 [ __NR_getpriority ] = (syscall_handler_t *) sys_getpriority,
134 [ __NR_setpriority ] = (syscall_handler_t *) sys_setpriority, 129 [ __NR_setpriority ] = (syscall_handler_t *) sys_setpriority,
135 [ __NR_statfs ] = (syscall_handler_t *) sys_statfs, 130 [ __NR_statfs ] = (syscall_handler_t *) sys_statfs,
@@ -161,8 +156,8 @@ syscall_handler_t *sys_call_table[] = {
161 [ __NR_sysfs ] = (syscall_handler_t *) sys_sysfs, 156 [ __NR_sysfs ] = (syscall_handler_t *) sys_sysfs,
162 [ __NR_personality ] = (syscall_handler_t *) sys_personality, 157 [ __NR_personality ] = (syscall_handler_t *) sys_personality,
163 [ __NR_afs_syscall ] = (syscall_handler_t *) sys_ni_syscall, 158 [ __NR_afs_syscall ] = (syscall_handler_t *) sys_ni_syscall,
164 [ __NR_setfsuid ] = (syscall_handler_t *) sys_setfsuid16, 159 [ __NR_setfsuid ] = (syscall_handler_t *) sys_setfsuid,
165 [ __NR_setfsgid ] = (syscall_handler_t *) sys_setfsgid16, 160 [ __NR_setfsgid ] = (syscall_handler_t *) sys_setfsgid,
166 [ __NR_getdents ] = (syscall_handler_t *) sys_getdents, 161 [ __NR_getdents ] = (syscall_handler_t *) sys_getdents,
167 [ __NR_flock ] = (syscall_handler_t *) sys_flock, 162 [ __NR_flock ] = (syscall_handler_t *) sys_flock,
168 [ __NR_msync ] = (syscall_handler_t *) sys_msync, 163 [ __NR_msync ] = (syscall_handler_t *) sys_msync,
@@ -185,13 +180,13 @@ syscall_handler_t *sys_call_table[] = {
185 [ __NR_sched_rr_get_interval ] = (syscall_handler_t *) sys_sched_rr_get_interval, 180 [ __NR_sched_rr_get_interval ] = (syscall_handler_t *) sys_sched_rr_get_interval,
186 [ __NR_nanosleep ] = (syscall_handler_t *) sys_nanosleep, 181 [ __NR_nanosleep ] = (syscall_handler_t *) sys_nanosleep,
187 [ __NR_mremap ] = (syscall_handler_t *) sys_mremap, 182 [ __NR_mremap ] = (syscall_handler_t *) sys_mremap,
188 [ __NR_setresuid ] = (syscall_handler_t *) sys_setresuid16, 183 [ __NR_setresuid ] = (syscall_handler_t *) sys_setresuid,
189 [ __NR_getresuid ] = (syscall_handler_t *) sys_getresuid16, 184 [ __NR_getresuid ] = (syscall_handler_t *) sys_getresuid,
190 [ __NR_query_module ] = (syscall_handler_t *) sys_ni_syscall, 185 [ __NR_query_module ] = (syscall_handler_t *) sys_ni_syscall,
191 [ __NR_poll ] = (syscall_handler_t *) sys_poll, 186 [ __NR_poll ] = (syscall_handler_t *) sys_poll,
192 [ __NR_nfsservctl ] = (syscall_handler_t *) NFSSERVCTL, 187 [ __NR_nfsservctl ] = (syscall_handler_t *) sys_nfsservctl,
193 [ __NR_setresgid ] = (syscall_handler_t *) sys_setresgid16, 188 [ __NR_setresgid ] = (syscall_handler_t *) sys_setresgid,
194 [ __NR_getresgid ] = (syscall_handler_t *) sys_getresgid16, 189 [ __NR_getresgid ] = (syscall_handler_t *) sys_getresgid,
195 [ __NR_prctl ] = (syscall_handler_t *) sys_prctl, 190 [ __NR_prctl ] = (syscall_handler_t *) sys_prctl,
196 [ __NR_rt_sigreturn ] = (syscall_handler_t *) sys_rt_sigreturn, 191 [ __NR_rt_sigreturn ] = (syscall_handler_t *) sys_rt_sigreturn,
197 [ __NR_rt_sigaction ] = (syscall_handler_t *) sys_rt_sigaction, 192 [ __NR_rt_sigaction ] = (syscall_handler_t *) sys_rt_sigaction,
@@ -202,12 +197,12 @@ syscall_handler_t *sys_call_table[] = {
202 [ __NR_rt_sigsuspend ] = (syscall_handler_t *) sys_rt_sigsuspend, 197 [ __NR_rt_sigsuspend ] = (syscall_handler_t *) sys_rt_sigsuspend,
203 [ __NR_pread64 ] = (syscall_handler_t *) sys_pread64, 198 [ __NR_pread64 ] = (syscall_handler_t *) sys_pread64,
204 [ __NR_pwrite64 ] = (syscall_handler_t *) sys_pwrite64, 199 [ __NR_pwrite64 ] = (syscall_handler_t *) sys_pwrite64,
205 [ __NR_chown ] = (syscall_handler_t *) sys_chown16, 200 [ __NR_chown ] = (syscall_handler_t *) sys_chown,
206 [ __NR_getcwd ] = (syscall_handler_t *) sys_getcwd, 201 [ __NR_getcwd ] = (syscall_handler_t *) sys_getcwd,
207 [ __NR_capget ] = (syscall_handler_t *) sys_capget, 202 [ __NR_capget ] = (syscall_handler_t *) sys_capget,
208 [ __NR_capset ] = (syscall_handler_t *) sys_capset, 203 [ __NR_capset ] = (syscall_handler_t *) sys_capset,
209 [ __NR_sigaltstack ] = (syscall_handler_t *) sys_sigaltstack, 204 [ __NR_sigaltstack ] = (syscall_handler_t *) sys_sigaltstack,
210 [ __NR_sendfile ] = (syscall_handler_t *) sys_sendfile, 205 [ __NR_sendfile ] = (syscall_handler_t *) sys_sendfile64,
211 [ __NR_getpmsg ] = (syscall_handler_t *) sys_ni_syscall, 206 [ __NR_getpmsg ] = (syscall_handler_t *) sys_ni_syscall,
212 [ __NR_putpmsg ] = (syscall_handler_t *) sys_ni_syscall, 207 [ __NR_putpmsg ] = (syscall_handler_t *) sys_ni_syscall,
213 [ __NR_vfork ] = (syscall_handler_t *) sys_vfork, 208 [ __NR_vfork ] = (syscall_handler_t *) sys_vfork,