diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-10-21 12:18:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-10-21 12:18:17 -0400 |
commit | f38787f4f921222d080d976ef59210ce3c6c6cb4 (patch) | |
tree | 55e643bc1e5b066f04323a4054fdc814726221be /arch | |
parent | 957b9095ed296311b36d26e4316d7f637351ac57 (diff) | |
parent | 71434f2fcba5c22d6e0d51878ba8e241a5dea5fb (diff) |
Merge branch 'uprobes/core' of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc into perf/urgent
Pull various uprobes bugfixes from Oleg Nesterov - mostly race and
failure path fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/signal.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/uprobes.c | 16 |
2 files changed, 3 insertions, 17 deletions
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 29ad351804e9..70b27ee6118e 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -824,10 +824,8 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
824 | mce_notify_process(); | 824 | mce_notify_process(); |
825 | #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */ | 825 | #endif /* CONFIG_X86_64 && CONFIG_X86_MCE */ |
826 | 826 | ||
827 | if (thread_info_flags & _TIF_UPROBE) { | 827 | if (thread_info_flags & _TIF_UPROBE) |
828 | clear_thread_flag(TIF_UPROBE); | ||
829 | uprobe_notify_resume(regs); | 828 | uprobe_notify_resume(regs); |
830 | } | ||
831 | 829 | ||
832 | /* deal with pending signal delivery */ | 830 | /* deal with pending signal delivery */ |
833 | if (thread_info_flags & _TIF_SIGPENDING) | 831 | if (thread_info_flags & _TIF_SIGPENDING) |
diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c index 9538f00827a9..aafa5557b396 100644 --- a/arch/x86/kernel/uprobes.c +++ b/arch/x86/kernel/uprobes.c | |||
@@ -651,31 +651,19 @@ void arch_uprobe_abort_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) | |||
651 | 651 | ||
652 | /* | 652 | /* |
653 | * Skip these instructions as per the currently known x86 ISA. | 653 | * Skip these instructions as per the currently known x86 ISA. |
654 | * 0x66* { 0x90 | 0x0f 0x1f | 0x0f 0x19 | 0x87 0xc0 } | 654 | * rep=0x66*; nop=0x90 |
655 | */ | 655 | */ |
656 | static bool __skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) | 656 | static bool __skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs) |
657 | { | 657 | { |
658 | int i; | 658 | int i; |
659 | 659 | ||
660 | for (i = 0; i < MAX_UINSN_BYTES; i++) { | 660 | for (i = 0; i < MAX_UINSN_BYTES; i++) { |
661 | if ((auprobe->insn[i] == 0x66)) | 661 | if (auprobe->insn[i] == 0x66) |
662 | continue; | 662 | continue; |
663 | 663 | ||
664 | if (auprobe->insn[i] == 0x90) | 664 | if (auprobe->insn[i] == 0x90) |
665 | return true; | 665 | return true; |
666 | 666 | ||
667 | if (i == (MAX_UINSN_BYTES - 1)) | ||
668 | break; | ||
669 | |||
670 | if ((auprobe->insn[i] == 0x0f) && (auprobe->insn[i+1] == 0x1f)) | ||
671 | return true; | ||
672 | |||
673 | if ((auprobe->insn[i] == 0x0f) && (auprobe->insn[i+1] == 0x19)) | ||
674 | return true; | ||
675 | |||
676 | if ((auprobe->insn[i] == 0x87) && (auprobe->insn[i+1] == 0xc0)) | ||
677 | return true; | ||
678 | |||
679 | break; | 667 | break; |
680 | } | 668 | } |
681 | return false; | 669 | return false; |