[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <160726388853.3413805.4854581312983421622.stgit@devnote2>
Date: Sun, 6 Dec 2020 23:11:28 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Ingo Molnar <mingo@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>
Cc: mhiramat@...nel.org, linux-kernel@...r.kernel.org,
"Naveen N . Rao" <naveen.n.rao@...ux.ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
David Miller <davem@...emloft.net>,
Borislav Petkov <bp@...en8.de>, x86@...nel.org
Subject: [PATCH 0/1] x86/kprobes: Classify opcode while preparing kprobe
Hi,
I noticed that the kprobe x86 still has an inefficient code.
Currently kprobes x86 decodes opcode right after single
stepping in resume_execution(), which is kprobe's hot path.
But it already decoded the opcode while preparing
arch_specific_insn in arch_copy_kprobe(), so this is
inefficient.
So decode the opcode while preparing kprobes (arch_copy_kprobe())
instead of resume_execution() and set some flags for resuming from
single stepping. This also removes the custom instruction prefix
decoding, which should be done in x86 instruction decoder.
Thank you,
---
Masami Hiramatsu (1):
x86/kprobes: Do not decode opcode in resume_execution()
arch/x86/include/asm/kprobes.h | 11 ++-
arch/x86/kernel/kprobes/core.c | 166 ++++++++++++++++++----------------------
2 files changed, 80 insertions(+), 97 deletions(-)
--
Masami Hiramatsu (Linaro) <mhiramat@...nel.org>
Powered by blists - more mailing lists