blob: 5f32cf4de5fb56e54cd0f5210c10cc62e8306866 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Compatibility mode system call entry point for x86-64.
3 *
4 * Copyright 2000-2002 Andi Kleen, SuSE Labs.
5 */
6
7#include <asm/dwarf2.h>
8#include <asm/calling.h>
Sam Ravnborge2d5df92005-09-09 21:28:48 +02009#include <asm/asm-offsets.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070010#include <asm/current.h>
11#include <asm/errno.h>
12#include <asm/ia32_unistd.h>
13#include <asm/thread_info.h>
14#include <asm/segment.h>
15#include <asm/vsyscall32.h>
Ingo Molnar2601e642006-07-03 00:24:45 -070016#include <asm/irqflags.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <linux/linkage.h>
18
Andi Kleen67d53ea2006-04-07 19:50:31 +020019#define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8)
20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 .macro IA32_ARG_FIXUP noebp=0
22 movl %edi,%r8d
23 .if \noebp
24 .else
25 movl %ebp,%r9d
26 .endif
27 xchg %ecx,%esi
28 movl %ebx,%edi
29 movl %edx,%edx /* zero extension */
30 .endm
31
32 /* clobbers %eax */
33 .macro CLEAR_RREGS
34 xorl %eax,%eax
35 movq %rax,R11(%rsp)
36 movq %rax,R10(%rsp)
37 movq %rax,R9(%rsp)
38 movq %rax,R8(%rsp)
39 .endm
40
Jan Beulich27651302006-01-11 22:41:59 +010041 .macro CFI_STARTPROC32 simple
42 CFI_STARTPROC \simple
43 CFI_UNDEFINED r8
44 CFI_UNDEFINED r9
45 CFI_UNDEFINED r10
46 CFI_UNDEFINED r11
47 CFI_UNDEFINED r12
48 CFI_UNDEFINED r13
49 CFI_UNDEFINED r14
50 CFI_UNDEFINED r15
51 .endm
52
Linus Torvalds1da177e2005-04-16 15:20:36 -070053/*
54 * 32bit SYSENTER instruction entry.
55 *
56 * Arguments:
57 * %eax System call number.
58 * %ebx Arg1
59 * %ecx Arg2
60 * %edx Arg3
61 * %esi Arg4
62 * %edi Arg5
63 * %ebp user stack
64 * 0(%ebp) Arg6
65 *
66 * Interrupts off.
67 *
68 * This is purely a fast path. For anything complicated we use the int 0x80
69 * path below. Set up a complete hardware stack frame to share code
70 * with the int 0x80 path.
71 */
72ENTRY(ia32_sysenter_target)
Jan Beulich27651302006-01-11 22:41:59 +010073 CFI_STARTPROC32 simple
Jan Beulichadf14232006-09-26 10:52:41 +020074 CFI_SIGNAL_FRAME
Jan Beulich7effaa82005-09-12 18:49:24 +020075 CFI_DEF_CFA rsp,0
76 CFI_REGISTER rsp,rbp
Linus Torvalds1da177e2005-04-16 15:20:36 -070077 swapgs
78 movq %gs:pda_kernelstack, %rsp
79 addq $(PDA_STACKOFFSET),%rsp
Ingo Molnar2601e642006-07-03 00:24:45 -070080 /*
81 * No need to follow this irqs on/off section: the syscall
82 * disabled irqs, here we enable it straight after entry:
83 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070084 sti
85 movl %ebp,%ebp /* zero extension */
86 pushq $__USER32_DS
Jan Beulich7effaa82005-09-12 18:49:24 +020087 CFI_ADJUST_CFA_OFFSET 8
88 /*CFI_REL_OFFSET ss,0*/
Linus Torvalds1da177e2005-04-16 15:20:36 -070089 pushq %rbp
Jan Beulich7effaa82005-09-12 18:49:24 +020090 CFI_ADJUST_CFA_OFFSET 8
91 CFI_REL_OFFSET rsp,0
Linus Torvalds1da177e2005-04-16 15:20:36 -070092 pushfq
Jan Beulich7effaa82005-09-12 18:49:24 +020093 CFI_ADJUST_CFA_OFFSET 8
94 /*CFI_REL_OFFSET rflags,0*/
Linus Torvalds1da177e2005-04-16 15:20:36 -070095 movl $VSYSCALL32_SYSEXIT, %r10d
Jan Beulich7effaa82005-09-12 18:49:24 +020096 CFI_REGISTER rip,r10
Linus Torvalds1da177e2005-04-16 15:20:36 -070097 pushq $__USER32_CS
Jan Beulich7effaa82005-09-12 18:49:24 +020098 CFI_ADJUST_CFA_OFFSET 8
99 /*CFI_REL_OFFSET cs,0*/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100 movl %eax, %eax
101 pushq %r10
Jan Beulich7effaa82005-09-12 18:49:24 +0200102 CFI_ADJUST_CFA_OFFSET 8
103 CFI_REL_OFFSET rip,0
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104 pushq %rax
Jan Beulich7effaa82005-09-12 18:49:24 +0200105 CFI_ADJUST_CFA_OFFSET 8
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106 cld
Andi Kleen0e92da42006-07-28 14:44:45 +0200107 SAVE_ARGS 0,0,0
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108 /* no need to do an access_ok check here because rbp has been
109 32bit zero extended */
1101: movl (%rbp),%r9d
111 .section __ex_table,"a"
112 .quad 1b,ia32_badarg
113 .previous
114 GET_THREAD_INFO(%r10)
Andi Kleenbf2fcc62006-01-11 22:44:06 +0100115 orl $TS_COMPAT,threadinfo_status(%r10)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116 testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
Jan Beulich7effaa82005-09-12 18:49:24 +0200117 CFI_REMEMBER_STATE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700118 jnz sysenter_tracesys
119sysenter_do_call:
Andi Kleen67d53ea2006-04-07 19:50:31 +0200120 cmpl $(IA32_NR_syscalls-1),%eax
121 ja ia32_badsys
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122 IA32_ARG_FIXUP 1
123 call *ia32_sys_call_table(,%rax,8)
124 movq %rax,RAX-ARGOFFSET(%rsp)
125 GET_THREAD_INFO(%r10)
126 cli
Ingo Molnar2601e642006-07-03 00:24:45 -0700127 TRACE_IRQS_OFF
Linus Torvalds1da177e2005-04-16 15:20:36 -0700128 testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
129 jnz int_ret_from_sys_call
Andi Kleenbf2fcc62006-01-11 22:44:06 +0100130 andl $~TS_COMPAT,threadinfo_status(%r10)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131 /* clear IF, that popfq doesn't enable interrupts early */
132 andl $~0x200,EFLAGS-R11(%rsp)
133 RESTORE_ARGS 1,24,1,1,1,1
134 popfq
Jan Beulich7effaa82005-09-12 18:49:24 +0200135 CFI_ADJUST_CFA_OFFSET -8
136 /*CFI_RESTORE rflags*/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137 popq %rcx /* User %esp */
Jan Beulich7effaa82005-09-12 18:49:24 +0200138 CFI_ADJUST_CFA_OFFSET -8
139 CFI_REGISTER rsp,rcx
Linus Torvalds1da177e2005-04-16 15:20:36 -0700140 movl $VSYSCALL32_SYSEXIT,%edx /* User %eip */
Jan Beulich7effaa82005-09-12 18:49:24 +0200141 CFI_REGISTER rip,rdx
Ingo Molnar2601e642006-07-03 00:24:45 -0700142 TRACE_IRQS_ON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143 swapgs
144 sti /* sti only takes effect after the next instruction */
145 /* sysexit */
146 .byte 0xf, 0x35
147
148sysenter_tracesys:
Jan Beulich7effaa82005-09-12 18:49:24 +0200149 CFI_RESTORE_STATE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150 SAVE_REST
151 CLEAR_RREGS
152 movq $-ENOSYS,RAX(%rsp) /* really needed? */
153 movq %rsp,%rdi /* &pt_regs -> arg1 */
154 call syscall_trace_enter
155 LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
156 RESTORE_REST
157 movl %ebp, %ebp
158 /* no need to do an access_ok check here because rbp has been
159 32bit zero extended */
1601: movl (%rbp),%r9d
161 .section __ex_table,"a"
162 .quad 1b,ia32_badarg
163 .previous
164 jmp sysenter_do_call
165 CFI_ENDPROC
Jan Beulich4b787e02006-06-26 13:56:55 +0200166ENDPROC(ia32_sysenter_target)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167
168/*
169 * 32bit SYSCALL instruction entry.
170 *
171 * Arguments:
172 * %eax System call number.
173 * %ebx Arg1
174 * %ecx return EIP
175 * %edx Arg3
176 * %esi Arg4
177 * %edi Arg5
178 * %ebp Arg2 [note: not saved in the stack frame, should not be touched]
179 * %esp user stack
180 * 0(%esp) Arg6
181 *
182 * Interrupts off.
183 *
184 * This is purely a fast path. For anything complicated we use the int 0x80
185 * path below. Set up a complete hardware stack frame to share code
186 * with the int 0x80 path.
187 */
188ENTRY(ia32_cstar_target)
Jan Beulich27651302006-01-11 22:41:59 +0100189 CFI_STARTPROC32 simple
Jan Beulichadf14232006-09-26 10:52:41 +0200190 CFI_SIGNAL_FRAME
Jan Beulichdffead42006-06-26 13:57:38 +0200191 CFI_DEF_CFA rsp,PDA_STACKOFFSET
Jan Beulich7effaa82005-09-12 18:49:24 +0200192 CFI_REGISTER rip,rcx
193 /*CFI_REGISTER rflags,r11*/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194 swapgs
195 movl %esp,%r8d
Jan Beulich7effaa82005-09-12 18:49:24 +0200196 CFI_REGISTER rsp,r8
Linus Torvalds1da177e2005-04-16 15:20:36 -0700197 movq %gs:pda_kernelstack,%rsp
Ingo Molnar2601e642006-07-03 00:24:45 -0700198 /*
199 * No need to follow this irqs on/off section: the syscall
200 * disabled irqs and here we enable it straight after entry:
201 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700202 sti
203 SAVE_ARGS 8,1,1
204 movl %eax,%eax /* zero extension */
205 movq %rax,ORIG_RAX-ARGOFFSET(%rsp)
206 movq %rcx,RIP-ARGOFFSET(%rsp)
Jan Beulich7effaa82005-09-12 18:49:24 +0200207 CFI_REL_OFFSET rip,RIP-ARGOFFSET
Linus Torvalds1da177e2005-04-16 15:20:36 -0700208 movq %rbp,RCX-ARGOFFSET(%rsp) /* this lies slightly to ptrace */
209 movl %ebp,%ecx
210 movq $__USER32_CS,CS-ARGOFFSET(%rsp)
211 movq $__USER32_DS,SS-ARGOFFSET(%rsp)
212 movq %r11,EFLAGS-ARGOFFSET(%rsp)
Jan Beulich7effaa82005-09-12 18:49:24 +0200213 /*CFI_REL_OFFSET rflags,EFLAGS-ARGOFFSET*/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700214 movq %r8,RSP-ARGOFFSET(%rsp)
Jan Beulich7effaa82005-09-12 18:49:24 +0200215 CFI_REL_OFFSET rsp,RSP-ARGOFFSET
Linus Torvalds1da177e2005-04-16 15:20:36 -0700216 /* no need to do an access_ok check here because r8 has been
217 32bit zero extended */
218 /* hardware stack frame is complete now */
2191: movl (%r8),%r9d
220 .section __ex_table,"a"
221 .quad 1b,ia32_badarg
222 .previous
223 GET_THREAD_INFO(%r10)
Andi Kleenbf2fcc62006-01-11 22:44:06 +0100224 orl $TS_COMPAT,threadinfo_status(%r10)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700225 testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
Jan Beulich7effaa82005-09-12 18:49:24 +0200226 CFI_REMEMBER_STATE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700227 jnz cstar_tracesys
228cstar_do_call:
Andi Kleen67d53ea2006-04-07 19:50:31 +0200229 cmpl $IA32_NR_syscalls-1,%eax
230 ja ia32_badsys
Linus Torvalds1da177e2005-04-16 15:20:36 -0700231 IA32_ARG_FIXUP 1
232 call *ia32_sys_call_table(,%rax,8)
233 movq %rax,RAX-ARGOFFSET(%rsp)
234 GET_THREAD_INFO(%r10)
235 cli
Ingo Molnar2601e642006-07-03 00:24:45 -0700236 TRACE_IRQS_OFF
Linus Torvalds1da177e2005-04-16 15:20:36 -0700237 testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
238 jnz int_ret_from_sys_call
Andi Kleenbf2fcc62006-01-11 22:44:06 +0100239 andl $~TS_COMPAT,threadinfo_status(%r10)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700240 RESTORE_ARGS 1,-ARG_SKIP,1,1,1
241 movl RIP-ARGOFFSET(%rsp),%ecx
Jan Beulich7effaa82005-09-12 18:49:24 +0200242 CFI_REGISTER rip,rcx
Linus Torvalds1da177e2005-04-16 15:20:36 -0700243 movl EFLAGS-ARGOFFSET(%rsp),%r11d
Jan Beulich7effaa82005-09-12 18:49:24 +0200244 /*CFI_REGISTER rflags,r11*/
Ingo Molnar2601e642006-07-03 00:24:45 -0700245 TRACE_IRQS_ON
Linus Torvalds1da177e2005-04-16 15:20:36 -0700246 movl RSP-ARGOFFSET(%rsp),%esp
Jan Beulich7effaa82005-09-12 18:49:24 +0200247 CFI_RESTORE rsp
Linus Torvalds1da177e2005-04-16 15:20:36 -0700248 swapgs
249 sysretl
250
251cstar_tracesys:
Jan Beulich7effaa82005-09-12 18:49:24 +0200252 CFI_RESTORE_STATE
Linus Torvalds1da177e2005-04-16 15:20:36 -0700253 SAVE_REST
254 CLEAR_RREGS
255 movq $-ENOSYS,RAX(%rsp) /* really needed? */
256 movq %rsp,%rdi /* &pt_regs -> arg1 */
257 call syscall_trace_enter
258 LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
259 RESTORE_REST
260 movl RSP-ARGOFFSET(%rsp), %r8d
261 /* no need to do an access_ok check here because r8 has been
262 32bit zero extended */
2631: movl (%r8),%r9d
264 .section __ex_table,"a"
265 .quad 1b,ia32_badarg
266 .previous
267 jmp cstar_do_call
Jan Beulich4b787e02006-06-26 13:56:55 +0200268END(ia32_cstar_target)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700269
270ia32_badarg:
271 movq $-EFAULT,%rax
272 jmp ia32_sysret
273 CFI_ENDPROC
274
275/*
276 * Emulated IA32 system calls via int 0x80.
277 *
278 * Arguments:
279 * %eax System call number.
280 * %ebx Arg1
281 * %ecx Arg2
282 * %edx Arg3
283 * %esi Arg4
284 * %edi Arg5
285 * %ebp Arg6 [note: not saved in the stack frame, should not be touched]
286 *
287 * Notes:
288 * Uses the same stack frame as the x86-64 version.
289 * All registers except %eax must be saved (but ptrace may violate that)
290 * Arguments are zero extended. For system calls that want sign extension and
291 * take long arguments a wrapper is needed. Most calls can just be called
292 * directly.
293 * Assumes it is only called from user space and entered with interrupts off.
294 */
295
296ENTRY(ia32_syscall)
Jan Beulich7effaa82005-09-12 18:49:24 +0200297 CFI_STARTPROC simple
Jan Beulichadf14232006-09-26 10:52:41 +0200298 CFI_SIGNAL_FRAME
Jan Beulich7effaa82005-09-12 18:49:24 +0200299 CFI_DEF_CFA rsp,SS+8-RIP
300 /*CFI_REL_OFFSET ss,SS-RIP*/
301 CFI_REL_OFFSET rsp,RSP-RIP
302 /*CFI_REL_OFFSET rflags,EFLAGS-RIP*/
303 /*CFI_REL_OFFSET cs,CS-RIP*/
304 CFI_REL_OFFSET rip,RIP-RIP
Ingo Molnar2601e642006-07-03 00:24:45 -0700305 swapgs
306 /*
307 * No need to follow this irqs on/off section: the syscall
308 * disabled irqs and here we enable it straight after entry:
309 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700310 sti
311 movl %eax,%eax
312 pushq %rax
Jan Beulich7effaa82005-09-12 18:49:24 +0200313 CFI_ADJUST_CFA_OFFSET 8
Linus Torvalds1da177e2005-04-16 15:20:36 -0700314 cld
315 /* note the registers are not zero extended to the sf.
316 this could be a problem. */
317 SAVE_ARGS 0,0,1
318 GET_THREAD_INFO(%r10)
Andi Kleenbf2fcc62006-01-11 22:44:06 +0100319 orl $TS_COMPAT,threadinfo_status(%r10)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700320 testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
321 jnz ia32_tracesys
322ia32_do_syscall:
Andi Kleen67d53ea2006-04-07 19:50:31 +0200323 cmpl $(IA32_NR_syscalls-1),%eax
324 ja ia32_badsys
Linus Torvalds1da177e2005-04-16 15:20:36 -0700325 IA32_ARG_FIXUP
326 call *ia32_sys_call_table(,%rax,8) # xxx: rip relative
327ia32_sysret:
328 movq %rax,RAX-ARGOFFSET(%rsp)
329 jmp int_ret_from_sys_call
330
331ia32_tracesys:
332 SAVE_REST
333 movq $-ENOSYS,RAX(%rsp) /* really needed? */
334 movq %rsp,%rdi /* &pt_regs -> arg1 */
335 call syscall_trace_enter
336 LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */
337 RESTORE_REST
338 jmp ia32_do_syscall
Jan Beulich4b787e02006-06-26 13:56:55 +0200339END(ia32_syscall)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700340
341ia32_badsys:
342 movq $0,ORIG_RAX-ARGOFFSET(%rsp)
343 movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
344 jmp int_ret_from_sys_call
345
Linus Torvalds1da177e2005-04-16 15:20:36 -0700346quiet_ni_syscall:
347 movq $-ENOSYS,%rax
348 ret
349 CFI_ENDPROC
350
351 .macro PTREGSCALL label, func, arg
352 .globl \label
353\label:
354 leaq \func(%rip),%rax
355 leaq -ARGOFFSET+8(%rsp),\arg /* 8 for return address */
356 jmp ia32_ptregs_common
357 .endm
358
Jan Beulich27651302006-01-11 22:41:59 +0100359 CFI_STARTPROC32
Jan Beulich7effaa82005-09-12 18:49:24 +0200360
Linus Torvalds1da177e2005-04-16 15:20:36 -0700361 PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn, %rdi
362 PTREGSCALL stub32_sigreturn, sys32_sigreturn, %rdi
363 PTREGSCALL stub32_sigaltstack, sys32_sigaltstack, %rdx
364 PTREGSCALL stub32_sigsuspend, sys32_sigsuspend, %rcx
365 PTREGSCALL stub32_execve, sys32_execve, %rcx
366 PTREGSCALL stub32_fork, sys_fork, %rdi
367 PTREGSCALL stub32_clone, sys32_clone, %rdx
368 PTREGSCALL stub32_vfork, sys_vfork, %rdi
369 PTREGSCALL stub32_iopl, sys_iopl, %rsi
370 PTREGSCALL stub32_rt_sigsuspend, sys_rt_sigsuspend, %rdx
371
372ENTRY(ia32_ptregs_common)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700373 popq %r11
Jan Beulich27651302006-01-11 22:41:59 +0100374 CFI_ENDPROC
375 CFI_STARTPROC32 simple
Jan Beulichadf14232006-09-26 10:52:41 +0200376 CFI_SIGNAL_FRAME
Jan Beulich27651302006-01-11 22:41:59 +0100377 CFI_DEF_CFA rsp,SS+8-ARGOFFSET
378 CFI_REL_OFFSET rax,RAX-ARGOFFSET
379 CFI_REL_OFFSET rcx,RCX-ARGOFFSET
380 CFI_REL_OFFSET rdx,RDX-ARGOFFSET
381 CFI_REL_OFFSET rsi,RSI-ARGOFFSET
382 CFI_REL_OFFSET rdi,RDI-ARGOFFSET
383 CFI_REL_OFFSET rip,RIP-ARGOFFSET
384/* CFI_REL_OFFSET cs,CS-ARGOFFSET*/
385/* CFI_REL_OFFSET rflags,EFLAGS-ARGOFFSET*/
386 CFI_REL_OFFSET rsp,RSP-ARGOFFSET
387/* CFI_REL_OFFSET ss,SS-ARGOFFSET*/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700388 SAVE_REST
389 call *%rax
390 RESTORE_REST
391 jmp ia32_sysret /* misbalances the return cache */
392 CFI_ENDPROC
Jan Beulich4b787e02006-06-26 13:56:55 +0200393END(ia32_ptregs_common)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700394
Arjan van de Venbb152f52006-01-06 00:12:05 -0800395 .section .rodata,"a"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700396 .align 8
Linus Torvalds1da177e2005-04-16 15:20:36 -0700397ia32_sys_call_table:
398 .quad sys_restart_syscall
399 .quad sys_exit
400 .quad stub32_fork
401 .quad sys_read
402 .quad sys_write
Miklos Szeredie922efc2005-09-06 15:18:25 -0700403 .quad compat_sys_open /* 5 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700404 .quad sys_close
405 .quad sys32_waitpid
406 .quad sys_creat
407 .quad sys_link
408 .quad sys_unlink /* 10 */
409 .quad stub32_execve
410 .quad sys_chdir
411 .quad compat_sys_time
412 .quad sys_mknod
413 .quad sys_chmod /* 15 */
414 .quad sys_lchown16
415 .quad quiet_ni_syscall /* old break syscall holder */
416 .quad sys_stat
417 .quad sys32_lseek
418 .quad sys_getpid /* 20 */
419 .quad compat_sys_mount /* mount */
420 .quad sys_oldumount /* old_umount */
421 .quad sys_setuid16
422 .quad sys_getuid16
423 .quad compat_sys_stime /* stime */ /* 25 */
424 .quad sys32_ptrace /* ptrace */
425 .quad sys_alarm
426 .quad sys_fstat /* (old)fstat */
427 .quad sys_pause
428 .quad compat_sys_utime /* 30 */
429 .quad quiet_ni_syscall /* old stty syscall holder */
430 .quad quiet_ni_syscall /* old gtty syscall holder */
431 .quad sys_access
432 .quad sys_nice
433 .quad quiet_ni_syscall /* 35 */ /* old ftime syscall holder */
434 .quad sys_sync
435 .quad sys32_kill
436 .quad sys_rename
437 .quad sys_mkdir
438 .quad sys_rmdir /* 40 */
439 .quad sys_dup
440 .quad sys32_pipe
441 .quad compat_sys_times
442 .quad quiet_ni_syscall /* old prof syscall holder */
443 .quad sys_brk /* 45 */
444 .quad sys_setgid16
445 .quad sys_getgid16
446 .quad sys_signal
447 .quad sys_geteuid16
448 .quad sys_getegid16 /* 50 */
449 .quad sys_acct
450 .quad sys_umount /* new_umount */
451 .quad quiet_ni_syscall /* old lock syscall holder */
452 .quad compat_sys_ioctl
453 .quad compat_sys_fcntl64 /* 55 */
454 .quad quiet_ni_syscall /* old mpx syscall holder */
455 .quad sys_setpgid
456 .quad quiet_ni_syscall /* old ulimit syscall holder */
457 .quad sys32_olduname
458 .quad sys_umask /* 60 */
459 .quad sys_chroot
460 .quad sys32_ustat
461 .quad sys_dup2
462 .quad sys_getppid
463 .quad sys_getpgrp /* 65 */
464 .quad sys_setsid
465 .quad sys32_sigaction
466 .quad sys_sgetmask
467 .quad sys_ssetmask
468 .quad sys_setreuid16 /* 70 */
469 .quad sys_setregid16
470 .quad stub32_sigsuspend
471 .quad compat_sys_sigpending
472 .quad sys_sethostname
473 .quad compat_sys_setrlimit /* 75 */
474 .quad compat_sys_old_getrlimit /* old_getrlimit */
475 .quad compat_sys_getrusage
476 .quad sys32_gettimeofday
477 .quad sys32_settimeofday
478 .quad sys_getgroups16 /* 80 */
479 .quad sys_setgroups16
480 .quad sys32_old_select
481 .quad sys_symlink
482 .quad sys_lstat
483 .quad sys_readlink /* 85 */
484#ifdef CONFIG_IA32_AOUT
485 .quad sys_uselib
486#else
487 .quad quiet_ni_syscall
488#endif
489 .quad sys_swapon
490 .quad sys_reboot
491 .quad compat_sys_old_readdir
492 .quad sys32_mmap /* 90 */
493 .quad sys_munmap
494 .quad sys_truncate
495 .quad sys_ftruncate
496 .quad sys_fchmod
497 .quad sys_fchown16 /* 95 */
498 .quad sys_getpriority
499 .quad sys_setpriority
500 .quad quiet_ni_syscall /* old profil syscall holder */
501 .quad compat_sys_statfs
502 .quad compat_sys_fstatfs /* 100 */
503 .quad sys_ioperm
504 .quad compat_sys_socketcall
505 .quad sys_syslog
506 .quad compat_sys_setitimer
507 .quad compat_sys_getitimer /* 105 */
508 .quad compat_sys_newstat
509 .quad compat_sys_newlstat
510 .quad compat_sys_newfstat
511 .quad sys32_uname
512 .quad stub32_iopl /* 110 */
513 .quad sys_vhangup
514 .quad quiet_ni_syscall /* old "idle" system call */
515 .quad sys32_vm86_warning /* vm86old */
516 .quad compat_sys_wait4
517 .quad sys_swapoff /* 115 */
Kyle McMartind4d23ad2007-02-10 01:46:00 -0800518 .quad compat_sys_sysinfo
Linus Torvalds1da177e2005-04-16 15:20:36 -0700519 .quad sys32_ipc
520 .quad sys_fsync
521 .quad stub32_sigreturn
522 .quad stub32_clone /* 120 */
523 .quad sys_setdomainname
524 .quad sys_uname
525 .quad sys_modify_ldt
Stephen Rothwell3158e942006-03-26 01:37:29 -0800526 .quad compat_sys_adjtimex
Linus Torvalds1da177e2005-04-16 15:20:36 -0700527 .quad sys32_mprotect /* 125 */
528 .quad compat_sys_sigprocmask
529 .quad quiet_ni_syscall /* create_module */
530 .quad sys_init_module
531 .quad sys_delete_module
532 .quad quiet_ni_syscall /* 130 get_kernel_syms */
533 .quad sys_quotactl
534 .quad sys_getpgid
535 .quad sys_fchdir
536 .quad quiet_ni_syscall /* bdflush */
537 .quad sys_sysfs /* 135 */
538 .quad sys_personality
539 .quad quiet_ni_syscall /* for afs_syscall */
540 .quad sys_setfsuid16
541 .quad sys_setfsgid16
542 .quad sys_llseek /* 140 */
543 .quad compat_sys_getdents
544 .quad compat_sys_select
545 .quad sys_flock
546 .quad sys_msync
547 .quad compat_sys_readv /* 145 */
548 .quad compat_sys_writev
549 .quad sys_getsid
550 .quad sys_fdatasync
551 .quad sys32_sysctl /* sysctl */
552 .quad sys_mlock /* 150 */
553 .quad sys_munlock
554 .quad sys_mlockall
555 .quad sys_munlockall
556 .quad sys_sched_setparam
557 .quad sys_sched_getparam /* 155 */
558 .quad sys_sched_setscheduler
559 .quad sys_sched_getscheduler
560 .quad sys_sched_yield
561 .quad sys_sched_get_priority_max
562 .quad sys_sched_get_priority_min /* 160 */
563 .quad sys_sched_rr_get_interval
564 .quad compat_sys_nanosleep
565 .quad sys_mremap
566 .quad sys_setresuid16
567 .quad sys_getresuid16 /* 165 */
568 .quad sys32_vm86_warning /* vm86 */
569 .quad quiet_ni_syscall /* query_module */
570 .quad sys_poll
571 .quad compat_sys_nfsservctl
572 .quad sys_setresgid16 /* 170 */
573 .quad sys_getresgid16
574 .quad sys_prctl
575 .quad stub32_rt_sigreturn
576 .quad sys32_rt_sigaction
577 .quad sys32_rt_sigprocmask /* 175 */
578 .quad sys32_rt_sigpending
579 .quad compat_sys_rt_sigtimedwait
580 .quad sys32_rt_sigqueueinfo
581 .quad stub32_rt_sigsuspend
582 .quad sys32_pread /* 180 */
583 .quad sys32_pwrite
584 .quad sys_chown16
585 .quad sys_getcwd
586 .quad sys_capget
587 .quad sys_capset
588 .quad stub32_sigaltstack
589 .quad sys32_sendfile
590 .quad quiet_ni_syscall /* streams1 */
591 .quad quiet_ni_syscall /* streams2 */
592 .quad stub32_vfork /* 190 */
593 .quad compat_sys_getrlimit
594 .quad sys32_mmap2
595 .quad sys32_truncate64
596 .quad sys32_ftruncate64
597 .quad sys32_stat64 /* 195 */
598 .quad sys32_lstat64
599 .quad sys32_fstat64
600 .quad sys_lchown
601 .quad sys_getuid
602 .quad sys_getgid /* 200 */
603 .quad sys_geteuid
604 .quad sys_getegid
605 .quad sys_setreuid
606 .quad sys_setregid
607 .quad sys_getgroups /* 205 */
608 .quad sys_setgroups
609 .quad sys_fchown
610 .quad sys_setresuid
611 .quad sys_getresuid
612 .quad sys_setresgid /* 210 */
613 .quad sys_getresgid
614 .quad sys_chown
615 .quad sys_setuid
616 .quad sys_setgid
617 .quad sys_setfsuid /* 215 */
618 .quad sys_setfsgid
619 .quad sys_pivot_root
620 .quad sys_mincore
621 .quad sys_madvise
622 .quad compat_sys_getdents64 /* 220 getdents64 */
623 .quad compat_sys_fcntl64
624 .quad quiet_ni_syscall /* tux */
625 .quad quiet_ni_syscall /* security */
626 .quad sys_gettid
627 .quad sys_readahead /* 225 */
628 .quad sys_setxattr
629 .quad sys_lsetxattr
630 .quad sys_fsetxattr
631 .quad sys_getxattr
632 .quad sys_lgetxattr /* 230 */
633 .quad sys_fgetxattr
634 .quad sys_listxattr
635 .quad sys_llistxattr
636 .quad sys_flistxattr
637 .quad sys_removexattr /* 235 */
638 .quad sys_lremovexattr
639 .quad sys_fremovexattr
640 .quad sys_tkill
641 .quad sys_sendfile64
642 .quad compat_sys_futex /* 240 */
643 .quad compat_sys_sched_setaffinity
644 .quad compat_sys_sched_getaffinity
645 .quad sys32_set_thread_area
646 .quad sys32_get_thread_area
647 .quad compat_sys_io_setup /* 245 */
648 .quad sys_io_destroy
649 .quad compat_sys_io_getevents
650 .quad compat_sys_io_submit
651 .quad sys_io_cancel
652 .quad sys_fadvise64 /* 250 */
653 .quad quiet_ni_syscall /* free_huge_pages */
654 .quad sys_exit_group
655 .quad sys32_lookup_dcookie
656 .quad sys_epoll_create
657 .quad sys_epoll_ctl /* 255 */
658 .quad sys_epoll_wait
659 .quad sys_remap_file_pages
660 .quad sys_set_tid_address
Christoph Hellwig3a0f69d2006-01-09 20:52:08 -0800661 .quad compat_sys_timer_create
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 .quad compat_sys_timer_settime /* 260 */
663 .quad compat_sys_timer_gettime
664 .quad sys_timer_getoverrun
665 .quad sys_timer_delete
666 .quad compat_sys_clock_settime
667 .quad compat_sys_clock_gettime /* 265 */
668 .quad compat_sys_clock_getres
669 .quad compat_sys_clock_nanosleep
670 .quad compat_sys_statfs64
671 .quad compat_sys_fstatfs64
672 .quad sys_tgkill /* 270 */
673 .quad compat_sys_utimes
674 .quad sys32_fadvise64_64
675 .quad quiet_ni_syscall /* sys_vserver */
676 .quad sys_mbind
677 .quad compat_sys_get_mempolicy /* 275 */
678 .quad sys_set_mempolicy
679 .quad compat_sys_mq_open
680 .quad sys_mq_unlink
681 .quad compat_sys_mq_timedsend
682 .quad compat_sys_mq_timedreceive /* 280 */
683 .quad compat_sys_mq_notify
684 .quad compat_sys_mq_getsetattr
Eric W. Biederman5234f5e2005-06-25 14:58:02 -0700685 .quad compat_sys_kexec_load /* reserved for kexec */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700686 .quad compat_sys_waitid
Robert Love725b38ab2005-07-25 15:19:29 -0400687 .quad quiet_ni_syscall /* 285: sys_altroot */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700688 .quad sys_add_key
689 .quad sys_request_key
690 .quad sys_keyctl
Robert Love725b38ab2005-07-25 15:19:29 -0400691 .quad sys_ioprio_set
692 .quad sys_ioprio_get /* 290 */
693 .quad sys_inotify_init
694 .quad sys_inotify_add_watch
695 .quad sys_inotify_rm_watch
Christoph Lameter39743882006-01-08 01:00:51 -0800696 .quad sys_migrate_pages
Ulrich Dreppera60fc512006-01-18 17:43:56 -0800697 .quad compat_sys_openat /* 295 */
698 .quad sys_mkdirat
699 .quad sys_mknodat
700 .quad sys_fchownat
Andrew Morton3833a702006-02-01 03:04:32 -0800701 .quad compat_sys_futimesat
Ulrich Dreppercff2b762006-02-11 17:55:47 -0800702 .quad sys32_fstatat /* 300 */
Ulrich Dreppera60fc512006-01-18 17:43:56 -0800703 .quad sys_unlinkat
704 .quad sys_renameat
705 .quad sys_linkat
706 .quad sys_symlinkat
707 .quad sys_readlinkat /* 305 */
708 .quad sys_fchmodat
709 .quad sys_faccessat
Andi Kleen957dc872006-09-26 10:52:27 +0200710 .quad compat_sys_pselect6
711 .quad compat_sys_ppoll
Andi Kleen4b88f092006-02-09 00:35:50 +0100712 .quad sys_unshare /* 310 */
Ingo Molnar8fdd6c62006-03-27 01:16:26 -0800713 .quad compat_sys_set_robust_list
714 .quad compat_sys_get_robust_list
Andi Kleenb8feb472006-04-07 19:50:34 +0200715 .quad sys_splice
716 .quad sys_sync_file_range
Andi Kleenf1233ab2006-04-18 12:35:19 +0200717 .quad sys_tee
Andi Kleend2610202006-05-01 12:15:48 -0700718 .quad compat_sys_vmsplice
Christoph Lameter1b2db9f2006-06-23 02:03:56 -0700719 .quad compat_sys_move_pages
Andi Kleen3cfc3482006-09-26 10:52:28 +0200720 .quad sys_getcpu
Linus Torvalds1da177e2005-04-16 15:20:36 -0700721ia32_syscall_end: