Christophe Leroy
fb978ca207
powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()
Generic implementation fails to remove breakpoints after init
when CONFIG_STRICT_KERNEL_RWX is selected:
[ 13.251285] KGDB: BP remove failed: c001c338
[ 13.259587] kgdbts: ERROR PUT: end of test buffer on 'do_fork_test' line 8 expected OK got $E14#aa
[ 13.268969] KGDB: re-enter exception: ALL breakpoints killed
[ 13.275099] CPU: 0 PID: 1 Comm: init Not tainted 4.18.0-g82bbb913ffd8 #860
[ 13.282836] Call Trace:
[ 13.285313] [c60e1ba0] [c0080ef0] kgdb_handle_exception+0x6f4/0x720 (unreliable)
[ 13.292618] [c60e1c30] [c000e97c] kgdb_handle_breakpoint+0x3c/0x98
[ 13.298709] [c60e1c40] [c000af54] program_check_exception+0x104/0x700
[ 13.305083] [c60e1c60] [c000e45c] ret_from_except_full+0x0/0x4
[ 13.310845] [c60e1d20] [c02a22ac] run_simple_test+0x2b4/0x2d4
[ 13.316532] [c60e1d30] [c0081698] put_packet+0xb8/0x158
[ 13.321694] [c60e1d60] [c00820b4] gdb_serial_stub+0x230/0xc4c
[ 13.327374] [c60e1dc0] [c0080af8] kgdb_handle_exception+0x2fc/0x720
[ 13.333573] [c60e1e50] [c000e928] kgdb_singlestep+0xb4/0xcc
[ 13.339068] [c60e1e70] [c000ae1c] single_step_exception+0x90/0xac
[ 13.345100] [c60e1e80] [c000e45c] ret_from_except_full+0x0/0x4
[ 13.350865] [c60e1f40] [c000e11c] ret_from_syscall+0x0/0x38
[ 13.356346] Kernel panic - not syncing: Recursive entry to debugger
This patch creates powerpc specific version of
kgdb_arch_set_breakpoint() and kgdb_arch_remove_breakpoint()
using patch_instruction()
Fixes: 1e0fc9d1eb
("powerpc/Kconfig: Enable STRICT_KERNEL_RWX for some configs")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-10-20 13:26:47 +11:00
..
2018-10-19 00:56:17 +11:00
2018-09-14 13:47:31 +10:00
2018-09-14 13:47:31 +10:00
2018-06-03 21:19:40 +10:00
2018-10-14 18:04:09 +11:00
2017-11-02 11:10:55 +01:00
2018-10-14 18:04:09 +11:00
2018-10-13 22:21:25 +11:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:17 +10:00
2018-03-24 00:38:51 +11:00
2018-05-18 16:05:15 +10:00
2018-07-19 14:37:57 +10:00
2018-10-14 18:04:09 +11:00
2018-07-30 22:47:53 +10:00
2017-04-13 23:34:33 +10:00
2018-01-10 16:41:14 +01:00
2018-01-15 09:35:39 +01:00
2018-07-30 15:58:01 -05:00
2018-07-19 14:37:57 +10:00
2018-03-27 23:44:58 +11:00
2018-10-13 22:21:25 +11:00
2018-10-13 22:21:25 +11:00
2018-03-27 23:44:58 +11:00
2018-10-13 22:21:25 +11:00
2018-01-27 20:02:52 +11:00
2018-10-13 22:21:25 +11:00
2018-10-03 15:40:01 +10:00
2018-10-14 18:04:09 +11:00
2016-08-07 23:50:09 -04:00
2018-07-30 22:48:17 +10:00
2018-10-14 18:04:09 +11:00
2018-09-19 22:08:12 +10:00
2018-07-30 22:48:17 +10:00
2017-11-02 11:10:55 +01:00
2018-10-14 18:04:09 +11:00
2018-07-30 22:48:17 +10:00
2018-07-30 22:48:13 +10:00
2016-08-07 23:50:09 -04:00
2018-07-30 22:48:17 +10:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:17 +10:00
2018-06-26 09:07:55 +02:00
2018-07-30 22:48:17 +10:00
2018-07-24 22:03:14 +10:00
2018-08-13 15:59:06 +10:00
2018-07-30 22:48:17 +10:00
2018-08-14 15:36:02 +10:00
2016-12-20 09:48:44 -08:00
2018-10-14 18:04:09 +11:00
2018-04-05 14:59:26 +10:00
2018-09-19 21:58:09 +10:00
2018-08-07 21:49:24 +10:00
2018-10-14 18:04:09 +11:00
2018-04-13 17:10:28 -07:00
2018-10-20 13:26:47 +11:00
2018-06-21 12:33:19 +02:00
2018-06-21 12:33:19 +02:00
2018-07-30 22:48:16 +10:00
2018-05-17 14:12:40 +10:00
2018-07-30 22:48:17 +10:00
2017-11-02 11:10:55 +01:00
2018-05-10 23:25:08 +10:00
2018-08-10 22:12:36 +10:00
2018-07-30 22:47:53 +10:00
2018-10-19 00:56:17 +11:00
2018-10-04 23:16:53 +10:00
2018-09-19 21:59:22 +10:00
2018-07-30 22:48:17 +10:00
2018-07-30 22:48:17 +10:00
2018-06-04 00:39:17 +10:00
2018-05-25 12:04:38 +10:00
2018-10-20 13:26:47 +11:00
2018-10-20 13:26:47 +11:00
2017-12-11 13:03:35 +11:00
2018-06-03 20:40:24 +10:00
2017-08-23 22:27:04 +10:00
2018-01-19 22:37:01 +11:00
2017-11-12 23:51:41 +11:00
2018-10-03 15:32:49 +10:00
2018-10-03 15:40:06 +10:00
2018-10-14 18:04:09 +11:00
2017-12-11 13:03:35 +11:00
2018-02-06 09:59:40 -08:00
2018-08-17 11:32:50 -07:00
2017-12-18 23:05:52 -06:00
2018-07-30 22:48:16 +10:00
2018-01-22 05:48:33 +11:00
2018-10-14 18:04:09 +11:00
2018-10-19 00:56:17 +11:00
2018-10-19 00:56:17 +11:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:17 +10:00
2016-12-24 11:46:01 -08:00
2018-10-14 18:04:09 +11:00
2017-08-31 14:26:47 +10:00
2018-01-22 05:48:33 +11:00
2017-08-31 14:26:40 +10:00
2018-06-07 10:23:33 -07:00
2018-06-03 20:43:33 +10:00
2018-10-13 22:21:25 +11:00
2018-10-19 00:56:17 +11:00
2018-08-08 00:32:26 +10:00
2018-08-10 22:12:38 +10:00
2018-09-14 13:47:31 +10:00
2018-10-03 16:12:47 +10:00
2018-05-25 12:04:43 +10:00
2018-06-25 23:21:13 +09:00
2018-06-25 23:21:13 +09:00
2018-06-22 19:04:22 +02:00
2018-05-10 23:25:13 +10:00
2017-11-02 11:10:55 +01:00
2018-10-13 22:21:25 +11:00
2018-06-19 23:03:50 +10:00
2018-07-30 22:48:17 +10:00
2017-03-02 08:42:30 +01:00
2018-10-14 18:04:09 +11:00
2017-11-02 11:10:55 +01:00
2017-03-20 19:02:49 +11:00
2018-05-10 23:25:15 +10:00
2018-06-25 23:21:13 +09:00
2018-03-31 09:09:36 +11:00
2018-05-10 23:25:14 +10:00
2018-05-10 23:25:16 +10:00
2018-05-10 23:25:14 +10:00
2018-05-25 12:04:44 +10:00
2018-10-19 15:09:04 +11:00
2018-10-09 16:51:05 +11:00
2018-10-19 00:56:17 +11:00
2017-08-24 16:19:21 +10:00
2018-07-30 22:47:54 +10:00
2018-05-25 12:04:46 +10:00
2018-07-30 22:48:16 +10:00
2018-10-19 00:56:17 +11:00
2018-07-24 22:03:14 +10:00