Commit 6efdcfaf authored by Alexander van Heukelum's avatar Alexander van Heukelum Committed by Ingo Molnar

x86: KPROBE_ENTRY should be paired wth KPROBE_END

Impact: move some code out of .kprobes.text

KPROBE_ENTRY switches code generation to .kprobes.text, and KPROBE_END
uses .popsection to get back to the previous section (.text, normally).
Also replace ENDPROC by END, for consistency.
Signed-off-by: default avatarAlexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 322648d1
...@@ -1167,7 +1167,7 @@ paranoid_schedule: ...@@ -1167,7 +1167,7 @@ paranoid_schedule:
TRACE_IRQS_OFF TRACE_IRQS_OFF
jmp paranoid_userspace jmp paranoid_userspace
CFI_ENDPROC CFI_ENDPROC
END(paranoid_exit) KPROBE_END(paranoid_exit)
/* /*
* Exception entry point. This expects an error code/orig_rax on the stack. * Exception entry point. This expects an error code/orig_rax on the stack.
...@@ -1259,7 +1259,7 @@ gs_change: ...@@ -1259,7 +1259,7 @@ gs_change:
CFI_ADJUST_CFA_OFFSET -8 CFI_ADJUST_CFA_OFFSET -8
ret ret
CFI_ENDPROC CFI_ENDPROC
ENDPROC(native_load_gs_index) END(native_load_gs_index)
.section __ex_table,"a" .section __ex_table,"a"
.align 8 .align 8
...@@ -1313,7 +1313,7 @@ ENTRY(kernel_thread) ...@@ -1313,7 +1313,7 @@ ENTRY(kernel_thread)
UNFAKE_STACK_FRAME UNFAKE_STACK_FRAME
ret ret
CFI_ENDPROC CFI_ENDPROC
ENDPROC(kernel_thread) END(kernel_thread)
child_rip: child_rip:
pushq $0 # fake return address pushq $0 # fake return address
...@@ -1329,7 +1329,7 @@ child_rip: ...@@ -1329,7 +1329,7 @@ child_rip:
mov %eax, %edi mov %eax, %edi
call do_exit call do_exit
CFI_ENDPROC CFI_ENDPROC
ENDPROC(child_rip) END(child_rip)
/* /*
* execve(). This function needs to use IRET, not SYSRET, to set up all state properly. * execve(). This function needs to use IRET, not SYSRET, to set up all state properly.
...@@ -1360,9 +1360,7 @@ ENTRY(kernel_execve) ...@@ -1360,9 +1360,7 @@ ENTRY(kernel_execve)
UNFAKE_STACK_FRAME UNFAKE_STACK_FRAME
ret ret
CFI_ENDPROC CFI_ENDPROC
ENDPROC(kernel_execve) END(kernel_execve)
/* runs on exception stack */ /* runs on exception stack */
KPROBE_ENTRY(nmi) KPROBE_ENTRY(nmi)
...@@ -1437,14 +1435,14 @@ ENTRY(call_softirq) ...@@ -1437,14 +1435,14 @@ ENTRY(call_softirq)
decl %gs:pda_irqcount decl %gs:pda_irqcount
ret ret
CFI_ENDPROC CFI_ENDPROC
ENDPROC(call_softirq) END(call_softirq)
KPROBE_ENTRY(ignore_sysret) KPROBE_ENTRY(ignore_sysret)
CFI_STARTPROC CFI_STARTPROC
mov $-ENOSYS,%eax mov $-ENOSYS,%eax
sysret sysret
CFI_ENDPROC CFI_ENDPROC
ENDPROC(ignore_sysret) KPROBE_END(ignore_sysret)
#ifdef CONFIG_XEN #ifdef CONFIG_XEN
zeroentry xen_hypervisor_callback xen_do_hypervisor_callback zeroentry xen_hypervisor_callback xen_do_hypervisor_callback
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment