Peter Zijlstra
1cd5f059d9
x86,static_call: Fix __static_call_return0 for i386
...
Paolo reported that the instruction sequence that is used to replace:
call __static_call_return0
namely:
66 66 48 31 c0 data16 data16 xor %rax,%rax
decodes to something else on i386, namely:
66 66 48 data16 dec %ax
31 c0 xor %eax,%eax
Which is a nonsensical sequence that happens to have the same outcome.
*However* an important distinction is that it consists of 2
instructions which is a problem when the thing needs to be overwriten
with a regular call instruction again.
As such, replace the instruction with something that decodes the same
on both i386 and x86_64.
Fixes: 3f2a8fc4b15d ("static_call/x86: Add __static_call_return0()")
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220318204419.GT8939@worktop.programming.kicks-ass.net
2022-04-05 09:59:37 +02:00
..
2022-03-21 14:26:28 -07:00
2022-01-23 06:20:44 +02:00
2022-03-28 12:41:28 -07:00
2022-03-30 12:04:09 +02:00
2022-03-28 19:38:51 -07:00
2022-03-27 10:17:23 -07:00
2021-08-09 17:13:06 +02:00
2022-01-11 10:25:36 -08:00
2021-11-09 10:02:48 -08:00
2022-03-15 10:32:40 +01:00
2021-03-08 13:19:05 +01:00
2021-02-10 12:32:07 +01:00
2021-12-21 21:31:35 +01:00
2021-10-01 16:52:48 -04:00
2020-11-24 16:47:49 +01:00
2020-11-24 14:42:09 +01:00
2021-10-04 11:46:58 +02:00
2021-06-07 12:14:45 +02:00
2021-11-02 22:22:13 -07:00
2021-10-20 13:09:43 -05:00
2021-09-21 13:57:43 +02:00
2022-02-25 09:36:05 +01:00
2022-03-09 12:49:44 +01:00
2022-03-15 18:20:34 +01:00
2022-01-31 13:19:33 -05:00
2021-12-08 12:25:37 +01:00
2022-03-15 10:32:41 +01:00
2022-03-15 10:32:37 +01:00
2022-02-12 11:37:09 +01:00
2021-12-08 12:25:37 +01:00
2022-03-15 10:32:41 +01:00
2021-12-16 21:50:06 +01:00
2021-02-05 20:13:12 +01:00
2021-08-10 23:31:43 +02:00
2022-03-15 10:32:39 +01:00
2021-09-27 12:28:32 +02:00
2021-02-10 23:34:17 +01:00
2021-10-22 12:45:35 -04:00
2021-12-08 12:25:37 +01:00
2020-08-06 16:13:09 +02:00
2021-10-05 15:51:59 +02:00
2020-08-06 16:13:13 +02:00
2021-07-13 06:32:05 +02:00
2022-03-09 12:49:44 +01:00
2021-03-08 12:06:29 -07:00
2021-03-18 15:31:53 +01:00
2022-03-09 12:49:44 +01:00
2022-04-02 12:09:02 -07:00
2022-02-25 10:09:34 -05:00
2021-09-03 09:58:13 -07:00
2021-05-21 12:36:45 +02:00
2022-03-15 10:32:39 +01:00
2022-03-28 19:38:51 -07:00
2021-05-10 07:51:38 +02:00
2022-03-27 10:17:23 -07:00
2021-08-10 23:31:43 +02:00
2021-01-27 19:06:47 +01:00
2022-03-16 11:02:41 +01:00
2021-03-11 19:51:49 +01:00
2022-03-15 10:32:36 +01:00
2020-10-06 07:07:05 +02:00
2021-01-15 08:23:10 +01:00
2021-10-04 11:46:46 +02:00
2020-12-14 13:45:26 -08:00
2021-10-18 09:20:15 -05:00
2021-10-20 15:27:27 +02:00
2022-03-15 10:32:48 +01:00
2022-03-15 12:52:51 +01:00
2021-12-01 00:06:43 +01:00
2022-03-28 17:29:53 -07:00
2021-03-18 15:31:53 +01:00
2020-10-06 11:18:04 +02:00
2021-12-06 09:54:10 +01:00
2021-12-08 12:25:37 +01:00
2022-03-15 10:32:40 +01:00
2022-02-09 19:42:58 +01:00
2022-03-28 19:38:51 -07:00
2022-01-20 08:52:52 +02:00
2022-03-23 19:00:34 -07:00
2021-12-08 12:25:37 +01:00
2021-11-15 20:31:16 +01:00
2022-01-10 10:00:03 -08:00
2021-07-23 13:15:31 -05:00
2022-03-10 16:51:51 -06:00
2021-03-21 23:50:28 +01:00
2022-03-08 19:16:43 +01:00
2022-02-25 09:36:05 +01:00
2022-04-05 09:59:37 +02:00
2021-02-06 00:21:42 +01:00
2020-08-20 13:12:58 +02:00
2021-01-05 19:07:42 +01:00
2021-03-23 00:16:13 +01:00
2021-03-08 13:19:05 +01:00
2022-03-22 15:57:10 -07:00
2021-10-25 23:02:36 -04:00
2022-03-21 12:28:13 -07:00
2020-08-15 10:38:03 -07:00
2021-12-02 00:40:35 +01:00
2022-03-15 18:20:33 +01:00
2021-09-25 13:23:28 +02:00
2021-09-30 21:24:07 -04:00
2021-09-30 21:24:07 -04:00
2022-03-28 19:38:51 -07:00
2021-03-15 12:05:03 +01:00
2021-12-08 12:25:37 +01:00
2021-11-19 09:15:58 -06:00
2022-03-15 10:32:47 +01:00
2022-02-23 19:14:29 +01:00