| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
 | 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 Ravnborg | e2d5df9 | 2005-09-09 21:28:48 +0200 | [diff] [blame] | 9 | #include <asm/asm-offsets.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #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 Molnar | 2601e64 | 2006-07-03 00:24:45 -0700 | [diff] [blame] | 16 | #include <asm/irqflags.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | #include <linux/linkage.h> | 
 | 18 |  | 
| Andi Kleen | 67d53ea | 2006-04-07 19:50:31 +0200 | [diff] [blame] | 19 | #define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8) | 
 | 20 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | 	.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 Beulich | 2765130 | 2006-01-11 22:41:59 +0100 | [diff] [blame] | 41 | 	.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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | /* | 
 | 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 |  */ 	 | 
 | 72 | ENTRY(ia32_sysenter_target) | 
| Jan Beulich | 2765130 | 2006-01-11 22:41:59 +0100 | [diff] [blame] | 73 | 	CFI_STARTPROC32	simple | 
| Jan Beulich | adf1423 | 2006-09-26 10:52:41 +0200 | [diff] [blame] | 74 | 	CFI_SIGNAL_FRAME | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 75 | 	CFI_DEF_CFA	rsp,0 | 
 | 76 | 	CFI_REGISTER	rsp,rbp | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | 	swapgs | 
 | 78 | 	movq	%gs:pda_kernelstack, %rsp | 
 | 79 | 	addq	$(PDA_STACKOFFSET),%rsp	 | 
| Ingo Molnar | 2601e64 | 2006-07-03 00:24:45 -0700 | [diff] [blame] | 80 | 	/* | 
 | 81 | 	 * No need to follow this irqs on/off section: the syscall | 
 | 82 | 	 * disabled irqs, here we enable it straight after entry: | 
 | 83 | 	 */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | 	sti	 | 
 | 85 |  	movl	%ebp,%ebp		/* zero extension */ | 
 | 86 | 	pushq	$__USER32_DS | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 87 | 	CFI_ADJUST_CFA_OFFSET 8 | 
 | 88 | 	/*CFI_REL_OFFSET ss,0*/ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | 	pushq	%rbp | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 90 | 	CFI_ADJUST_CFA_OFFSET 8 | 
 | 91 | 	CFI_REL_OFFSET rsp,0 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | 	pushfq | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 93 | 	CFI_ADJUST_CFA_OFFSET 8 | 
 | 94 | 	/*CFI_REL_OFFSET rflags,0*/ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | 	movl	$VSYSCALL32_SYSEXIT, %r10d | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 96 | 	CFI_REGISTER rip,r10 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | 	pushq	$__USER32_CS | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 98 | 	CFI_ADJUST_CFA_OFFSET 8 | 
 | 99 | 	/*CFI_REL_OFFSET cs,0*/ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | 	movl	%eax, %eax | 
 | 101 | 	pushq	%r10 | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 102 | 	CFI_ADJUST_CFA_OFFSET 8 | 
 | 103 | 	CFI_REL_OFFSET rip,0 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | 	pushq	%rax | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 105 | 	CFI_ADJUST_CFA_OFFSET 8 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 106 | 	cld | 
| Andi Kleen | 0e92da4 | 2006-07-28 14:44:45 +0200 | [diff] [blame] | 107 | 	SAVE_ARGS 0,0,0 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 |  	/* no need to do an access_ok check here because rbp has been | 
 | 109 |  	   32bit zero extended */  | 
 | 110 | 1:	movl	(%rbp),%r9d | 
 | 111 |  	.section __ex_table,"a" | 
 | 112 |  	.quad 1b,ia32_badarg | 
 | 113 |  	.previous	 | 
 | 114 | 	GET_THREAD_INFO(%r10) | 
| Andi Kleen | bf2fcc6 | 2006-01-11 22:44:06 +0100 | [diff] [blame] | 115 | 	orl    $TS_COMPAT,threadinfo_status(%r10) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | 	testl  $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10) | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 117 | 	CFI_REMEMBER_STATE | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | 	jnz  sysenter_tracesys | 
 | 119 | sysenter_do_call:	 | 
| Andi Kleen | 67d53ea | 2006-04-07 19:50:31 +0200 | [diff] [blame] | 120 | 	cmpl	$(IA32_NR_syscalls-1),%eax | 
 | 121 | 	ja	ia32_badsys | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | 	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 Molnar | 2601e64 | 2006-07-03 00:24:45 -0700 | [diff] [blame] | 127 | 	TRACE_IRQS_OFF | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 128 | 	testl	$_TIF_ALLWORK_MASK,threadinfo_flags(%r10) | 
 | 129 | 	jnz	int_ret_from_sys_call | 
| Andi Kleen | bf2fcc6 | 2006-01-11 22:44:06 +0100 | [diff] [blame] | 130 | 	andl    $~TS_COMPAT,threadinfo_status(%r10) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | 	/* 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 Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 135 | 	CFI_ADJUST_CFA_OFFSET -8 | 
 | 136 | 	/*CFI_RESTORE rflags*/ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 137 | 	popq	%rcx				/* User %esp */ | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 138 | 	CFI_ADJUST_CFA_OFFSET -8 | 
 | 139 | 	CFI_REGISTER rsp,rcx | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | 	movl	$VSYSCALL32_SYSEXIT,%edx	/* User %eip */ | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 141 | 	CFI_REGISTER rip,rdx | 
| Ingo Molnar | 2601e64 | 2006-07-03 00:24:45 -0700 | [diff] [blame] | 142 | 	TRACE_IRQS_ON | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | 	swapgs | 
 | 144 | 	sti		/* sti only takes effect after the next instruction */ | 
 | 145 | 	/* sysexit */ | 
 | 146 | 	.byte	0xf, 0x35 | 
 | 147 |  | 
 | 148 | sysenter_tracesys: | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 149 | 	CFI_RESTORE_STATE | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 150 | 	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 */  | 
 | 160 | 1:	movl	(%rbp),%r9d | 
 | 161 | 	.section __ex_table,"a" | 
 | 162 | 	.quad 1b,ia32_badarg | 
 | 163 | 	.previous | 
 | 164 | 	jmp	sysenter_do_call | 
 | 165 | 	CFI_ENDPROC | 
| Jan Beulich | 4b787e0 | 2006-06-26 13:56:55 +0200 | [diff] [blame] | 166 | ENDPROC(ia32_sysenter_target) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 167 |  | 
 | 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 |  */ 	 | 
 | 188 | ENTRY(ia32_cstar_target) | 
| Jan Beulich | 2765130 | 2006-01-11 22:41:59 +0100 | [diff] [blame] | 189 | 	CFI_STARTPROC32	simple | 
| Jan Beulich | adf1423 | 2006-09-26 10:52:41 +0200 | [diff] [blame] | 190 | 	CFI_SIGNAL_FRAME | 
| Jan Beulich | dffead4 | 2006-06-26 13:57:38 +0200 | [diff] [blame] | 191 | 	CFI_DEF_CFA	rsp,PDA_STACKOFFSET | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 192 | 	CFI_REGISTER	rip,rcx | 
 | 193 | 	/*CFI_REGISTER	rflags,r11*/ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 194 | 	swapgs | 
 | 195 | 	movl	%esp,%r8d | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 196 | 	CFI_REGISTER	rsp,r8 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 197 | 	movq	%gs:pda_kernelstack,%rsp | 
| Ingo Molnar | 2601e64 | 2006-07-03 00:24:45 -0700 | [diff] [blame] | 198 | 	/* | 
 | 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 202 | 	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 Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 207 | 	CFI_REL_OFFSET rip,RIP-ARGOFFSET | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | 	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 Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 213 | 	/*CFI_REL_OFFSET rflags,EFLAGS-ARGOFFSET*/ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 214 | 	movq	%r8,RSP-ARGOFFSET(%rsp)	 | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 215 | 	CFI_REL_OFFSET rsp,RSP-ARGOFFSET | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 216 | 	/* no need to do an access_ok check here because r8 has been | 
 | 217 | 	   32bit zero extended */  | 
 | 218 | 	/* hardware stack frame is complete now */	 | 
 | 219 | 1:	movl	(%r8),%r9d | 
 | 220 | 	.section __ex_table,"a" | 
 | 221 | 	.quad 1b,ia32_badarg | 
 | 222 | 	.previous	 | 
 | 223 | 	GET_THREAD_INFO(%r10) | 
| Andi Kleen | bf2fcc6 | 2006-01-11 22:44:06 +0100 | [diff] [blame] | 224 | 	orl   $TS_COMPAT,threadinfo_status(%r10) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 225 | 	testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10) | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 226 | 	CFI_REMEMBER_STATE | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 227 | 	jnz   cstar_tracesys | 
 | 228 | cstar_do_call:	 | 
| Andi Kleen | 67d53ea | 2006-04-07 19:50:31 +0200 | [diff] [blame] | 229 | 	cmpl $IA32_NR_syscalls-1,%eax | 
 | 230 | 	ja  ia32_badsys | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 231 | 	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 Molnar | 2601e64 | 2006-07-03 00:24:45 -0700 | [diff] [blame] | 236 | 	TRACE_IRQS_OFF | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 237 | 	testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10) | 
 | 238 | 	jnz  int_ret_from_sys_call | 
| Andi Kleen | bf2fcc6 | 2006-01-11 22:44:06 +0100 | [diff] [blame] | 239 | 	andl $~TS_COMPAT,threadinfo_status(%r10) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 240 | 	RESTORE_ARGS 1,-ARG_SKIP,1,1,1 | 
 | 241 | 	movl RIP-ARGOFFSET(%rsp),%ecx | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 242 | 	CFI_REGISTER rip,rcx | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | 	movl EFLAGS-ARGOFFSET(%rsp),%r11d	 | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 244 | 	/*CFI_REGISTER rflags,r11*/ | 
| Ingo Molnar | 2601e64 | 2006-07-03 00:24:45 -0700 | [diff] [blame] | 245 | 	TRACE_IRQS_ON | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | 	movl RSP-ARGOFFSET(%rsp),%esp | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 247 | 	CFI_RESTORE rsp | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 248 | 	swapgs | 
 | 249 | 	sysretl | 
 | 250 | 	 | 
 | 251 | cstar_tracesys:	 | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 252 | 	CFI_RESTORE_STATE | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 253 | 	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 */  | 
 | 263 | 1:	movl	(%r8),%r9d | 
 | 264 | 	.section __ex_table,"a" | 
 | 265 | 	.quad 1b,ia32_badarg | 
 | 266 | 	.previous | 
 | 267 | 	jmp cstar_do_call | 
| Jan Beulich | 4b787e0 | 2006-06-26 13:56:55 +0200 | [diff] [blame] | 268 | END(ia32_cstar_target) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 269 | 				 | 
 | 270 | ia32_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 |  | 
 | 296 | ENTRY(ia32_syscall) | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 297 | 	CFI_STARTPROC	simple | 
| Jan Beulich | adf1423 | 2006-09-26 10:52:41 +0200 | [diff] [blame] | 298 | 	CFI_SIGNAL_FRAME | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 299 | 	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 Molnar | 2601e64 | 2006-07-03 00:24:45 -0700 | [diff] [blame] | 305 | 	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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 310 | 	sti | 
 | 311 | 	movl %eax,%eax | 
 | 312 | 	pushq %rax | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 313 | 	CFI_ADJUST_CFA_OFFSET 8 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 314 | 	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 Kleen | bf2fcc6 | 2006-01-11 22:44:06 +0100 | [diff] [blame] | 319 | 	orl   $TS_COMPAT,threadinfo_status(%r10) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 320 | 	testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10) | 
 | 321 | 	jnz ia32_tracesys | 
 | 322 | ia32_do_syscall:	 | 
| Andi Kleen | 67d53ea | 2006-04-07 19:50:31 +0200 | [diff] [blame] | 323 | 	cmpl $(IA32_NR_syscalls-1),%eax | 
 | 324 | 	ja  ia32_badsys | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 325 | 	IA32_ARG_FIXUP | 
 | 326 | 	call *ia32_sys_call_table(,%rax,8) # xxx: rip relative | 
 | 327 | ia32_sysret: | 
 | 328 | 	movq %rax,RAX-ARGOFFSET(%rsp) | 
 | 329 | 	jmp int_ret_from_sys_call  | 
 | 330 |  | 
 | 331 | ia32_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 Beulich | 4b787e0 | 2006-06-26 13:56:55 +0200 | [diff] [blame] | 339 | END(ia32_syscall) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 340 |  | 
 | 341 | ia32_badsys: | 
 | 342 | 	movq $0,ORIG_RAX-ARGOFFSET(%rsp) | 
 | 343 | 	movq $-ENOSYS,RAX-ARGOFFSET(%rsp) | 
 | 344 | 	jmp int_ret_from_sys_call | 
 | 345 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 346 | quiet_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 Beulich | 2765130 | 2006-01-11 22:41:59 +0100 | [diff] [blame] | 359 | 	CFI_STARTPROC32 | 
| Jan Beulich | 7effaa8 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 360 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 361 | 	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 |  | 
 | 372 | ENTRY(ia32_ptregs_common) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 373 | 	popq %r11 | 
| Jan Beulich | 2765130 | 2006-01-11 22:41:59 +0100 | [diff] [blame] | 374 | 	CFI_ENDPROC | 
 | 375 | 	CFI_STARTPROC32	simple | 
| Jan Beulich | adf1423 | 2006-09-26 10:52:41 +0200 | [diff] [blame] | 376 | 	CFI_SIGNAL_FRAME | 
| Jan Beulich | 2765130 | 2006-01-11 22:41:59 +0100 | [diff] [blame] | 377 | 	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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 388 | 	SAVE_REST | 
 | 389 | 	call *%rax | 
 | 390 | 	RESTORE_REST | 
 | 391 | 	jmp  ia32_sysret	/* misbalances the return cache */ | 
 | 392 | 	CFI_ENDPROC | 
| Jan Beulich | 4b787e0 | 2006-06-26 13:56:55 +0200 | [diff] [blame] | 393 | END(ia32_ptregs_common) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 394 |  | 
| Arjan van de Ven | bb152f5 | 2006-01-06 00:12:05 -0800 | [diff] [blame] | 395 | 	.section .rodata,"a" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 396 | 	.align 8 | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 397 | ia32_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 Szeredi | e922efc | 2005-09-06 15:18:25 -0700 | [diff] [blame] | 403 | 	.quad compat_sys_open		/* 5 */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 404 | 	.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 */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 484 | 	.quad sys_uselib | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 485 | 	.quad sys_swapon | 
 | 486 | 	.quad sys_reboot | 
 | 487 | 	.quad compat_sys_old_readdir | 
 | 488 | 	.quad sys32_mmap		/* 90 */ | 
 | 489 | 	.quad sys_munmap | 
 | 490 | 	.quad sys_truncate | 
 | 491 | 	.quad sys_ftruncate | 
 | 492 | 	.quad sys_fchmod | 
 | 493 | 	.quad sys_fchown16		/* 95 */ | 
 | 494 | 	.quad sys_getpriority | 
 | 495 | 	.quad sys_setpriority | 
 | 496 | 	.quad quiet_ni_syscall			/* old profil syscall holder */ | 
 | 497 | 	.quad compat_sys_statfs | 
 | 498 | 	.quad compat_sys_fstatfs		/* 100 */ | 
 | 499 | 	.quad sys_ioperm | 
 | 500 | 	.quad compat_sys_socketcall | 
 | 501 | 	.quad sys_syslog | 
 | 502 | 	.quad compat_sys_setitimer | 
 | 503 | 	.quad compat_sys_getitimer	/* 105 */ | 
 | 504 | 	.quad compat_sys_newstat | 
 | 505 | 	.quad compat_sys_newlstat | 
 | 506 | 	.quad compat_sys_newfstat | 
 | 507 | 	.quad sys32_uname | 
 | 508 | 	.quad stub32_iopl		/* 110 */ | 
 | 509 | 	.quad sys_vhangup | 
 | 510 | 	.quad quiet_ni_syscall	/* old "idle" system call */ | 
 | 511 | 	.quad sys32_vm86_warning	/* vm86old */  | 
 | 512 | 	.quad compat_sys_wait4 | 
 | 513 | 	.quad sys_swapoff		/* 115 */ | 
| Kyle McMartin | d4d23ad | 2007-02-10 01:46:00 -0800 | [diff] [blame] | 514 | 	.quad compat_sys_sysinfo | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 515 | 	.quad sys32_ipc | 
 | 516 | 	.quad sys_fsync | 
 | 517 | 	.quad stub32_sigreturn | 
 | 518 | 	.quad stub32_clone		/* 120 */ | 
 | 519 | 	.quad sys_setdomainname | 
 | 520 | 	.quad sys_uname | 
 | 521 | 	.quad sys_modify_ldt | 
| Stephen Rothwell | 3158e94 | 2006-03-26 01:37:29 -0800 | [diff] [blame] | 522 | 	.quad compat_sys_adjtimex | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 523 | 	.quad sys32_mprotect		/* 125 */ | 
 | 524 | 	.quad compat_sys_sigprocmask | 
 | 525 | 	.quad quiet_ni_syscall		/* create_module */ | 
 | 526 | 	.quad sys_init_module | 
 | 527 | 	.quad sys_delete_module | 
 | 528 | 	.quad quiet_ni_syscall		/* 130  get_kernel_syms */ | 
| Vasily Tarasov | b716395 | 2007-07-15 23:41:12 -0700 | [diff] [blame] | 529 | 	.quad sys32_quotactl | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 530 | 	.quad sys_getpgid | 
 | 531 | 	.quad sys_fchdir | 
 | 532 | 	.quad quiet_ni_syscall	/* bdflush */ | 
 | 533 | 	.quad sys_sysfs		/* 135 */ | 
 | 534 | 	.quad sys_personality | 
 | 535 | 	.quad quiet_ni_syscall	/* for afs_syscall */ | 
 | 536 | 	.quad sys_setfsuid16 | 
 | 537 | 	.quad sys_setfsgid16 | 
 | 538 | 	.quad sys_llseek		/* 140 */ | 
 | 539 | 	.quad compat_sys_getdents | 
 | 540 | 	.quad compat_sys_select | 
 | 541 | 	.quad sys_flock | 
 | 542 | 	.quad sys_msync | 
 | 543 | 	.quad compat_sys_readv		/* 145 */ | 
 | 544 | 	.quad compat_sys_writev | 
 | 545 | 	.quad sys_getsid | 
 | 546 | 	.quad sys_fdatasync | 
 | 547 | 	.quad sys32_sysctl	/* sysctl */ | 
 | 548 | 	.quad sys_mlock		/* 150 */ | 
 | 549 | 	.quad sys_munlock | 
 | 550 | 	.quad sys_mlockall | 
 | 551 | 	.quad sys_munlockall | 
 | 552 | 	.quad sys_sched_setparam | 
 | 553 | 	.quad sys_sched_getparam   /* 155 */ | 
 | 554 | 	.quad sys_sched_setscheduler | 
 | 555 | 	.quad sys_sched_getscheduler | 
 | 556 | 	.quad sys_sched_yield | 
 | 557 | 	.quad sys_sched_get_priority_max | 
 | 558 | 	.quad sys_sched_get_priority_min  /* 160 */ | 
| Alexandr Andreev | a9bc3bf | 2007-03-16 21:07:36 +0100 | [diff] [blame] | 559 | 	.quad sys32_sched_rr_get_interval | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 560 | 	.quad compat_sys_nanosleep | 
 | 561 | 	.quad sys_mremap | 
 | 562 | 	.quad sys_setresuid16 | 
 | 563 | 	.quad sys_getresuid16	/* 165 */ | 
 | 564 | 	.quad sys32_vm86_warning	/* vm86 */  | 
 | 565 | 	.quad quiet_ni_syscall	/* query_module */ | 
 | 566 | 	.quad sys_poll | 
 | 567 | 	.quad compat_sys_nfsservctl | 
 | 568 | 	.quad sys_setresgid16	/* 170 */ | 
 | 569 | 	.quad sys_getresgid16 | 
 | 570 | 	.quad sys_prctl | 
 | 571 | 	.quad stub32_rt_sigreturn | 
 | 572 | 	.quad sys32_rt_sigaction | 
 | 573 | 	.quad sys32_rt_sigprocmask	/* 175 */ | 
 | 574 | 	.quad sys32_rt_sigpending | 
 | 575 | 	.quad compat_sys_rt_sigtimedwait | 
 | 576 | 	.quad sys32_rt_sigqueueinfo | 
 | 577 | 	.quad stub32_rt_sigsuspend | 
 | 578 | 	.quad sys32_pread		/* 180 */ | 
 | 579 | 	.quad sys32_pwrite | 
 | 580 | 	.quad sys_chown16 | 
 | 581 | 	.quad sys_getcwd | 
 | 582 | 	.quad sys_capget | 
 | 583 | 	.quad sys_capset | 
 | 584 | 	.quad stub32_sigaltstack | 
 | 585 | 	.quad sys32_sendfile | 
 | 586 | 	.quad quiet_ni_syscall		/* streams1 */ | 
 | 587 | 	.quad quiet_ni_syscall		/* streams2 */ | 
 | 588 | 	.quad stub32_vfork            /* 190 */ | 
 | 589 | 	.quad compat_sys_getrlimit | 
 | 590 | 	.quad sys32_mmap2 | 
 | 591 | 	.quad sys32_truncate64 | 
 | 592 | 	.quad sys32_ftruncate64 | 
 | 593 | 	.quad sys32_stat64		/* 195 */ | 
 | 594 | 	.quad sys32_lstat64 | 
 | 595 | 	.quad sys32_fstat64 | 
 | 596 | 	.quad sys_lchown | 
 | 597 | 	.quad sys_getuid | 
 | 598 | 	.quad sys_getgid		/* 200 */ | 
 | 599 | 	.quad sys_geteuid | 
 | 600 | 	.quad sys_getegid | 
 | 601 | 	.quad sys_setreuid | 
 | 602 | 	.quad sys_setregid | 
 | 603 | 	.quad sys_getgroups	/* 205 */ | 
 | 604 | 	.quad sys_setgroups | 
 | 605 | 	.quad sys_fchown | 
 | 606 | 	.quad sys_setresuid | 
 | 607 | 	.quad sys_getresuid | 
 | 608 | 	.quad sys_setresgid	/* 210 */ | 
 | 609 | 	.quad sys_getresgid | 
 | 610 | 	.quad sys_chown | 
 | 611 | 	.quad sys_setuid | 
 | 612 | 	.quad sys_setgid | 
 | 613 | 	.quad sys_setfsuid		/* 215 */ | 
 | 614 | 	.quad sys_setfsgid | 
 | 615 | 	.quad sys_pivot_root | 
 | 616 | 	.quad sys_mincore | 
 | 617 | 	.quad sys_madvise | 
 | 618 | 	.quad compat_sys_getdents64	/* 220 getdents64 */ | 
 | 619 | 	.quad compat_sys_fcntl64	 | 
 | 620 | 	.quad quiet_ni_syscall		/* tux */ | 
 | 621 | 	.quad quiet_ni_syscall    	/* security */ | 
 | 622 | 	.quad sys_gettid	 | 
| Andi Kleen | e412ac4 | 2007-06-20 12:23:30 +0200 | [diff] [blame] | 623 | 	.quad sys32_readahead	/* 225 */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 624 | 	.quad sys_setxattr | 
 | 625 | 	.quad sys_lsetxattr | 
 | 626 | 	.quad sys_fsetxattr | 
 | 627 | 	.quad sys_getxattr | 
 | 628 | 	.quad sys_lgetxattr	/* 230 */ | 
 | 629 | 	.quad sys_fgetxattr | 
 | 630 | 	.quad sys_listxattr | 
 | 631 | 	.quad sys_llistxattr | 
 | 632 | 	.quad sys_flistxattr | 
 | 633 | 	.quad sys_removexattr	/* 235 */ | 
 | 634 | 	.quad sys_lremovexattr | 
 | 635 | 	.quad sys_fremovexattr | 
 | 636 | 	.quad sys_tkill | 
 | 637 | 	.quad sys_sendfile64  | 
 | 638 | 	.quad compat_sys_futex		/* 240 */ | 
 | 639 | 	.quad compat_sys_sched_setaffinity | 
 | 640 | 	.quad compat_sys_sched_getaffinity | 
 | 641 | 	.quad sys32_set_thread_area | 
 | 642 | 	.quad sys32_get_thread_area | 
 | 643 | 	.quad compat_sys_io_setup	/* 245 */ | 
 | 644 | 	.quad sys_io_destroy | 
 | 645 | 	.quad compat_sys_io_getevents | 
 | 646 | 	.quad compat_sys_io_submit | 
 | 647 | 	.quad sys_io_cancel | 
| Andi Kleen | e412ac4 | 2007-06-20 12:23:30 +0200 | [diff] [blame] | 648 | 	.quad sys32_fadvise64		/* 250 */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 649 | 	.quad quiet_ni_syscall 	/* free_huge_pages */ | 
 | 650 | 	.quad sys_exit_group | 
 | 651 | 	.quad sys32_lookup_dcookie | 
 | 652 | 	.quad sys_epoll_create | 
 | 653 | 	.quad sys_epoll_ctl		/* 255 */ | 
 | 654 | 	.quad sys_epoll_wait | 
 | 655 | 	.quad sys_remap_file_pages | 
 | 656 | 	.quad sys_set_tid_address | 
| Christoph Hellwig | 3a0f69d | 2006-01-09 20:52:08 -0800 | [diff] [blame] | 657 | 	.quad compat_sys_timer_create | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 658 | 	.quad compat_sys_timer_settime	/* 260 */ | 
 | 659 | 	.quad compat_sys_timer_gettime | 
 | 660 | 	.quad sys_timer_getoverrun | 
 | 661 | 	.quad sys_timer_delete | 
 | 662 | 	.quad compat_sys_clock_settime | 
 | 663 | 	.quad compat_sys_clock_gettime	/* 265 */ | 
 | 664 | 	.quad compat_sys_clock_getres | 
 | 665 | 	.quad compat_sys_clock_nanosleep | 
 | 666 | 	.quad compat_sys_statfs64 | 
 | 667 | 	.quad compat_sys_fstatfs64 | 
 | 668 | 	.quad sys_tgkill		/* 270 */ | 
 | 669 | 	.quad compat_sys_utimes | 
 | 670 | 	.quad sys32_fadvise64_64 | 
 | 671 | 	.quad quiet_ni_syscall	/* sys_vserver */ | 
 | 672 | 	.quad sys_mbind | 
 | 673 | 	.quad compat_sys_get_mempolicy	/* 275 */ | 
 | 674 | 	.quad sys_set_mempolicy | 
 | 675 | 	.quad compat_sys_mq_open | 
 | 676 | 	.quad sys_mq_unlink | 
 | 677 | 	.quad compat_sys_mq_timedsend | 
 | 678 | 	.quad compat_sys_mq_timedreceive	/* 280 */ | 
 | 679 | 	.quad compat_sys_mq_notify | 
 | 680 | 	.quad compat_sys_mq_getsetattr | 
| Eric W. Biederman | 5234f5e | 2005-06-25 14:58:02 -0700 | [diff] [blame] | 681 | 	.quad compat_sys_kexec_load	/* reserved for kexec */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 682 | 	.quad compat_sys_waitid | 
| Robert Love | 725b38ab | 2005-07-25 15:19:29 -0400 | [diff] [blame] | 683 | 	.quad quiet_ni_syscall		/* 285: sys_altroot */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 684 | 	.quad sys_add_key | 
 | 685 | 	.quad sys_request_key | 
 | 686 | 	.quad sys_keyctl | 
| Robert Love | 725b38ab | 2005-07-25 15:19:29 -0400 | [diff] [blame] | 687 | 	.quad sys_ioprio_set | 
 | 688 | 	.quad sys_ioprio_get		/* 290 */ | 
 | 689 | 	.quad sys_inotify_init | 
 | 690 | 	.quad sys_inotify_add_watch | 
 | 691 | 	.quad sys_inotify_rm_watch | 
| Christoph Lameter | 3974388 | 2006-01-08 01:00:51 -0800 | [diff] [blame] | 692 | 	.quad sys_migrate_pages | 
| Ulrich Drepper | a60fc51 | 2006-01-18 17:43:56 -0800 | [diff] [blame] | 693 | 	.quad compat_sys_openat		/* 295 */ | 
 | 694 | 	.quad sys_mkdirat | 
 | 695 | 	.quad sys_mknodat | 
 | 696 | 	.quad sys_fchownat | 
| Andrew Morton | 3833a70 | 2006-02-01 03:04:32 -0800 | [diff] [blame] | 697 | 	.quad compat_sys_futimesat | 
| Ulrich Drepper | cff2b76 | 2006-02-11 17:55:47 -0800 | [diff] [blame] | 698 | 	.quad sys32_fstatat		/* 300 */ | 
| Ulrich Drepper | a60fc51 | 2006-01-18 17:43:56 -0800 | [diff] [blame] | 699 | 	.quad sys_unlinkat | 
 | 700 | 	.quad sys_renameat | 
 | 701 | 	.quad sys_linkat | 
 | 702 | 	.quad sys_symlinkat | 
 | 703 | 	.quad sys_readlinkat		/* 305 */ | 
 | 704 | 	.quad sys_fchmodat | 
 | 705 | 	.quad sys_faccessat | 
| Andi Kleen | 957dc87 | 2006-09-26 10:52:27 +0200 | [diff] [blame] | 706 | 	.quad compat_sys_pselect6 | 
 | 707 | 	.quad compat_sys_ppoll | 
| Andi Kleen | 4b88f09 | 2006-02-09 00:35:50 +0100 | [diff] [blame] | 708 | 	.quad sys_unshare		/* 310 */ | 
| Ingo Molnar | 8fdd6c6 | 2006-03-27 01:16:26 -0800 | [diff] [blame] | 709 | 	.quad compat_sys_set_robust_list | 
 | 710 | 	.quad compat_sys_get_robust_list | 
| Andi Kleen | b8feb47 | 2006-04-07 19:50:34 +0200 | [diff] [blame] | 711 | 	.quad sys_splice | 
| Andi Kleen | e412ac4 | 2007-06-20 12:23:30 +0200 | [diff] [blame] | 712 | 	.quad sys32_sync_file_range | 
| Ulrich Drepper | 1c710c8 | 2007-05-08 00:33:25 -0700 | [diff] [blame] | 713 | 	.quad sys_tee			/* 315 */ | 
| Andi Kleen | d261020 | 2006-05-01 12:15:48 -0700 | [diff] [blame] | 714 | 	.quad compat_sys_vmsplice | 
| Christoph Lameter | 1b2db9f | 2006-06-23 02:03:56 -0700 | [diff] [blame] | 715 | 	.quad compat_sys_move_pages | 
| Andi Kleen | 3cfc348 | 2006-09-26 10:52:28 +0200 | [diff] [blame] | 716 | 	.quad sys_getcpu | 
| Ralf Baechle | 9af3cf0 | 2007-02-13 13:26:26 +0100 | [diff] [blame] | 717 | 	.quad sys_epoll_pwait | 
| Ulrich Drepper | 1c710c8 | 2007-05-08 00:33:25 -0700 | [diff] [blame] | 718 | 	.quad compat_sys_utimensat	/* 320 */ | 
| Heiko Carstens | ae7d5c8 | 2007-05-12 17:27:41 +0200 | [diff] [blame] | 719 | 	.quad compat_sys_signalfd | 
 | 720 | 	.quad compat_sys_timerfd | 
| Davide Libenzi | fdb902b | 2007-05-10 22:23:20 -0700 | [diff] [blame] | 721 | 	.quad sys_eventfd | 
| Amit Arora | 97ac735 | 2007-07-17 21:42:44 -0400 | [diff] [blame] | 722 | 	.quad sys32_fallocate | 
| Heiko Carstens | ae7d5c8 | 2007-05-12 17:27:41 +0200 | [diff] [blame] | 723 | ia32_syscall_end: |