diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2010-06-29 14:53:50 +0900 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-06-29 10:43:41 +0200 |
commit | 567a9fd86735ccdc897768ed2dacdd5e83a13509 (patch) | |
tree | 2111af7e07f0d8d30c8aa72aa7b8ebe7555457fa /init/main.c | |
parent | a1d0ce8213e9ddf4046ef5ba95c55762d075f541 (diff) | |
download | linux-stable-567a9fd86735ccdc897768ed2dacdd5e83a13509.tar.gz linux-stable-567a9fd86735ccdc897768ed2dacdd5e83a13509.tar.bz2 linux-stable-567a9fd86735ccdc897768ed2dacdd5e83a13509.zip |
kprobes/x86: Fix kprobes to skip prefixes correctly
Fix resume_execution() and is_IF_modifier() to skip x86
instruction prefixes correctly by using x86 instruction
attribute.
Without this fix, resume_execution() can't handle instructions
which have non-REX prefixes (REX prefixes are skipped). This
will cause unexpected kernel panic by hitting bad address when a
kprobe hits on two-byte ret (e.g. "repz ret" generated for
Athlon/K8 optimization), because it just checks "repz" and can't
recognize the "ret" instruction.
These prefixes can be found easily with x86 instruction
attribute. This patch introduces skip_prefixes() and uses it in
resume_execution() and is_IF_modifier() to skip prefixes.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
LKML-Reference: <4C298A6E.8070609@hitachi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'init/main.c')
0 files changed, 0 insertions, 0 deletions