aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2015-03-27 06:36:20 -0400
committerIngo Molnar <mingo@kernel.org>2015-03-27 07:27:57 -0400
commita232e3d558eef421fbb539ede5483dfb668e38f2 (patch)
tree1138e37c7c64c1355206ab573298b8d414b2e4ed
parent27be87c5d53117f048d590d6fc6febb21176c3e9 (diff)
x86/asm/entry/32: Update "interrupt off" comments
The existing comment has proven to be not very clear. Replace it with a comment similar to the one we now have in the 64-bit syscall entry point. (Three instances, one per 32-bit syscall entry). In the INT80 entry point's CFI annotations, replace mysterious expressions with numric constants. In this case, raw numbers look more understandable. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> Cc: Alexei Starovoitov <ast@plumgrid.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Will Drewry <wad@chromium.org> Link: http://lkml.kernel.org/r/1427452582-21624-2-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/ia32/ia32entry.S45
1 files changed, 27 insertions, 18 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 5d2641ce9957..7502ff0b938e 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -112,13 +112,16 @@ ENTRY(ia32_sysenter_target)
112 CFI_SIGNAL_FRAME 112 CFI_SIGNAL_FRAME
113 CFI_DEF_CFA rsp,0 113 CFI_DEF_CFA rsp,0
114 CFI_REGISTER rsp,rbp 114 CFI_REGISTER rsp,rbp
115 SWAPGS_UNSAFE_STACK 115
116 movq PER_CPU_VAR(cpu_tss + TSS_sp0), %rsp
117 /* 116 /*
118 * No need to follow this irqs on/off section: the syscall 117 * Interrupts are off on entry.
119 * disabled irqs, here we enable it straight after 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 */ 120 */
121 SWAPGS_UNSAFE_STACK
122 movq PER_CPU_VAR(cpu_tss + TSS_sp0), %rsp
121 ENABLE_INTERRUPTS(CLBR_NONE) 123 ENABLE_INTERRUPTS(CLBR_NONE)
124
122 /* Construct iret frame (ss,rsp,rflags,cs,rip) */ 125 /* Construct iret frame (ss,rsp,rflags,cs,rip) */
123 movl %ebp,%ebp /* zero extension */ 126 movl %ebp,%ebp /* zero extension */
124 pushq_cfi $__USER32_DS 127 pushq_cfi $__USER32_DS
@@ -314,15 +317,18 @@ ENTRY(ia32_cstar_target)
314 CFI_DEF_CFA rsp,0 317 CFI_DEF_CFA rsp,0
315 CFI_REGISTER rip,rcx 318 CFI_REGISTER rip,rcx
316 /*CFI_REGISTER rflags,r11*/ 319 /*CFI_REGISTER rflags,r11*/
320
321 /*
322 * Interrupts are off on entry.
323 * We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON,
324 * it is too small to ever cause noticeable irq latency.
325 */
317 SWAPGS_UNSAFE_STACK 326 SWAPGS_UNSAFE_STACK
318 movl %esp,%r8d 327 movl %esp,%r8d
319 CFI_REGISTER rsp,r8 328 CFI_REGISTER rsp,r8
320 movq PER_CPU_VAR(kernel_stack),%rsp 329 movq PER_CPU_VAR(kernel_stack),%rsp
321 /*
322 * No need to follow this irqs on/off section: the syscall
323 * disabled irqs and here we enable it straight after entry:
324 */
325 ENABLE_INTERRUPTS(CLBR_NONE) 330 ENABLE_INTERRUPTS(CLBR_NONE)
331
326 ALLOC_PT_GPREGS_ON_STACK 6*8 /* 6*8: space for orig_ax and iret frame */ 332 ALLOC_PT_GPREGS_ON_STACK 6*8 /* 6*8: space for orig_ax and iret frame */
327 SAVE_C_REGS_EXCEPT_RCX_R891011 333 SAVE_C_REGS_EXCEPT_RCX_R891011
328 movl %eax,%eax /* zero extension */ 334 movl %eax,%eax /* zero extension */
@@ -449,19 +455,22 @@ ia32_badarg:
449ENTRY(ia32_syscall) 455ENTRY(ia32_syscall)
450 CFI_STARTPROC32 simple 456 CFI_STARTPROC32 simple
451 CFI_SIGNAL_FRAME 457 CFI_SIGNAL_FRAME
452 CFI_DEF_CFA rsp,SS+8-RIP 458 CFI_DEF_CFA rsp,5*8
453 /*CFI_REL_OFFSET ss,SS-RIP*/ 459 /*CFI_REL_OFFSET ss,4*8 */
454 CFI_REL_OFFSET rsp,RSP-RIP 460 CFI_REL_OFFSET rsp,3*8
455 /*CFI_REL_OFFSET rflags,EFLAGS-RIP*/ 461 /*CFI_REL_OFFSET rflags,2*8 */
456 /*CFI_REL_OFFSET cs,CS-RIP*/ 462 /*CFI_REL_OFFSET cs,1*8 */
457 CFI_REL_OFFSET rip,RIP-RIP 463 CFI_REL_OFFSET rip,0*8
458 PARAVIRT_ADJUST_EXCEPTION_FRAME 464
459 SWAPGS
460 /* 465 /*
461 * No need to follow this irqs on/off section: the syscall 466 * Interrupts are off on entry.
462 * disabled irqs and here we enable it straight after entry: 467 * We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON,
468 * it is too small to ever cause noticeable irq latency.
463 */ 469 */
470 PARAVIRT_ADJUST_EXCEPTION_FRAME
471 SWAPGS
464 ENABLE_INTERRUPTS(CLBR_NONE) 472 ENABLE_INTERRUPTS(CLBR_NONE)
473
465 movl %eax,%eax 474 movl %eax,%eax
466 pushq_cfi %rax /* store orig_ax */ 475 pushq_cfi %rax /* store orig_ax */
467 cld 476 cld