Nadav Amit ae052e3ae0 x86/kprobes: Fix 1 byte conditional jump target
Commit 3bc753c06dd0 ("kbuild: treat char as always unsigned") broke
kprobes.  Setting a probe-point on 1 byte conditional jump can cause the
kernel to crash when the (signed) relative jump offset gets treated as
unsigned.

Fix by replacing the unsigned 'immediate.bytes' (plus a cast) with the
signed 'immediate.value' when assigning to the relative jump offset.

[ dhansen: clarified changelog ]

Fixes: 3bc753c06dd0 ("kbuild: treat char as always unsigned")
Suggested-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Suggested-by: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20230208071708.4048-1-namit%40vmware.com
2023-02-08 12:03:27 -08:00
..
2022-12-12 14:41:57 -08:00
2022-12-17 14:06:53 -06:00
2022-03-15 10:32:40 +01:00
2022-11-21 23:01:51 +01:00
2022-09-26 10:13:16 -07:00
2022-04-19 17:14:09 -07:00
2022-12-17 14:06:53 -06:00
2022-12-02 14:06:34 +01:00
2022-04-07 08:27:51 -07:00
2022-08-02 15:21:18 -07:00
2021-03-18 15:31:53 +01:00
2022-12-15 11:12:21 -08:00
2021-12-01 00:06:43 +01:00
2021-03-18 15:31:53 +01:00
2022-05-19 19:30:31 +02:00
2022-12-10 10:33:11 -06:00
2022-02-25 09:36:05 +01:00
2022-09-26 19:46:16 -07:00
2021-10-25 23:02:36 -04:00
2022-11-21 23:01:51 +01:00
2022-04-14 14:09:43 +02:00
2022-11-01 13:44:10 +01:00