Masami Hiramatsu
296da2049f
x86/kprobes: Fix to check non boostable prefixes correctly
...
[ Upstream commit 6dd3b8c9f58816a1354be39559f630cd1bd12159 ]
There are 2 bugs in the can_boost() function because of using
x86 insn decoder. Since the insn->opcode never has a prefix byte,
it can not find CS override prefix in it. And the insn->attr is
the attribute of the opcode, thus inat_is_address_size_prefix(
insn->attr) always returns false.
Fix those by checking each prefix bytes with for_each_insn_prefix
loop and getting the correct attribute for each prefix byte.
Also, this removes unlikely, because this is a slow path.
Fixes: a8d11cd0714f ("kprobes/x86: Consolidate insn decoder users for copying code")
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/161666691162.1120877.2808435205294352583.stgit@devnote2
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:24 +02:00
..
2021-04-07 15:00:08 +02:00
2021-05-14 09:50:07 +02:00
2021-05-14 09:50:11 +02:00
2021-01-27 11:55:13 +01:00
2021-05-14 09:50:24 +02:00
2020-03-25 11:50:48 +01:00
2020-10-27 14:39:29 -07:00
2020-10-06 07:07:03 +02:00
2020-05-22 18:24:40 +02:00
2020-05-27 13:05:59 +02:00
2019-03-23 12:11:49 +01:00
2019-05-24 17:39:02 +02:00
2020-03-30 19:14:28 -07:00
2020-06-11 15:15:23 +02:00
2020-09-08 22:21:36 -04:00
2020-05-19 18:03:07 +02:00
2019-05-30 11:25:17 -07:00
2020-06-09 09:39:13 -07:00
2020-06-09 09:39:13 -07:00
2019-08-09 22:52:10 +10:00
2021-04-28 13:40:02 +02:00
2020-09-16 16:52:32 +02:00
2020-06-11 15:15:03 +02:00
2020-04-14 14:24:05 +02:00
2020-09-09 11:33:19 +02:00
2020-11-18 12:56:29 +01:00
2021-05-14 09:50:21 +02:00
2020-06-09 09:39:13 -07:00
2020-05-20 08:35:22 -07:00
2019-06-19 17:09:07 +02:00
2020-06-09 09:39:13 -07:00
2020-04-30 20:14:34 +02:00
2020-06-29 11:42:48 -04:00
2020-06-29 11:42:48 -04:00
2020-10-25 14:51:49 -07:00
2020-08-11 08:26:48 +02:00
2020-10-29 18:09:59 +01:00
2020-01-06 09:45:59 +01:00
2021-02-10 09:29:22 +01:00
2019-05-30 11:26:32 -07:00
2019-06-29 11:35:35 +02:00
2020-07-29 16:27:16 +02:00
2020-10-14 10:21:34 -07:00
2020-02-26 15:21:22 +01:00
2019-05-24 08:46:06 +02:00
2020-05-28 21:36:20 +02:00
2020-06-11 15:15:12 +02:00
2020-09-22 22:13:34 +02:00
2020-06-11 15:15:14 +02:00
2020-09-22 22:13:34 +02:00
2019-10-18 11:58:33 +02:00
2020-08-06 16:13:09 +02:00
2020-04-27 02:07:40 -04:00
2020-08-06 16:13:13 +02:00
2020-03-27 11:05:41 +01:00
2019-11-12 16:21:15 +01:00
2020-10-14 17:05:03 +02:00
2020-09-04 15:12:58 +02:00
2019-11-12 16:21:15 +01:00
2020-10-23 11:17:56 -07:00
2021-03-17 17:06:36 +01:00
2020-07-05 12:50:20 -07:00
2020-06-09 09:39:13 -07:00
2020-06-09 09:39:13 -07:00
2020-10-19 13:11:00 +02:00
2021-03-07 12:34:04 +01:00
2020-10-12 11:40:41 -07:00
2021-03-04 11:37:26 +01:00
2021-03-17 17:06:36 +01:00
2020-08-15 13:52:11 +02:00
2020-08-15 13:52:12 +02:00
2020-10-06 07:07:05 +02:00
2019-09-03 08:36:30 +02:00
2020-11-09 18:12:34 +01:00
2020-06-18 12:10:37 -07:00
2020-07-22 23:56:53 +02:00
2020-08-24 18:18:32 +02:00
2020-11-24 16:47:35 +01:00
2019-10-01 20:31:35 +02:00
2020-09-04 15:12:58 +02:00
2020-02-17 14:40:23 +01:00
2020-10-06 11:18:04 +02:00
2021-03-07 12:34:09 +01:00
2019-10-18 09:53:19 +02:00
2020-03-25 18:28:28 +01:00
2020-06-02 10:59:12 -07:00
2021-04-21 13:00:51 +02:00
2020-10-29 18:06:52 +01:00
2021-05-11 14:47:17 +02:00
2021-03-17 17:06:36 +01:00
2020-09-04 12:46:06 +01:00
2021-03-25 09:04:17 +01:00
2020-06-11 15:15:16 +02:00
2021-05-14 09:49:59 +02:00
2020-09-18 14:24:16 +01:00
2020-09-01 09:58:06 +02:00
2020-08-20 13:12:58 +02:00
2020-03-21 16:03:25 +01:00
2019-07-22 10:47:11 +02:00
2020-01-20 10:57:53 +01:00
2019-05-30 11:26:32 -07:00
2020-12-30 11:53:54 +01:00
2020-06-11 15:54:31 -07:00
2020-07-27 14:31:07 -04:00
2020-07-27 14:31:07 -04:00
2020-08-06 16:13:09 +02:00
2020-06-11 15:15:16 +02:00
2021-03-17 17:06:36 +01:00
2020-08-15 10:38:03 -07:00
2020-02-16 20:58:06 +01:00
2020-09-10 11:19:29 +02:00
2020-09-07 19:45:24 +02:00
2020-08-04 14:47:45 -07:00
2019-05-21 10:50:45 +02:00
2021-03-17 17:06:35 +01:00
2020-12-06 09:58:13 +01:00
2019-10-18 10:04:04 +02:00
2020-06-09 09:39:14 -07:00
2020-10-12 13:58:15 -07:00
2019-06-05 17:37:08 +02:00
2020-09-16 16:52:38 +02:00