x86/asm/entry/32: Stop caching MSR_IA32_SYSENTER_ESP in tss.sp1
[deliverable/linux.git] / arch / x86 / ia32 / ia32entry.S
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>
9 #include <asm/asm-offsets.h>
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/irqflags.h>
16 #include <asm/asm.h>
17 #include <asm/smap.h>
18 #include <linux/linkage.h>
19 #include <linux/err.h>
20
21 /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
22 #include <linux/elf-em.h>
23 #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE)
24 #define __AUDIT_ARCH_LE 0x40000000
25
26 #ifndef CONFIG_AUDITSYSCALL
27 #define sysexit_audit ia32_ret_from_sys_call
28 #define sysretl_audit ia32_ret_from_sys_call
29 #endif
30
31 .section .entry.text, "ax"
32
33 /* clobbers %rax */
34 .macro CLEAR_RREGS _r9=rax
35 xorl %eax,%eax
36 movq %rax,R11(%rsp)
37 movq %rax,R10(%rsp)
38 movq %\_r9,R9(%rsp)
39 movq %rax,R8(%rsp)
40 .endm
41
42 /*
43 * Reload arg registers from stack in case ptrace changed them.
44 * We don't reload %eax because syscall_trace_enter() returned
45 * the %rax value we should see. Instead, we just truncate that
46 * value to 32 bits again as we did on entry from user mode.
47 * If it's a new value set by user_regset during entry tracing,
48 * this matches the normal truncation of the user-mode value.
49 * If it's -1 to make us punt the syscall, then (u32)-1 is still
50 * an appropriately invalid value.
51 */
52 .macro LOAD_ARGS32 _r9=0
53 .if \_r9
54 movl R9(%rsp),%r9d
55 .endif
56 movl RCX(%rsp),%ecx
57 movl RDX(%rsp),%edx
58 movl RSI(%rsp),%esi
59 movl RDI(%rsp),%edi
60 movl %eax,%eax /* zero extension */
61 .endm
62
63 .macro CFI_STARTPROC32 simple
64 CFI_STARTPROC \simple
65 CFI_UNDEFINED r8
66 CFI_UNDEFINED r9
67 CFI_UNDEFINED r10
68 CFI_UNDEFINED r11
69 CFI_UNDEFINED r12
70 CFI_UNDEFINED r13
71 CFI_UNDEFINED r14
72 CFI_UNDEFINED r15
73 .endm
74
75 #ifdef CONFIG_PARAVIRT
76 ENTRY(native_usergs_sysret32)
77 swapgs
78 sysretl
79 ENDPROC(native_usergs_sysret32)
80
81 ENTRY(native_irq_enable_sysexit)
82 swapgs
83 sti
84 sysexit
85 ENDPROC(native_irq_enable_sysexit)
86 #endif
87
88 /*
89 * 32bit SYSENTER instruction entry.
90 *
91 * SYSENTER loads ss, rsp, cs, and rip from previously programmed MSRs.
92 * IF and VM in rflags are cleared (IOW: interrupts are off).
93 * SYSENTER does not save anything on the stack,
94 * and does not save old rip (!!!) and rflags.
95 *
96 * Arguments:
97 * eax system call number
98 * ebx arg1
99 * ecx arg2
100 * edx arg3
101 * esi arg4
102 * edi arg5
103 * ebp user stack
104 * 0(%ebp) arg6
105 *
106 * This is purely a fast path. For anything complicated we use the int 0x80
107 * path below. We set up a complete hardware stack frame to share code
108 * with the int 0x80 path.
109 */
110 ENTRY(ia32_sysenter_target)
111 CFI_STARTPROC32 simple
112 CFI_SIGNAL_FRAME
113 CFI_DEF_CFA rsp,0
114 CFI_REGISTER rsp,rbp
115
116 /*
117 * Interrupts are off on entry.
118 * We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON,
119 * it is too small to ever cause noticeable irq latency.
120 */
121 SWAPGS_UNSAFE_STACK
122 movq PER_CPU_VAR(cpu_tss + TSS_sp0), %rsp
123 ENABLE_INTERRUPTS(CLBR_NONE)
124
125 /* Zero-extending 32-bit regs, do not remove */
126 movl %ebp, %ebp
127 movl %eax, %eax
128
129 movl ASM_THREAD_INFO(TI_sysenter_return, %rsp, 0), %r10d
130 CFI_REGISTER rip,r10
131
132 /* Construct struct pt_regs on stack */
133 pushq_cfi $__USER32_DS /* pt_regs->ss */
134 pushq_cfi %rbp /* pt_regs->sp */
135 CFI_REL_OFFSET rsp,0
136 pushfq_cfi /* pt_regs->flags */
137 pushq_cfi $__USER32_CS /* pt_regs->cs */
138 pushq_cfi %r10 /* pt_regs->ip = thread_info->sysenter_return */
139 CFI_REL_OFFSET rip,0
140 pushq_cfi_reg rax /* pt_regs->orig_ax */
141 pushq_cfi_reg rdi /* pt_regs->di */
142 pushq_cfi_reg rsi /* pt_regs->si */
143 pushq_cfi_reg rdx /* pt_regs->dx */
144 pushq_cfi_reg rcx /* pt_regs->cx */
145 pushq_cfi_reg rax /* pt_regs->ax */
146 cld
147 sub $(10*8),%rsp /* pt_regs->r8-11,bp,bx,r12-15 not saved */
148 CFI_ADJUST_CFA_OFFSET 10*8
149
150 /*
151 * no need to do an access_ok check here because rbp has been
152 * 32bit zero extended
153 */
154 ASM_STAC
155 1: movl (%rbp),%ebp
156 _ASM_EXTABLE(1b,ia32_badarg)
157 ASM_CLAC
158
159 /*
160 * Sysenter doesn't filter flags, so we need to clear NT
161 * ourselves. To save a few cycles, we can check whether
162 * NT was set instead of doing an unconditional popfq.
163 */
164 testl $X86_EFLAGS_NT,EFLAGS(%rsp)
165 jnz sysenter_fix_flags
166 sysenter_flags_fixed:
167
168 orl $TS_COMPAT, ASM_THREAD_INFO(TI_status, %rsp, SIZEOF_PTREGS)
169 testl $_TIF_WORK_SYSCALL_ENTRY, ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
170 CFI_REMEMBER_STATE
171 jnz sysenter_tracesys
172 cmpq $(IA32_NR_syscalls-1),%rax
173 ja ia32_badsys
174 sysenter_do_call:
175 /* 32bit syscall -> 64bit C ABI argument conversion */
176 movl %edi,%r8d /* arg5 */
177 movl %ebp,%r9d /* arg6 */
178 xchg %ecx,%esi /* rsi:arg2, rcx:arg4 */
179 movl %ebx,%edi /* arg1 */
180 movl %edx,%edx /* arg3 (zero extension) */
181 sysenter_dispatch:
182 call *ia32_sys_call_table(,%rax,8)
183 movq %rax,RAX(%rsp)
184 DISABLE_INTERRUPTS(CLBR_NONE)
185 TRACE_IRQS_OFF
186 testl $_TIF_ALLWORK_MASK, ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
187 jnz sysexit_audit
188 sysexit_from_sys_call:
189 andl $~TS_COMPAT,ASM_THREAD_INFO(TI_status, %rsp, SIZEOF_PTREGS)
190 /* clear IF, that popfq doesn't enable interrupts early */
191 andl $~0x200,EFLAGS(%rsp)
192 movl RIP(%rsp),%edx /* User %eip */
193 CFI_REGISTER rip,rdx
194 RESTORE_RSI_RDI
195 /* pop everything except ss,rsp,rflags slots */
196 REMOVE_PT_GPREGS_FROM_STACK 3*8
197 xorq %r8,%r8
198 xorq %r9,%r9
199 xorq %r10,%r10
200 xorq %r11,%r11
201 popfq_cfi
202 /*CFI_RESTORE rflags*/
203 popq_cfi %rcx /* User %esp */
204 CFI_REGISTER rsp,rcx
205 TRACE_IRQS_ON
206 /*
207 * 32bit SYSEXIT restores eip from edx, esp from ecx.
208 * cs and ss are loaded from MSRs.
209 */
210 ENABLE_INTERRUPTS_SYSEXIT32
211
212 CFI_RESTORE_STATE
213
214 #ifdef CONFIG_AUDITSYSCALL
215 .macro auditsys_entry_common
216 movl %esi,%r8d /* 5th arg: 4th syscall arg */
217 movl %ecx,%r9d /*swap with edx*/
218 movl %edx,%ecx /* 4th arg: 3rd syscall arg */
219 movl %r9d,%edx /* 3rd arg: 2nd syscall arg */
220 movl %ebx,%esi /* 2nd arg: 1st syscall arg */
221 movl %eax,%edi /* 1st arg: syscall number */
222 call __audit_syscall_entry
223 movl RAX(%rsp),%eax /* reload syscall number */
224 cmpq $(IA32_NR_syscalls-1),%rax
225 ja ia32_badsys
226 movl %ebx,%edi /* reload 1st syscall arg */
227 movl RCX(%rsp),%esi /* reload 2nd syscall arg */
228 movl RDX(%rsp),%edx /* reload 3rd syscall arg */
229 movl RSI(%rsp),%ecx /* reload 4th syscall arg */
230 movl RDI(%rsp),%r8d /* reload 5th syscall arg */
231 .endm
232
233 .macro auditsys_exit exit
234 testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
235 jnz ia32_ret_from_sys_call
236 TRACE_IRQS_ON
237 ENABLE_INTERRUPTS(CLBR_NONE)
238 movl %eax,%esi /* second arg, syscall return value */
239 cmpl $-MAX_ERRNO,%eax /* is it an error ? */
240 jbe 1f
241 movslq %eax, %rsi /* if error sign extend to 64 bits */
242 1: setbe %al /* 1 if error, 0 if not */
243 movzbl %al,%edi /* zero-extend that into %edi */
244 call __audit_syscall_exit
245 movq RAX(%rsp),%rax /* reload syscall return value */
246 movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
247 DISABLE_INTERRUPTS(CLBR_NONE)
248 TRACE_IRQS_OFF
249 testl %edi, ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
250 jz \exit
251 CLEAR_RREGS
252 jmp int_with_check
253 .endm
254
255 sysenter_auditsys:
256 auditsys_entry_common
257 movl %ebp,%r9d /* reload 6th syscall arg */
258 jmp sysenter_dispatch
259
260 sysexit_audit:
261 auditsys_exit sysexit_from_sys_call
262 #endif
263
264 sysenter_fix_flags:
265 pushq_cfi $(X86_EFLAGS_IF|X86_EFLAGS_FIXED)
266 popfq_cfi
267 jmp sysenter_flags_fixed
268
269 sysenter_tracesys:
270 #ifdef CONFIG_AUDITSYSCALL
271 testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT), ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
272 jz sysenter_auditsys
273 #endif
274 SAVE_EXTRA_REGS
275 CLEAR_RREGS
276 movq $-ENOSYS,RAX(%rsp)/* ptrace can change this for a bad syscall */
277 movq %rsp,%rdi /* &pt_regs -> arg1 */
278 call syscall_trace_enter
279 LOAD_ARGS32 /* reload args from stack in case ptrace changed it */
280 RESTORE_EXTRA_REGS
281 cmpq $(IA32_NR_syscalls-1),%rax
282 ja int_ret_from_sys_call /* sysenter_tracesys has set RAX(%rsp) */
283 jmp sysenter_do_call
284 CFI_ENDPROC
285 ENDPROC(ia32_sysenter_target)
286
287 /*
288 * 32bit SYSCALL instruction entry.
289 *
290 * 32bit SYSCALL saves rip to rcx, clears rflags.RF, then saves rflags to r11,
291 * then loads new ss, cs, and rip from previously programmed MSRs.
292 * rflags gets masked by a value from another MSR (so CLD and CLAC
293 * are not needed). SYSCALL does not save anything on the stack
294 * and does not change rsp.
295 *
296 * Note: rflags saving+masking-with-MSR happens only in Long mode
297 * (in legacy 32bit mode, IF, RF and VM bits are cleared and that's it).
298 * Don't get confused: rflags saving+masking depends on Long Mode Active bit
299 * (EFER.LMA=1), NOT on bitness of userspace where SYSCALL executes
300 * or target CS descriptor's L bit (SYSCALL does not read segment descriptors).
301 *
302 * Arguments:
303 * eax system call number
304 * ecx return address
305 * ebx arg1
306 * ebp arg2 (note: not saved in the stack frame, should not be touched)
307 * edx arg3
308 * esi arg4
309 * edi arg5
310 * esp user stack
311 * 0(%esp) arg6
312 *
313 * This is purely a fast path. For anything complicated we use the int 0x80
314 * path below. We set up a complete hardware stack frame to share code
315 * with the int 0x80 path.
316 */
317 ENTRY(ia32_cstar_target)
318 CFI_STARTPROC32 simple
319 CFI_SIGNAL_FRAME
320 CFI_DEF_CFA rsp,0
321 CFI_REGISTER rip,rcx
322 /*CFI_REGISTER rflags,r11*/
323
324 /*
325 * Interrupts are off on entry.
326 * We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON,
327 * it is too small to ever cause noticeable irq latency.
328 */
329 SWAPGS_UNSAFE_STACK
330 movl %esp,%r8d
331 CFI_REGISTER rsp,r8
332 movq PER_CPU_VAR(kernel_stack),%rsp
333 ENABLE_INTERRUPTS(CLBR_NONE)
334
335 /* Zero-extending 32-bit regs, do not remove */
336 movl %eax,%eax
337
338 /* Construct struct pt_regs on stack */
339 pushq_cfi $__USER32_DS /* pt_regs->ss */
340 pushq_cfi %r8 /* pt_regs->sp */
341 CFI_REL_OFFSET rsp,0
342 pushq_cfi %r11 /* pt_regs->flags */
343 pushq_cfi $__USER32_CS /* pt_regs->cs */
344 pushq_cfi %rcx /* pt_regs->ip */
345 CFI_REL_OFFSET rip,0
346 pushq_cfi_reg rax /* pt_regs->orig_ax */
347 pushq_cfi_reg rdi /* pt_regs->di */
348 pushq_cfi_reg rsi /* pt_regs->si */
349 pushq_cfi_reg rdx /* pt_regs->dx */
350 pushq_cfi_reg rbp /* pt_regs->cx */
351 movl %ebp,%ecx
352 pushq_cfi_reg rax /* pt_regs->ax */
353 sub $(10*8),%rsp /* pt_regs->r8-11,bp,bx,r12-15 not saved */
354 CFI_ADJUST_CFA_OFFSET 10*8
355
356 /*
357 * no need to do an access_ok check here because r8 has been
358 * 32bit zero extended
359 */
360 ASM_STAC
361 1: movl (%r8),%r9d
362 _ASM_EXTABLE(1b,ia32_badarg)
363 ASM_CLAC
364 orl $TS_COMPAT, ASM_THREAD_INFO(TI_status, %rsp, SIZEOF_PTREGS)
365 testl $_TIF_WORK_SYSCALL_ENTRY, ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
366 CFI_REMEMBER_STATE
367 jnz cstar_tracesys
368 cmpq $IA32_NR_syscalls-1,%rax
369 ja ia32_badsys
370 cstar_do_call:
371 /* 32bit syscall -> 64bit C ABI argument conversion */
372 movl %edi,%r8d /* arg5 */
373 /* r9 already loaded */ /* arg6 */
374 xchg %ecx,%esi /* rsi:arg2, rcx:arg4 */
375 movl %ebx,%edi /* arg1 */
376 movl %edx,%edx /* arg3 (zero extension) */
377 cstar_dispatch:
378 call *ia32_sys_call_table(,%rax,8)
379 movq %rax,RAX(%rsp)
380 DISABLE_INTERRUPTS(CLBR_NONE)
381 TRACE_IRQS_OFF
382 testl $_TIF_ALLWORK_MASK, ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
383 jnz sysretl_audit
384 sysretl_from_sys_call:
385 andl $~TS_COMPAT, ASM_THREAD_INFO(TI_status, %rsp, SIZEOF_PTREGS)
386 RESTORE_RSI_RDI_RDX
387 movl RIP(%rsp),%ecx
388 CFI_REGISTER rip,rcx
389 movl EFLAGS(%rsp),%r11d
390 /*CFI_REGISTER rflags,r11*/
391 xorq %r10,%r10
392 xorq %r9,%r9
393 xorq %r8,%r8
394 TRACE_IRQS_ON
395 movl RSP(%rsp),%esp
396 CFI_RESTORE rsp
397 /*
398 * 64bit->32bit SYSRET restores eip from ecx,
399 * eflags from r11 (but RF and VM bits are forced to 0),
400 * cs and ss are loaded from MSRs.
401 * (Note: 32bit->32bit SYSRET is different: since r11
402 * does not exist, it merely sets eflags.IF=1).
403 */
404 USERGS_SYSRET32
405
406 #ifdef CONFIG_AUDITSYSCALL
407 cstar_auditsys:
408 CFI_RESTORE_STATE
409 movl %r9d,R9(%rsp) /* register to be clobbered by call */
410 auditsys_entry_common
411 movl R9(%rsp),%r9d /* reload 6th syscall arg */
412 jmp cstar_dispatch
413
414 sysretl_audit:
415 auditsys_exit sysretl_from_sys_call
416 #endif
417
418 cstar_tracesys:
419 #ifdef CONFIG_AUDITSYSCALL
420 testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT), ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
421 jz cstar_auditsys
422 #endif
423 xchgl %r9d,%ebp
424 SAVE_EXTRA_REGS
425 CLEAR_RREGS r9
426 movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
427 movq %rsp,%rdi /* &pt_regs -> arg1 */
428 call syscall_trace_enter
429 LOAD_ARGS32 1 /* reload args from stack in case ptrace changed it */
430 RESTORE_EXTRA_REGS
431 xchgl %ebp,%r9d
432 cmpq $(IA32_NR_syscalls-1),%rax
433 ja int_ret_from_sys_call /* cstar_tracesys has set RAX(%rsp) */
434 jmp cstar_do_call
435 END(ia32_cstar_target)
436
437 ia32_badarg:
438 ASM_CLAC
439 movq $-EFAULT,%rax
440 jmp ia32_sysret
441 CFI_ENDPROC
442
443 /*
444 * Emulated IA32 system calls via int 0x80.
445 *
446 * Arguments:
447 * eax system call number
448 * ebx arg1
449 * ecx arg2
450 * edx arg3
451 * esi arg4
452 * edi arg5
453 * ebp arg6 (note: not saved in the stack frame, should not be touched)
454 *
455 * Notes:
456 * Uses the same stack frame as the x86-64 version.
457 * All registers except eax must be saved (but ptrace may violate that).
458 * Arguments are zero extended. For system calls that want sign extension and
459 * take long arguments a wrapper is needed. Most calls can just be called
460 * directly.
461 * Assumes it is only called from user space and entered with interrupts off.
462 */
463
464 ENTRY(ia32_syscall)
465 CFI_STARTPROC32 simple
466 CFI_SIGNAL_FRAME
467 CFI_DEF_CFA rsp,5*8
468 /*CFI_REL_OFFSET ss,4*8 */
469 CFI_REL_OFFSET rsp,3*8
470 /*CFI_REL_OFFSET rflags,2*8 */
471 /*CFI_REL_OFFSET cs,1*8 */
472 CFI_REL_OFFSET rip,0*8
473
474 /*
475 * Interrupts are off on entry.
476 * We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON,
477 * it is too small to ever cause noticeable irq latency.
478 */
479 PARAVIRT_ADJUST_EXCEPTION_FRAME
480 SWAPGS
481 ENABLE_INTERRUPTS(CLBR_NONE)
482
483 /* Zero-extending 32-bit regs, do not remove */
484 movl %eax,%eax
485
486 /* Construct struct pt_regs on stack (iret frame is already on stack) */
487 pushq_cfi_reg rax /* pt_regs->orig_ax */
488 pushq_cfi_reg rdi /* pt_regs->di */
489 pushq_cfi_reg rsi /* pt_regs->si */
490 pushq_cfi_reg rdx /* pt_regs->dx */
491 pushq_cfi_reg rcx /* pt_regs->cx */
492 pushq_cfi_reg rax /* pt_regs->ax */
493 cld
494 sub $(10*8),%rsp /* pt_regs->r8-11,bp,bx,r12-15 not saved */
495 CFI_ADJUST_CFA_OFFSET 10*8
496
497 orl $TS_COMPAT, ASM_THREAD_INFO(TI_status, %rsp, SIZEOF_PTREGS)
498 testl $_TIF_WORK_SYSCALL_ENTRY, ASM_THREAD_INFO(TI_flags, %rsp, SIZEOF_PTREGS)
499 jnz ia32_tracesys
500 cmpq $(IA32_NR_syscalls-1),%rax
501 ja ia32_badsys
502 ia32_do_call:
503 /* 32bit syscall -> 64bit C ABI argument conversion */
504 movl %edi,%r8d /* arg5 */
505 movl %ebp,%r9d /* arg6 */
506 xchg %ecx,%esi /* rsi:arg2, rcx:arg4 */
507 movl %ebx,%edi /* arg1 */
508 movl %edx,%edx /* arg3 (zero extension) */
509 call *ia32_sys_call_table(,%rax,8) # xxx: rip relative
510 ia32_sysret:
511 movq %rax,RAX(%rsp)
512 ia32_ret_from_sys_call:
513 CLEAR_RREGS
514 jmp int_ret_from_sys_call
515
516 ia32_tracesys:
517 SAVE_EXTRA_REGS
518 CLEAR_RREGS
519 movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
520 movq %rsp,%rdi /* &pt_regs -> arg1 */
521 call syscall_trace_enter
522 LOAD_ARGS32 /* reload args from stack in case ptrace changed it */
523 RESTORE_EXTRA_REGS
524 cmpq $(IA32_NR_syscalls-1),%rax
525 ja int_ret_from_sys_call /* ia32_tracesys has set RAX(%rsp) */
526 jmp ia32_do_call
527 END(ia32_syscall)
528
529 ia32_badsys:
530 movq $0,ORIG_RAX(%rsp)
531 movq $-ENOSYS,%rax
532 jmp ia32_sysret
533
534 CFI_ENDPROC
535
536 .macro PTREGSCALL label, func
537 ALIGN
538 GLOBAL(\label)
539 leaq \func(%rip),%rax
540 jmp ia32_ptregs_common
541 .endm
542
543 CFI_STARTPROC32
544
545 PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn
546 PTREGSCALL stub32_sigreturn, sys32_sigreturn
547 PTREGSCALL stub32_execve, compat_sys_execve
548 PTREGSCALL stub32_execveat, compat_sys_execveat
549 PTREGSCALL stub32_fork, sys_fork
550 PTREGSCALL stub32_vfork, sys_vfork
551
552 ALIGN
553 GLOBAL(stub32_clone)
554 leaq sys_clone(%rip),%rax
555 mov %r8, %rcx
556 jmp ia32_ptregs_common
557
558 ALIGN
559 ia32_ptregs_common:
560 CFI_ENDPROC
561 CFI_STARTPROC32 simple
562 CFI_SIGNAL_FRAME
563 CFI_DEF_CFA rsp,SIZEOF_PTREGS
564 CFI_REL_OFFSET rax,RAX
565 CFI_REL_OFFSET rcx,RCX
566 CFI_REL_OFFSET rdx,RDX
567 CFI_REL_OFFSET rsi,RSI
568 CFI_REL_OFFSET rdi,RDI
569 CFI_REL_OFFSET rip,RIP
570 /* CFI_REL_OFFSET cs,CS*/
571 /* CFI_REL_OFFSET rflags,EFLAGS*/
572 CFI_REL_OFFSET rsp,RSP
573 /* CFI_REL_OFFSET ss,SS*/
574 SAVE_EXTRA_REGS 8
575 call *%rax
576 RESTORE_EXTRA_REGS 8
577 ret
578 CFI_ENDPROC
579 END(ia32_ptregs_common)
This page took 0.053135 seconds and 5 git commands to generate.