From: Eugene Shatokhin Date: Tue, 17 Mar 2015 10:09:18 +0000 (+0900) Subject: kprobes/x86: Return correct length in __copy_instruction() X-Git-Tag: omap-for-v4.2/o2_dc~146^2~60 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c80e5c0c23ce2282476fdc64c4b5e3d3a40723fd;p=pandora-kernel.git kprobes/x86: Return correct length in __copy_instruction() On x86-64, __copy_instruction() always returns 0 (error) if the instruction uses %rip-relative addressing. This is because kernel_insn_init() is called the second time for 'insn' instance in such cases and sets all its fields to 0. Because of this, trying to place a kprobe on such instruction will fail, register_kprobe() will return -EINVAL. This patch fixes the problem. Signed-off-by: Eugene Shatokhin Signed-off-by: Masami Hiramatsu Link: http://lkml.kernel.org/r/20150317100918.28349.94654.stgit@localhost.localdomain Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed