ia32entry.S 18.8 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7 8
/*
 * Compatibility mode system call entry point for x86-64. 
 * 		
 * Copyright 2000-2002 Andi Kleen, SuSE Labs.
 */		 

#include <asm/dwarf2.h>
#include <asm/calling.h>
9
#include <asm/asm-offsets.h>
L
Linus Torvalds 已提交
10 11 12 13 14
#include <asm/current.h>
#include <asm/errno.h>
#include <asm/ia32_unistd.h>	
#include <asm/thread_info.h>	
#include <asm/segment.h>
15
#include <asm/irqflags.h>
L
Linus Torvalds 已提交
16 17
#include <linux/linkage.h>

18 19
#define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8)

L
Linus Torvalds 已提交
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
	.macro IA32_ARG_FIXUP noebp=0
	movl	%edi,%r8d
	.if \noebp
	.else
	movl	%ebp,%r9d
	.endif
	xchg	%ecx,%esi
	movl	%ebx,%edi
	movl	%edx,%edx	/* zero extension */
	.endm 

	/* clobbers %eax */	
	.macro  CLEAR_RREGS
	xorl 	%eax,%eax
	movq	%rax,R11(%rsp)
	movq	%rax,R10(%rsp)
	movq	%rax,R9(%rsp)
	movq	%rax,R8(%rsp)
	.endm

40 41 42 43 44 45 46 47 48 49 50 51
	.macro LOAD_ARGS32 offset
	movl \offset(%rsp),%r11d
	movl \offset+8(%rsp),%r10d
	movl \offset+16(%rsp),%r9d
	movl \offset+24(%rsp),%r8d
	movl \offset+40(%rsp),%ecx
	movl \offset+48(%rsp),%edx
	movl \offset+56(%rsp),%esi
	movl \offset+64(%rsp),%edi
	movl \offset+72(%rsp),%eax
	.endm
	
52 53 54 55 56 57 58 59 60 61 62 63
	.macro CFI_STARTPROC32 simple
	CFI_STARTPROC	\simple
	CFI_UNDEFINED	r8
	CFI_UNDEFINED	r9
	CFI_UNDEFINED	r10
	CFI_UNDEFINED	r11
	CFI_UNDEFINED	r12
	CFI_UNDEFINED	r13
	CFI_UNDEFINED	r14
	CFI_UNDEFINED	r15
	.endm

64 65 66 67 68 69 70 71 72 73 74 75 76
#ifdef CONFIG_PARAVIRT
ENTRY(native_usergs_sysret32)
	swapgs
	sysretl
ENDPROC(native_usergs_sysret32)

ENTRY(native_irq_enable_sysexit)
	swapgs
	sti
	sysexit
ENDPROC(native_irq_enable_sysexit)
#endif

L
Linus Torvalds 已提交
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
/*
 * 32bit SYSENTER instruction entry.
 *
 * Arguments:
 * %eax	System call number.
 * %ebx Arg1
 * %ecx Arg2
 * %edx Arg3
 * %esi Arg4
 * %edi Arg5
 * %ebp user stack
 * 0(%ebp) Arg6	
 * 	
 * Interrupts off.
 *	
 * This is purely a fast path. For anything complicated we use the int 0x80
 * path below.	Set up a complete hardware stack frame to share code
 * with the int 0x80 path.
 */ 	
ENTRY(ia32_sysenter_target)
97
	CFI_STARTPROC32	simple
98
	CFI_SIGNAL_FRAME
99 100
	CFI_DEF_CFA	rsp,0
	CFI_REGISTER	rsp,rbp
L
Linus Torvalds 已提交
101 102 103
	swapgs
	movq	%gs:pda_kernelstack, %rsp
	addq	$(PDA_STACKOFFSET),%rsp	
104 105 106 107
	/*
	 * No need to follow this irqs on/off section: the syscall
	 * disabled irqs, here we enable it straight after entry:
	 */
L
Linus Torvalds 已提交
108 109 110
	sti	
 	movl	%ebp,%ebp		/* zero extension */
	pushq	$__USER32_DS
111 112
	CFI_ADJUST_CFA_OFFSET 8
	/*CFI_REL_OFFSET ss,0*/
L
Linus Torvalds 已提交
113
	pushq	%rbp
114 115
	CFI_ADJUST_CFA_OFFSET 8
	CFI_REL_OFFSET rsp,0
