Masami Hiramatsu
567a9fd867
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 >
2010-06-29 10:43:41 +02:00
..
2010-06-09 13:34:06 -07:00
2010-06-09 13:34:06 -07:00
2010-06-28 22:33:24 +02:00
2010-04-29 16:53:17 -07:00
2010-06-01 10:20:15 +02:00
2010-06-01 10:20:15 +02:00
2010-04-20 14:38:28 -07:00
2010-04-07 14:36:30 +02:00
2010-03-02 10:28:38 +01:00
2010-02-28 11:00:55 -08:00
2010-03-30 22:02:32 +09:00
2010-05-27 09:12:48 -07:00
2010-03-30 22:02:32 +09:00
2010-04-07 11:51:17 +02:00
2010-06-08 23:29:52 +02:00
2010-06-08 23:29:52 +02:00
2010-06-08 23:29:52 +02:00
2010-06-10 11:02:34 -04:00
2010-05-20 21:04:31 -05:00
2010-02-07 17:47:51 +01:00
2010-05-03 13:39:26 -07:00
2009-12-16 12:02:37 -08:00
2010-02-27 10:06:10 +01:00
2010-03-29 18:55:33 +02:00
2010-03-29 18:55:33 +02:00
2010-01-05 09:17:33 +09:00
2010-02-09 11:13:56 +01:00
2010-04-28 18:14:29 -07:00
2010-06-24 23:35:27 +02:00
2009-10-01 08:42:24 +02:00
2010-05-10 10:48:55 -07:00
2010-03-02 10:28:38 +01:00
2010-03-30 22:02:32 +09:00
2010-03-03 11:25:58 +01:00
2009-12-09 16:54:08 -08:00
2009-11-02 15:56:34 +01:00
2009-11-02 15:56:34 +01:00
2009-12-14 23:55:33 +01:00
2010-05-03 13:39:29 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-05-20 21:04:30 -05:00
2010-06-29 10:43:41 +02:00
2010-05-19 11:41:05 +03:00
2010-03-30 22:02:32 +09:00
2009-12-08 13:27:33 -08:00
2010-03-30 22:02:32 +09:00
2010-03-26 11:33:55 +01:00
2010-03-30 22:02:32 +09:00
2010-01-23 06:21:59 +01:00
2010-05-25 15:08:26 -07:00
2010-03-11 13:49:06 +01:00
2010-02-10 17:47:17 -08:00
2010-03-30 22:02:32 +09:00
2010-06-09 13:34:06 -07:00
2010-05-16 22:47:41 -07:00
2010-05-27 09:12:48 -07:00
2010-02-25 19:26:23 -08:00
2009-12-14 23:55:32 +01:00
2010-02-27 14:41:35 -08:00
2010-06-25 16:14:58 +02:00
2010-03-30 22:02:32 +09:00
2010-04-13 13:24:54 +02:00
2010-03-30 22:02:32 +09:00
2010-05-27 09:12:52 -07:00
2010-06-18 11:35:10 +02:00
2010-06-18 11:35:10 +02:00
2010-05-18 08:58:16 -07:00
2010-05-01 04:32:07 +02:00
2010-05-19 11:41:05 +03:00
2010-05-17 10:04:43 -07:00
2009-12-15 08:53:28 -08:00
2010-06-20 09:24:13 +02:00
2010-06-03 15:47:22 -07:00
2010-05-24 13:33:14 -07:00
2010-06-09 13:34:06 -07:00
2009-12-09 16:28:59 -08:00
2010-03-30 22:02:32 +09:00
2010-06-02 09:38:53 +02:00
2010-06-09 17:32:19 +02:00
2010-03-26 11:33:57 +01:00
2010-03-12 15:52:32 -08:00
2010-03-12 15:52:32 -08:00
2010-03-12 15:52:32 -08:00
2010-05-21 17:16:21 -07:00
2010-02-16 18:21:32 +01:00
2010-05-18 09:46:35 -07:00
2009-10-12 18:06:48 +02:00
2009-12-11 09:28:22 +01:00
2010-05-20 21:04:29 -05:00
2009-12-14 23:55:32 +01:00
2010-03-08 16:55:37 +01:00
2010-05-18 09:46:35 -07:00
2010-02-07 17:47:51 +01:00
2010-03-30 22:02:32 +09:00
2010-02-22 16:25:18 -08:00
2009-12-09 16:29:23 -08:00
2010-03-30 22:02:32 +09:00
2010-03-08 16:55:37 +01:00
2010-06-01 08:55:52 -07:00
2010-03-01 12:35:40 -03:00
2010-03-07 15:59:39 -08:00
2010-04-28 17:25:47 -07:00
2010-05-10 10:48:55 -07:00