From 153ffe6f127aa0297b709d100267dc9019c4fd1e Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Mon, 21 Feb 2011 15:25:13 +0100 Subject: [PATCH] --- yaml --- r: 234515 b: refs/heads/master c: 2a8247a2600c3e087a568fc68a6ec4eedac27ef1 h: refs/heads/master i: 234513: 84a16efc6b7249d7ded033ec9231dcaa03fe6225 234511: 565a53e7e7968fb859206fe1bb174a63f1fe22fe v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/kprobes.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 1654c92f07dc..8e388a584351 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ea7145477a461e09d8d194cac4b996dc4f449107 +refs/heads/master: 2a8247a2600c3e087a568fc68a6ec4eedac27ef1 diff --git a/trunk/arch/x86/kernel/kprobes.c b/trunk/arch/x86/kernel/kprobes.c index d91c477b3f62..c969fd9d1566 100644 --- a/trunk/arch/x86/kernel/kprobes.c +++ b/trunk/arch/x86/kernel/kprobes.c @@ -1276,6 +1276,14 @@ static int __kprobes can_optimize(unsigned long paddr) if (!kallsyms_lookup_size_offset(paddr, &size, &offset)) return 0; + /* + * Do not optimize in the entry code due to the unstable + * stack handling. + */ + if ((paddr >= (unsigned long )__entry_text_start) && + (paddr < (unsigned long )__entry_text_end)) + return 0; + /* Check there is enough space for a relative jump. */ if (size - offset < RELATIVEJUMP_SIZE) return 0;