[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-129d17e8e8daf50f8aff4941fb4a9cda027ab9cf@git.kernel.org>
Date: Wed, 12 Apr 2017 00:32:30 -0700
From: tip-bot for Masami Hiramatsu <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, ananth@...ux.vnet.ibm.com, bp@...en8.de,
xiaolong.ye@...el.com, brgerst@...il.com, dvlasenk@...hat.com,
linux-kernel@...r.kernel.org, mingo@...nel.org,
peterz@...radead.org, jpoimboe@...hat.com, aryabinin@...tuozzo.com,
mhiramat@...nel.org, tglx@...utronix.de,
anil.s.keshavamurthy@...el.com, davem@...emloft.net,
torvalds@...ux-foundation.org
Subject: [tip:perf/core] kprobes/x86: Fix the description of
__copy_instruction()
Commit-ID: 129d17e8e8daf50f8aff4941fb4a9cda027ab9cf
Gitweb: http://git.kernel.org/tip/129d17e8e8daf50f8aff4941fb4a9cda027ab9cf
Author: Masami Hiramatsu <mhiramat@...nel.org>
AuthorDate: Wed, 29 Mar 2017 13:58:06 +0900
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 12 Apr 2017 09:23:45 +0200
kprobes/x86: Fix the description of __copy_instruction()
Fix the description comment of __copy_instruction() function
since it has already been changed to return the length of the
copied instruction.
Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>
Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: David S . Miller <davem@...emloft.net>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ye Xiaolong <xiaolong.ye@...el.com>
Link: http://lkml.kernel.org/r/149076347582.22469.3775133607244923462.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/kprobes/core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 9eae5a6..81d4dc7 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -350,11 +350,10 @@ static int is_IF_modifier(kprobe_opcode_t *insn)
}
/*
- * Copy an instruction and adjust the displacement if the instruction
- * uses the %rip-relative addressing mode.
- * If it does, Return the address of the 32-bit displacement word.
- * If not, return null.
- * Only applicable to 64-bit x86.
+ * Copy an instruction with recovering modified instruction by kprobes
+ * and adjust the displacement if the instruction uses the %rip-relative
+ * addressing mode.
+ * This returns the length of copied instruction, or 0 if it has an error.
*/
int __copy_instruction(u8 *dest, u8 *src)
{
@@ -376,6 +375,7 @@ int __copy_instruction(u8 *dest, u8 *src)
memcpy(dest, insn.kaddr, length);
#ifdef CONFIG_X86_64
+ /* Only x86_64 has RIP relative instructions */
if (insn_rip_relative(&insn)) {
s64 newdisp;
u8 *disp;
Powered by blists - more mailing lists