L
Linus Torvalds 已提交
116
	pushfq
117 118
	CFI_ADJUST_CFA_OFFSET 8
	/*CFI_REL_OFFSET rflags,0*/
R
Roland McGrath 已提交
119
	movl	8*3-THREAD_SIZE+threadinfo_sysenter_return(%rsp), %r10d
120
	CFI_REGISTER rip,r10
L
Linus Torvalds 已提交
121
	pushq	$__USER32_CS
122 123
	CFI_ADJUST_CFA_OFFSET 8
	/*CFI_REL_OFFSET cs,0*/
L
Linus Torvalds 已提交
124 125
	movl	%eax, %eax
	pushq	%r10
126 127
	CFI_ADJUST_CFA_OFFSET 8
	CFI_REL_OFFSET rip,0
L
Linus Torvalds 已提交
128
	pushq	%rax
129
	CFI_ADJUST_CFA_OFFSET 8
L
Linus Torvalds 已提交
130
	cld
J
Jan Beulich 已提交
131
	SAVE_ARGS 0,0,1
L
Linus Torvalds 已提交
132 133 134 135 136 137 138
 	/* no need to do an access_ok check here because rbp has been
 	   32bit zero extended */ 
1:	movl	(%rbp),%r9d
 	.section __ex_table,"a"
 	.quad 1b,ia32_badarg
 	.previous	
	GET_THREAD_INFO(%r10)
139
	orl    $TS_COMPAT,threadinfo_status(%r10)
L
Linus Torvalds 已提交
140
	testl  $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
141
	CFI_REMEMBER_STATE
L
Linus Torvalds 已提交
142 143
	jnz  sysenter_tracesys
sysenter_do_call:	
144 145
	cmpl	$(IA32_NR_syscalls-1),%eax
	ja	ia32_badsys
L
Linus Torvalds 已提交
146 147 148 149 150
	IA32_ARG_FIXUP 1
	call	*ia32_sys_call_table(,%rax,8)
	movq	%rax,RAX-ARGOFFSET(%rsp)
	GET_THREAD_INFO(%r10)
	cli
151
	TRACE_IRQS_OFF
L
Linus Torvalds 已提交
152 153
	testl	$_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
	jnz	int_ret_from_sys_call
154
	andl    $~TS_COMPAT,threadinfo_status(%r10)
L
Linus Torvalds 已提交
155 156
	/* clear IF, that popfq doesn't enable interrupts early */
	andl  $~0x200,EFLAGS-R11(%rsp) 
R
Roland McGrath 已提交
157 158
	movl	RIP-R11(%rsp),%edx		/* User %eip */
	CFI_REGISTER rip,rdx
L
Linus Torvalds 已提交
159 160
	RESTORE_ARGS 1,24,1,1,1,1
	popfq
161 162
	CFI_ADJUST_CFA_OFFSET -8
	/*CFI_RESTORE rflags*/
L
Linus Torvalds 已提交
163
	popq	%rcx				/* User %esp */
164 165
	CFI_ADJUST_CFA_OFFSET -8
	CFI_REGISTER rsp,rcx
166
	TRACE_IRQS_ON
167
	ENABLE_INTERRUPTS_SYSEXIT32
L
Linus Torvalds 已提交
168 169

sysenter_tracesys:
170
	CFI_RESTORE_STATE
171
	xchgl	%r9d,%ebp
L
Linus Torvalds 已提交
172 173
	SAVE_REST
	CLEAR_RREGS
174
	movq	%r9,R9(%rsp)
175
	movq	$-ENOSYS,RAX(%rsp)/* ptrace can change this for a bad syscall */
L
Linus Torvalds 已提交
176 177
	movq	%rsp,%rdi        /* &pt_regs -> arg1 */
	call	syscall_trace_enter
178
	LOAD_ARGS32 ARGOFFSET  /* reload args from stack in case ptrace changed it */
L
Linus Torvalds 已提交
179
	RESTORE_REST
180
	xchgl	%ebp,%r9d
181 182
	cmpl	$(IA32_NR_syscalls-1),%eax
	ja	int_ret_from_sys_call /* sysenter_tracesys has set RAX(%rsp) */
L
Linus Torvalds 已提交
183 184
	jmp	sysenter_do_call
	CFI_ENDPROC
185
ENDPROC(ia32_sysenter_target)
L
Linus Torvalds 已提交
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207

/*
 * 32bit SYSCALL instruction entry.
 *
 * Arguments:
 * %eax	System call number.
 * %ebx Arg1
 * %ecx return EIP 
 * %edx Arg3
 * %esi Arg4
 * %edi Arg5
 * %ebp Arg2    [note: not saved in the stack frame, should not be touched]
 * %esp user stack 
 * 0(%esp) Arg6
 * 	
 * Interrupts off.
 *	
 * This is purely a fast path. For anything complicated we use the int 0x80
 * path below.	Set up a complete hardware stack frame to share code
 * with the int 0x80 path.	
 */ 	
ENTRY(ia32_cstar_target)
208
	CFI_STARTPROC32	simple
209
	CFI_SIGNAL_FRAME
210
	CFI_DEF_CFA	rsp,PDA_STACKOFFSET
211 212
	CFI_REGISTER	rip,rcx
	/*CFI_REGISTER	rflags,r11*/
L
Linus Torvalds 已提交
213 214
	swapgs
	movl	%esp,%r8d
215
	CFI_REGISTER	rsp,r8
L
Linus Torvalds 已提交
216
	movq	%gs:pda_kernelstack,%rsp
217 218 219 220
	/*
	 * No need to follow this irqs on/off section: the syscall
	 * disabled irqs and here we enable it straight after entry:
	 */
L
Linus Torvalds 已提交
221 222 223 224 225
	sti
	SAVE_ARGS 8,1,1
	movl 	%eax,%eax	/* zero extension */
	movq	%rax,ORIG_RAX-ARGOFFSET(%rsp)
	movq	%rcx,RIP-ARGOFFSET(%rsp)
226
	CFI_REL_OFFSET rip,RIP-ARGOFFSET
L
Linus Torvalds 已提交
227 228 229 230 231
	movq	%rbp,RCX-ARGOFFSET(%rsp) /* this lies slightly to ptrace */
	movl	%ebp,%ecx
	movq	$__USER32_CS,CS-ARGOFFSET(%rsp)
	movq	$__USER32_DS,SS-ARGOFFSET(%rsp)
	movq	%r11,EFLAGS-ARGOFFSET(%rsp)
232
	/*CFI_REL_OFFSET rflags,EFLAGS-ARGOFFSET*/
L
Linus Torvalds 已提交
233
	movq	%r8,RSP-ARGOFFSET(%rsp)	
234
	CFI_REL_OFFSET rsp,RSP-ARGOFFSET
L
Linus Torvalds 已提交
235 236 237 238 239 240 241 242
	/* no need to do an access_ok check here because r8 has been
	   32bit zero extended */ 
	/* hardware stack frame is complete now */	
1:	movl	(%r8),%r9d
	.section __ex_table,"a"
	.quad 1b,ia32_badarg
	.previous	
	GET_THREAD_INFO(%r10)
243
	orl   $TS_COMPAT,threadinfo_status(%r10)
L
Linus Torvalds 已提交
244
	testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
245
	CFI_REMEMBER_STATE
L
Linus Torvalds 已提交
246 247
	jnz   cstar_tracesys
cstar_do_call:	
248 249
	cmpl $IA32_NR_syscalls-1,%eax
	ja  ia32_badsys
L
Linus Torvalds 已提交
250 251 252 253 254
	IA32_ARG_FIXUP 1
	call *ia32_sys_call_table(,%rax,8)
	movq %rax,RAX-ARGOFFSET(%rsp)
	GET_THREAD_INFO(%r10)
	cli
255
	TRACE_IRQS_OFF
L
Linus Torvalds 已提交
256 257
	testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
	jnz  int_ret_from_sys_call
258
	andl $~TS_COMPAT,threadinfo_status(%r10)
L
Linus Torvalds 已提交
259 260
	RESTORE_ARGS 1,-ARG_SKIP,1,1,1
	movl RIP-ARGOFFSET(%rsp),%ecx
261
	CFI_REGISTER rip,rcx
L
Linus Torvalds 已提交
262
	movl EFLAGS-ARGOFFSET(%rsp),%r11d	
263
	/*CFI_REGISTER rflags,r11*/
264
	TRACE_IRQS_ON
L
Linus Torvalds 已提交
265
	movl RSP-ARGOFFSET(%rsp),%esp
266
	CFI_RESTORE rsp
267
	USERGS_SYSRET32
L
Linus Torvalds 已提交
268 269
	
cstar_tracesys:	
270
	CFI_RESTORE_STATE
271
	xchgl %r9d,%ebp
L
Linus Torvalds 已提交
272 273
	SAVE_REST
	CLEAR_RREGS
274
	movq %r9,R9(%rsp)
275
	movq $-ENOSYS,RAX(%rsp)	/* ptrace can change this for a bad syscall */
L
Linus Torvalds 已提交
276 277
	movq %rsp,%rdi        /* &pt_regs -> arg1 */
	call syscall_trace_enter
278
	LOAD_ARGS32 ARGOFFSET  /* reload args from stack in case ptrace changed it */
L
Linus Torvalds 已提交
279
	RESTORE_REST
280
	xchgl %ebp,%r9d
L
Linus Torvalds 已提交
281
	movl RSP-ARGOFFSET(%rsp), %r8d
282 283
	cmpl $(IA32_NR_syscalls-1),%eax
	ja int_ret_from_sys_call /* cstar_tracesys has set RAX(%rsp) */
L
Linus Torvalds 已提交
284
	jmp cstar_do_call
285
END(ia32_cstar_target)
L
Linus Torvalds 已提交
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
				
ia32_badarg:
	movq $-EFAULT,%rax
	jmp ia32_sysret
	CFI_ENDPROC

/* 
 * Emulated IA32 system calls via int 0x80. 
 *
 * Arguments:	 
 * %eax	System call number.
 * %ebx Arg1
 * %ecx Arg2
 * %edx Arg3
 * %esi Arg4
 * %edi Arg5
 * %ebp Arg6    [note: not saved in the stack frame, should not be touched]
 *
 * Notes:
 * Uses the same stack frame as the x86-64 version.	
 * All registers except %eax must be saved (but ptrace may violate that)
 * Arguments are zero extended. For system calls that want sign extension and
 * take long arguments a wrapper is needed. Most calls can just be called
 * directly.
 * Assumes it is only called from user space and entered with interrupts off.	
 */ 				

ENTRY(ia32_syscall)
J
Jan Beulich 已提交
314
	CFI_STARTPROC32	simple
315
	CFI_SIGNAL_FRAME
316 317 318 319 320 321
	CFI_DEF_CFA	rsp,SS+8-RIP
	/*CFI_REL_OFFSET	ss,SS-RIP*/
	CFI_REL_OFFSET	rsp,RSP-RIP
	/*CFI_REL_OFFSET	rflags,EFLAGS-RIP*/
	/*CFI_REL_OFFSET	cs,CS-RIP*/
	CFI_REL_OFFSET	rip,RIP-RIP
322 323 324 325 326
	swapgs
	/*
	 * No need to follow this irqs on/off section: the syscall
	 * disabled irqs and here we enable it straight after entry:
	 */
L
Linus Torvalds 已提交
327 328 329
	sti
	movl %eax,%eax
	pushq %rax
330
	CFI_ADJUST_CFA_OFFSET 8
L
Linus Torvalds 已提交
331 332 333 334 335
	cld
	/* note the registers are not zero extended to the sf.
	   this could be a problem. */
	SAVE_ARGS 0,0,1
	GET_THREAD_INFO(%r10)
336
	orl   $TS_COMPAT,threadinfo_status(%r10)
L
Linus Torvalds 已提交
337 338 339
	testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
	jnz ia32_tracesys
ia32_do_syscall:	
340
	cmpl $(IA32_NR_syscalls-1),%eax
R
Roland McGrath 已提交
341
	ja  int_ret_from_sys_call	/* ia32_tracesys has set RAX(%rsp) */
L
Linus Torvalds 已提交
342 343 344 345 346 347 348 349
	IA32_ARG_FIXUP
	call *ia32_sys_call_table(,%rax,8) # xxx: rip relative
ia32_sysret:
	movq %rax,RAX-ARGOFFSET(%rsp)
	jmp int_ret_from_sys_call 

ia32_tracesys:			 
	SAVE_REST
J
Jan Beulich 已提交
350
	CLEAR_RREGS
R
Roland McGrath 已提交
351
	movq $-ENOSYS,RAX(%rsp)	/* ptrace can change this for a bad syscall */
