diff options
Diffstat (limited to 'arch/x86/kernel/entry_32.S')
| -rw-r--r-- | arch/x86/kernel/entry_32.S | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 7d52e9da5e0c..50b9c220e121 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
| @@ -334,6 +334,10 @@ ENTRY(ret_from_fork) | |||
| 334 | END(ret_from_fork) | 334 | END(ret_from_fork) |
| 335 | 335 | ||
| 336 | /* | 336 | /* |
| 337 | * Interrupt exit functions should be protected against kprobes | ||
| 338 | */ | ||
| 339 | .pushsection .kprobes.text, "ax" | ||
| 340 | /* | ||
| 337 | * Return to user mode is not as complex as all this looks, | 341 | * Return to user mode is not as complex as all this looks, |
| 338 | * but we want the default path for a system call return to | 342 | * but we want the default path for a system call return to |
| 339 | * go as quickly as possible which is why some of this is | 343 | * go as quickly as possible which is why some of this is |
| @@ -383,6 +387,10 @@ need_resched: | |||
| 383 | END(resume_kernel) | 387 | END(resume_kernel) |
| 384 | #endif | 388 | #endif |
| 385 | CFI_ENDPROC | 389 | CFI_ENDPROC |
| 390 | /* | ||
| 391 | * End of kprobes section | ||
| 392 | */ | ||
| 393 | .popsection | ||
| 386 | 394 | ||
| 387 | /* SYSENTER_RETURN points to after the "sysenter" instruction in | 395 | /* SYSENTER_RETURN points to after the "sysenter" instruction in |
| 388 | the vsyscall page. See vsyscall-sysentry.S, which defines the symbol. */ | 396 | the vsyscall page. See vsyscall-sysentry.S, which defines the symbol. */ |
| @@ -513,6 +521,10 @@ sysexit_audit: | |||
| 513 | PTGS_TO_GS_EX | 521 | PTGS_TO_GS_EX |
| 514 | ENDPROC(ia32_sysenter_target) | 522 | ENDPROC(ia32_sysenter_target) |
| 515 | 523 | ||
| 524 | /* | ||
| 525 | * syscall stub including irq exit should be protected against kprobes | ||
| 526 | */ | ||
| 527 | .pushsection .kprobes.text, "ax" | ||
| 516 | # system call handler stub | 528 | # system call handler stub |
| 517 | ENTRY(system_call) | 529 | ENTRY(system_call) |
| 518 | RING0_INT_FRAME # can't unwind into user space anyway | 530 | RING0_INT_FRAME # can't unwind into user space anyway |
| @@ -705,6 +717,10 @@ syscall_badsys: | |||
| 705 | jmp resume_userspace | 717 | jmp resume_userspace |
| 706 | END(syscall_badsys) | 718 | END(syscall_badsys) |
| 707 | CFI_ENDPROC | 719 | CFI_ENDPROC |
| 720 | /* | ||
| 721 | * End of kprobes section | ||
| 722 | */ | ||
| 723 | .popsection | ||
| 708 | 724 | ||
| 709 | /* | 725 | /* |
| 710 | * System calls that need a pt_regs pointer. | 726 | * System calls that need a pt_regs pointer. |
| @@ -814,6 +830,10 @@ common_interrupt: | |||
| 814 | ENDPROC(common_interrupt) | 830 | ENDPROC(common_interrupt) |
| 815 | CFI_ENDPROC | 831 | CFI_ENDPROC |
| 816 | 832 | ||
| 833 | /* | ||
| 834 | * Irq entries should be protected against kprobes | ||
| 835 | */ | ||
| 836 | .pushsection .kprobes.text, "ax" | ||
| 817 | #define BUILD_INTERRUPT3(name, nr, fn) \ | 837 | #define BUILD_INTERRUPT3(name, nr, fn) \ |
| 818 | ENTRY(name) \ | 838 | ENTRY(name) \ |
| 819 | RING0_INT_FRAME; \ | 839 | RING0_INT_FRAME; \ |
| @@ -980,6 +1000,10 @@ ENTRY(spurious_interrupt_bug) | |||
| 980 | jmp error_code | 1000 | jmp error_code |
| 981 | CFI_ENDPROC | 1001 | CFI_ENDPROC |
| 982 | END(spurious_interrupt_bug) | 1002 | END(spurious_interrupt_bug) |
| 1003 | /* | ||
| 1004 | * End of kprobes section | ||
| 1005 | */ | ||
| 1006 | .popsection | ||
| 983 | 1007 | ||
| 984 | ENTRY(kernel_thread_helper) | 1008 | ENTRY(kernel_thread_helper) |
| 985 | pushl $0 # fake return address for unwinder | 1009 | pushl $0 # fake return address for unwinder |
