Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35879
b: refs/heads/master
c: d28c439
h: refs/heads/master
i:
  35877: 0a5fbc5
  35875: 132c654
  35871: 236a406
v: v3
  • Loading branch information
Prasanna S.P authored and Andi Kleen committed Sep 26, 2006
1 parent 1e457a8 commit dc121b7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ca113ea74836a80645c79adba24caaa7a74120c
refs/heads/master: d28c4393a7bf558538e9def269c1caeab6ec056f
25 changes: 13 additions & 12 deletions trunk/arch/i386/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,9 @@ ENTRY(name) \
/* The include is where all of the SMP etc. interrupts come from */
#include "entry_arch.h"

ENTRY(divide_error)
RING0_INT_FRAME
pushl $0 # no error code
CFI_ADJUST_CFA_OFFSET 4
pushl $do_divide_error
KPROBE_ENTRY(page_fault)
RING0_EC_FRAME
pushl $do_page_fault
CFI_ADJUST_CFA_OFFSET 4
ALIGN
error_code:
Expand Down Expand Up @@ -645,6 +643,7 @@ error_code:
call *%edi
jmp ret_from_exception
CFI_ENDPROC
KPROBE_END(page_fault)

ENTRY(coprocessor_error)
RING0_INT_FRAME
Expand Down Expand Up @@ -720,7 +719,8 @@ debug_stack_correct:
call do_debug
jmp ret_from_exception
CFI_ENDPROC
.previous .text
KPROBE_END(debug)

/*
* NMI is doubly nasty. It can happen _while_ we're handling
* a debug fault, and the debug fault hasn't yet been able to
Expand Down Expand Up @@ -816,7 +816,7 @@ KPROBE_ENTRY(int3)
call do_int3
jmp ret_from_exception
CFI_ENDPROC
.previous .text
KPROBE_END(int3)

ENTRY(overflow)
RING0_INT_FRAME
Expand Down Expand Up @@ -881,7 +881,7 @@ KPROBE_ENTRY(general_protection)
CFI_ADJUST_CFA_OFFSET 4
jmp error_code
CFI_ENDPROC
.previous .text
KPROBE_END(general_protection)

ENTRY(alignment_check)
RING0_EC_FRAME
Expand All @@ -890,13 +890,14 @@ ENTRY(alignment_check)
jmp error_code
CFI_ENDPROC

KPROBE_ENTRY(page_fault)
RING0_EC_FRAME
pushl $do_page_fault
ENTRY(divide_error)
RING0_INT_FRAME
pushl $0 # no error code
CFI_ADJUST_CFA_OFFSET 4
pushl $do_divide_error
CFI_ADJUST_CFA_OFFSET 4
jmp error_code
CFI_ENDPROC
.previous .text

#ifdef CONFIG_X86_MCE
ENTRY(machine_check)
Expand Down
19 changes: 7 additions & 12 deletions trunk/arch/x86_64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ paranoid_schedule\trace:
* Exception entry point. This expects an error code/orig_rax on the stack
* and the exception handler in %rax.
*/
ENTRY(error_entry)
KPROBE_ENTRY(error_entry)
_frame RDI
/* rdi slot contains rax, oldrax contains error code */
cld
Expand Down Expand Up @@ -903,7 +903,7 @@ error_kernelspace:
cmpq $gs_change,RIP(%rsp)
je error_swapgs
jmp error_sti
END(error_entry)
KPROBE_END(error_entry)

/* Reload gs selector with exception handling */
/* edi: new selector */
Expand Down Expand Up @@ -1025,8 +1025,7 @@ ENDPROC(execve)

KPROBE_ENTRY(page_fault)
errorentry do_page_fault
END(page_fault)
.previous .text
KPROBE_END(page_fault)

ENTRY(coprocessor_error)
zeroentry do_coprocessor_error
Expand All @@ -1047,8 +1046,7 @@ KPROBE_ENTRY(debug)
CFI_ADJUST_CFA_OFFSET 8
paranoidentry do_debug, DEBUG_STACK
paranoidexit
END(debug)
.previous .text
KPROBE_END(debug)

/* runs on exception stack */
KPROBE_ENTRY(nmi)
Expand All @@ -1062,8 +1060,7 @@ KPROBE_ENTRY(nmi)
jmp paranoid_exit1
CFI_ENDPROC
#endif
END(nmi)
.previous .text
KPROBE_END(nmi)

KPROBE_ENTRY(int3)
INTR_FRAME
Expand All @@ -1072,8 +1069,7 @@ KPROBE_ENTRY(int3)
paranoidentry do_int3, DEBUG_STACK
jmp paranoid_exit1
CFI_ENDPROC
END(int3)
.previous .text
KPROBE_END(int3)

ENTRY(overflow)
zeroentry do_overflow
Expand Down Expand Up @@ -1121,8 +1117,7 @@ END(stack_segment)

KPROBE_ENTRY(general_protection)
errorentry do_general_protection
END(general_protection)
.previous .text
KPROBE_END(general_protection)

ENTRY(alignment_check)
errorentry do_alignment_check
Expand Down
6 changes: 5 additions & 1 deletion trunk/include/linux/linkage.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@
#endif

#define KPROBE_ENTRY(name) \
.section .kprobes.text, "ax"; \
.pushsection .kprobes.text, "ax"; \
ENTRY(name)

#define KPROBE_END(name) \
END(name); \
.popsection

#ifndef END
#define END(name) \
.size name, .-name
Expand Down

0 comments on commit dc121b7

Please sign in to comment.