L
Linus Torvalds 已提交
352 353
	movq %rsp,%rdi        /* &pt_regs -> arg1 */
	call syscall_trace_enter
354
	LOAD_ARGS32 ARGOFFSET  /* reload args from stack in case ptrace changed it */
L
Linus Torvalds 已提交
355 356
	RESTORE_REST
	jmp ia32_do_syscall
357
END(ia32_syscall)
L
Linus Torvalds 已提交
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376

ia32_badsys:
	movq $0,ORIG_RAX-ARGOFFSET(%rsp)
	movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
	jmp int_ret_from_sys_call

quiet_ni_syscall:
	movq $-ENOSYS,%rax
	ret
	CFI_ENDPROC
	
	.macro PTREGSCALL label, func, arg
	.globl \label
\label:
	leaq \func(%rip),%rax
	leaq -ARGOFFSET+8(%rsp),\arg	/* 8 for return address */
	jmp  ia32_ptregs_common	
	.endm

377
	CFI_STARTPROC32
378

L
Linus Torvalds 已提交
379 380 381 382 383 384 385 386 387 388 389
	PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn, %rdi
	PTREGSCALL stub32_sigreturn, sys32_sigreturn, %rdi
	PTREGSCALL stub32_sigaltstack, sys32_sigaltstack, %rdx
	PTREGSCALL stub32_execve, sys32_execve, %rcx
	PTREGSCALL stub32_fork, sys_fork, %rdi
	PTREGSCALL stub32_clone, sys32_clone, %rdx
	PTREGSCALL stub32_vfork, sys_vfork, %rdi
	PTREGSCALL stub32_iopl, sys_iopl, %rsi

ENTRY(ia32_ptregs_common)
	popq %r11
390 391
	CFI_ENDPROC
	CFI_STARTPROC32	simple
392
	CFI_SIGNAL_FRAME
393 394 395 396 397 398 399 400 401 402 403
	CFI_DEF_CFA	rsp,SS+8-ARGOFFSET
	CFI_REL_OFFSET	rax,RAX-ARGOFFSET
	CFI_REL_OFFSET	rcx,RCX-ARGOFFSET
	CFI_REL_OFFSET	rdx,RDX-ARGOFFSET
	CFI_REL_OFFSET	rsi,RSI-ARGOFFSET
	CFI_REL_OFFSET	rdi,RDI-ARGOFFSET
	CFI_REL_OFFSET	rip,RIP-ARGOFFSET
/*	CFI_REL_OFFSET	cs,CS-ARGOFFSET*/
/*	CFI_REL_OFFSET	rflags,EFLAGS-ARGOFFSET*/
	CFI_REL_OFFSET	rsp,RSP-ARGOFFSET
/*	CFI_REL_OFFSET	ss,SS-ARGOFFSET*/
L
Linus Torvalds 已提交
404 405 406 407 408
	SAVE_REST
	call *%rax
	RESTORE_REST
	jmp  ia32_sysret	/* misbalances the return cache */
	CFI_ENDPROC
409
END(ia32_ptregs_common)
L
Linus Torvalds 已提交
410

411
	.section .rodata,"a"
L
Linus Torvalds 已提交
412 413 414 415 416 417 418
	.align 8
ia32_sys_call_table:
	.quad sys_restart_syscall
	.quad sys_exit
	.quad stub32_fork
	.quad sys_read
	.quad sys_write
419
	.quad compat_sys_open		/* 5 */
L
Linus Torvalds 已提交
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
	.quad sys_close
	.quad sys32_waitpid
	.quad sys_creat
	.quad sys_link
	.quad sys_unlink		/* 10 */
	.quad stub32_execve
	.quad sys_chdir
	.quad compat_sys_time
	.quad sys_mknod
	.quad sys_chmod		/* 15 */
	.quad sys_lchown16
	.quad quiet_ni_syscall			/* old break syscall holder */
	.quad sys_stat
	.quad sys32_lseek
	.quad sys_getpid		/* 20 */
	.quad compat_sys_mount	/* mount  */
	.quad sys_oldumount	/* old_umount  */
	.quad sys_setuid16
	.quad sys_getuid16
	.quad compat_sys_stime	/* stime */		/* 25 */
440
	.quad compat_sys_ptrace	/* ptrace */
L
Linus Torvalds 已提交
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485
	.quad sys_alarm
	.quad sys_fstat	/* (old)fstat */
	.quad sys_pause
	.quad compat_sys_utime	/* 30 */
	.quad quiet_ni_syscall	/* old stty syscall holder */
	.quad quiet_ni_syscall	/* old gtty syscall holder */
	.quad sys_access
	.quad sys_nice	
	.quad quiet_ni_syscall	/* 35 */	/* old ftime syscall holder */
	.quad sys_sync
	.quad sys32_kill
	.quad sys_rename
	.quad sys_mkdir
	.quad sys_rmdir		/* 40 */
	.quad sys_dup
	.quad sys32_pipe
	.quad compat_sys_times
	.quad quiet_ni_syscall			/* old prof syscall holder */
	.quad sys_brk		/* 45 */
	.quad sys_setgid16
	.quad sys_getgid16
	.quad sys_signal
	.quad sys_geteuid16
	.quad sys_getegid16	/* 50 */
	.quad sys_acct
	.quad sys_umount			/* new_umount */
	.quad quiet_ni_syscall			/* old lock syscall holder */
	.quad compat_sys_ioctl
	.quad compat_sys_fcntl64		/* 55 */
	.quad quiet_ni_syscall			/* old mpx syscall holder */
	.quad sys_setpgid
	.quad quiet_ni_syscall			/* old ulimit syscall holder */
	.quad sys32_olduname
	.quad sys_umask		/* 60 */
	.quad sys_chroot
	.quad sys32_ustat
	.quad sys_dup2
	.quad sys_getppid
	.quad sys_getpgrp		/* 65 */
	.quad sys_setsid
	.quad sys32_sigaction
	.quad sys_sgetmask
	.quad sys_ssetmask
	.quad sys_setreuid16	/* 70 */
	.quad sys_setregid16
486
	.quad sys32_sigsuspend
L
Linus Torvalds 已提交
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529
	.quad compat_sys_sigpending
	.quad sys_sethostname
	.quad compat_sys_setrlimit	/* 75 */
	.quad compat_sys_old_getrlimit	/* old_getrlimit */
	.quad compat_sys_getrusage
	.quad sys32_gettimeofday
	.quad sys32_settimeofday
	.quad sys_getgroups16	/* 80 */
	.quad sys_setgroups16
	.quad sys32_old_select
	.quad sys_symlink
	.quad sys_lstat
	.quad sys_readlink		/* 85 */
	.quad sys_uselib
	.quad sys_swapon
	.quad sys_reboot
	.quad compat_sys_old_readdir
	.quad sys32_mmap		/* 90 */
	.quad sys_munmap
	.quad sys_truncate
	.quad sys_ftruncate
	.quad sys_fchmod
	.quad sys_fchown16		/* 95 */
	.quad sys_getpriority
	.quad sys_setpriority
	.quad quiet_ni_syscall			/* old profil syscall holder */
	.quad compat_sys_statfs
	.quad compat_sys_fstatfs		/* 100 */
	.quad sys_ioperm
	.quad compat_sys_socketcall
	.quad sys_syslog
	.quad compat_sys_setitimer
	.quad compat_sys_getitimer	/* 105 */
	.quad compat_sys_newstat
	.quad compat_sys_newlstat
	.quad compat_sys_newfstat
	.quad sys32_uname
	.quad stub32_iopl		/* 110 */
	.quad sys_vhangup
	.quad quiet_ni_syscall	/* old "idle" system call */
	.quad sys32_vm86_warning	/* vm86old */ 
	.quad compat_sys_wait4
	.quad sys_swapoff		/* 115 */
530
	.quad compat_sys_sysinfo
L
Linus Torvalds 已提交
531 532 533 534 535 536 537
	.quad sys32_ipc
	.quad sys_fsync
	.quad stub32_sigreturn
	.quad stub32_clone		/* 120 */
	.quad sys_setdomainname
	.quad sys_uname
	.quad sys_modify_ldt
538
	.quad compat_sys_adjtimex
L
Linus Torvalds 已提交
539 540 541 542 543 544
	.quad sys32_mprotect		/* 125 */
	.quad compat_sys_sigprocmask
	.quad quiet_ni_syscall		/* create_module */
	.quad sys_init_module
	.quad sys_delete_module
	.quad quiet_ni_syscall		/* 130  get_kernel_syms */
545
	.quad sys32_quotactl
L
Linus Torvalds 已提交
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574
	.quad sys_getpgid
	.quad sys_fchdir
	.quad quiet_ni_syscall	/* bdflush */
	.quad sys_sysfs		/* 135 */
	.quad sys_personality
	.quad quiet_ni_syscall	/* for afs_syscall */
	.quad sys_setfsuid16
	.quad sys_setfsgid16
	.quad sys_llseek		/* 140 */
	.quad compat_sys_getdents
	.quad compat_sys_select
	.quad sys_flock
	.quad sys_msync
	.quad compat_sys_readv		/* 145 */
	.quad compat_sys_writev
	.quad sys_getsid
	.quad sys_fdatasync
	.quad sys32_sysctl	/* sysctl */
	.quad sys_mlock		/* 150 */
	.quad sys_munlock
	.quad sys_mlockall
	.quad sys_munlockall
	.quad sys_sched_setparam
	.quad sys_sched_getparam   /* 155 */
	.quad sys_sched_setscheduler
	.quad sys_sched_getscheduler
	.quad sys_sched_yield
	.quad sys_sched_get_priority_max
	.quad sys_sched_get_priority_min  /* 160 */
575
	.quad sys32_sched_rr_get_interval
L
Linus Torvalds 已提交
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592
	.quad compat_sys_nanosleep
	.quad sys_mremap
	.quad sys_setresuid16
	.quad sys_getresuid16	/* 165 */
	.quad sys32_vm86_warning	/* vm86 */ 
	.quad quiet_ni_syscall	/* query_module */
	.quad sys_poll
	.quad compat_sys_nfsservctl
	.quad sys_setresgid16	/* 170 */
	.quad sys_getresgid16
	.quad sys_prctl
	.quad stub32_rt_sigreturn
	.quad sys32_rt_sigaction
	.quad sys32_rt_sigprocmask	/* 175 */
	.quad sys32_rt_sigpending
	.quad compat_sys_rt_sigtimedwait
	.quad sys32_rt_sigqueueinfo
593
	.quad sys_rt_sigsuspend
L
Linus Torvalds 已提交
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638
	.quad sys32_pread		/* 180 */
	.quad sys32_pwrite
	.quad sys_chown16
	.quad sys_getcwd
	.quad sys_capget
	.quad sys_capset
	.quad stub32_sigaltstack
	.quad sys32_sendfile
	.quad quiet_ni_syscall		/* streams1 */
	.quad quiet_ni_syscall		/* streams2 */
	.quad stub32_vfork            /* 190 */
	.quad compat_sys_getrlimit
	.quad sys32_mmap2
	.quad sys32_truncate64
	.quad sys32_ftruncate64
	.quad sys32_stat64		/* 195 */
	.quad sys32_lstat64
	.quad sys32_fstat64
	.quad sys_lchown
	.quad sys_getuid
	.quad sys_getgid		/* 200 */
	.quad sys_geteuid
	.quad sys_getegid
	.quad sys_setreuid
	.quad sys_setregid
	.quad sys_getgroups	/* 205 */
	.quad sys_setgroups
	.quad sys_fchown
	.quad sys_setresuid
	.quad sys_getresuid
	.quad sys_setresgid	/* 210 */
	.quad sys_getresgid
	.quad sys_chown
	.quad sys_setuid
	.quad sys_setgid
	.quad sys_setfsuid		/* 215 */
	.quad sys_setfsgid
	.quad sys_pivot_root
	.quad sys_mincore
	.quad sys_madvise
	.quad compat_sys_getdents64	/* 220 getdents64 */
	.quad compat_sys_fcntl64	
	.quad quiet_ni_syscall		/* tux */
	.quad quiet_ni_syscall    	/* security */
	.quad sys_gettid	
639
	.quad sys32_readahead	/* 225 */
L
Linus Torvalds 已提交
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656
	.quad sys_setxattr
	.quad sys_lsetxattr
	.quad sys_fsetxattr
	.quad sys_getxattr
	.quad sys_lgetxattr	/* 230 */
	.quad sys_fgetxattr
	.quad sys_listxattr
	.quad sys_llistxattr
	.quad sys_flistxattr
	.quad sys_removexattr	/* 235 */
	.quad sys_lremovexattr
	.quad sys_fremovexattr
	.quad sys_tkill
	.quad sys_sendfile64 
	.quad compat_sys_futex		/* 240 */
	.quad compat_sys_sched_setaffinity
	.quad compat_sys_sched_getaffinity
R
Roland McGrath 已提交
657 658
	.quad sys_set_thread_area
	.quad sys_get_thread_area
L
Linus Torvalds 已提交
659 660 661 662 663
	.quad compat_sys_io_setup	/* 245 */
	.quad sys_io_destroy
	.quad compat_sys_io_getevents
	.quad compat_sys_io_submit
	.quad sys_io_cancel
664
	.quad sys32_fadvise64		/* 250 */
L
Linus Torvalds 已提交
665 666 667 668 669 670 671 672
	.quad quiet_ni_syscall 	/* free_huge_pages */
	.quad sys_exit_group
	.quad sys32_lookup_dcookie
	.quad sys_epoll_create
	.quad sys_epoll_ctl		/* 255 */
	.quad sys_epoll_wait
	.quad sys_remap_file_pages
	.quad sys_set_tid_address
673
	.quad compat_sys_timer_create
L
Linus Torvalds 已提交
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696
	.quad compat_sys_timer_settime	/* 260 */
	.quad compat_sys_timer_gettime
	.quad sys_timer_getoverrun
	.quad sys_timer_delete
	.quad compat_sys_clock_settime
	.quad compat_sys_clock_gettime	/* 265 */
	.quad compat_sys_clock_getres
	.quad compat_sys_clock_nanosleep
	.quad compat_sys_statfs64
	.quad compat_sys_fstatfs64
	.quad sys_tgkill		/* 270 */
	.quad compat_sys_utimes
	.quad sys32_fadvise64_64
	.quad quiet_ni_syscall	/* sys_vserver */
	.quad sys_mbind
	.quad compat_sys_get_mempolicy	/* 275 */
	.quad sys_set_mempolicy
	.quad compat_sys_mq_open
	.quad sys_mq_unlink
	.quad compat_sys_mq_timedsend
	.quad compat_sys_mq_timedreceive	/* 280 */
	.quad compat_sys_mq_notify
	.quad compat_sys_mq_getsetattr
697
	.quad compat_sys_kexec_load	/* reserved for kexec */
L
Linus Torvalds 已提交
698
	.quad compat_sys_waitid
699
	.quad quiet_ni_syscall		/* 285: sys_altroot */
L
Linus Torvalds 已提交
700 701 702
	.quad sys_add_key
	.quad sys_request_key
	.quad sys_keyctl
703 704 705 706 707
	.quad sys_ioprio_set
	.quad sys_ioprio_get		/* 290 */
	.quad sys_inotify_init
	.quad sys_inotify_add_watch
	.quad sys_inotify_rm_watch
708
	.quad sys_migrate_pages
709 710 711 712
	.quad compat_sys_openat		/* 295 */
	.quad sys_mkdirat
	.quad sys_mknodat
	.quad sys_fchownat
713
	.quad compat_sys_futimesat
U
Ulrich Drepper 已提交
714
	.quad sys32_fstatat		/* 300 */
715 716 717 718 719 720 721
	.quad sys_unlinkat
	.quad sys_renameat
	.quad sys_linkat
	.quad sys_symlinkat
	.quad sys_readlinkat		/* 305 */
	.quad sys_fchmodat
	.quad sys_faccessat
A
Andi Kleen 已提交
722 723
	.quad compat_sys_pselect6
	.quad compat_sys_ppoll
A
Andi Kleen 已提交
724
	.quad sys_unshare		/* 310 */
725 726
	.quad compat_sys_set_robust_list
	.quad compat_sys_get_robust_list
727
	.quad sys_splice
728
	.quad sys32_sync_file_range
U
Ulrich Drepper 已提交
729
	.quad sys_tee			/* 315 */
730
	.quad compat_sys_vmsplice
731
	.quad compat_sys_move_pages
732
	.quad sys_getcpu
733
	.quad sys_epoll_pwait
U
Ulrich Drepper 已提交
734
	.quad compat_sys_utimensat	/* 320 */
735
	.quad compat_sys_signalfd
736
	.quad sys_timerfd_create
737
	.quad sys_eventfd
738
	.quad sys32_fallocate
739 740
	.quad compat_sys_timerfd_settime	/* 325 */
	.quad compat_sys_timerfd_gettime
741
ia32_syscall_end: