[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1423743566-12137-1-git-send-email-wangnan0@huawei.com>
Date: Thu, 12 Feb 2015 20:19:26 +0800
From: Wang Nan <wangnan0@...wei.com>
To: <linux@....linux.org.uk>, <tglx@...utronix.de>, <mingo@...hat.com>,
<hpa@...or.com>, <rostedt@...dmis.org>, <ananth@...ibm.com>,
<anil.s.keshavamurthy@...el.com>, <davem@...emloft.net>,
<masami.hiramatsu.pt@...achi.com>, <luto@...capital.net>,
<keescook@...omium.org>, <oleg@...hat.com>, <wangnan0@...wei.com>,
<dave.long@...aro.org>, <tixy@...aro.org>, <nico@...aro.org>,
<yalin.wang2010@...il.com>, <catalin.marinas@....com>,
<Yalin.Wang@...ymobile.com>, <mark.rutland@....com>,
<dave.hansen@...ux.intel.com>, <jkenisto@...ibm.com>,
<anton@...ba.org>, <stefani@...bold.net>, <JBeulich@...e.com>,
<akpm@...ux-foundation.org>, <rusty@...tcorp.com.au>,
<peterz@...radead.org>, <prarit@...hat.com>, <fabf@...net.be>,
<hannes@...xchg.org>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <lizefan@...wei.com>
Subject: [RFC PATCH v2 03/26] kprobes: x86: mark 2 bytes NOP as boostable.
Currently, x86 kprobes is unable to boost 2 bytes nop like:
nopl 0x0(%rax,%rax,1)
which is 0x0f 0x1f 0x44 0x00 0x00.
Such nops have exactly 5 bytes which is able to hold a relative jmp
instruction. Boosting them should be obviously safe.
This patch enable boosting such nops by simply updating
twobyte_is_boostable[] array.
Signed-off-by: Wang Nan <wangnan0@...wei.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
---
arch/x86/kernel/kprobes/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 98f654d..6a1146e 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -84,7 +84,7 @@ static volatile u32 twobyte_is_boostable[256 / 32] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
/* ---------------------------------------------- */
W(0x00, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0) | /* 00 */
- W(0x10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) , /* 10 */
+ W(0x10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1) , /* 10 */
W(0x20, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) | /* 20 */
W(0x30, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) , /* 30 */
W(0x40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) | /* 40 */
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists