Christophe Leroy
ed1cd6deb0
powerpc: Activate CONFIG_THREAD_INFO_IN_TASK
...
This patch activates CONFIG_THREAD_INFO_IN_TASK which
moves the thread_info into task_struct.
Moving thread_info into task_struct has the following advantages:
- It protects thread_info from corruption in the case of stack
overflows.
- Its address is harder to determine if stack addresses are leaked,
making a number of attacks more difficult.
This has the following consequences:
- thread_info is now located at the beginning of task_struct.
- The 'cpu' field is now in task_struct, and only exists when
CONFIG_SMP is active.
- thread_info doesn't have anymore the 'task' field.
This patch:
- Removes all recopy of thread_info struct when the stack changes.
- Changes the CURRENT_THREAD_INFO() macro to point to current.
- Selects CONFIG_THREAD_INFO_IN_TASK.
- Modifies raw_smp_processor_id() to get ->cpu from current without
including linux/sched.h to avoid circular inclusion and without
including asm/asm-offsets.h to avoid symbol names duplication
between ASM constants and C constants.
- Modifies klp_init_thread_info() to take a task_struct pointer
argument.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Add task_stack.h to livepatch.h to fix build fails]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-02-23 22:31:40 +11:00
..
2019-02-23 22:31:39 +11:00
2019-02-23 21:04:32 +11:00
2018-10-20 13:26:47 +11:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:13 +10:00
2018-07-30 22:48:16 +10:00
2018-07-30 22:48:16 +10:00
2019-01-06 09:46:51 +09:00
2018-08-17 11:32:50 -07:00
2017-11-02 11:10:55 +01:00
2018-08-08 00:32:24 +10:00
2018-07-30 22:48:13 +10:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-21 15:52:43 +02:00
2018-11-26 22:33:37 +11:00
2018-07-30 22:47:54 +10:00
2017-11-02 11:10:55 +01:00
2019-02-22 00:10:14 +11:00
2018-07-30 22:48:16 +10:00
2018-08-08 00:32:25 +10:00
2018-12-19 18:56:32 +11:00
2018-08-29 15:42:20 +02:00
2017-11-02 11:10:55 +01:00
2018-08-17 16:20:28 -07:00
2018-01-20 23:29:02 -06:00
2017-11-02 11:10:55 +01:00
2018-01-20 23:29:02 -06:00
2017-11-02 11:10:55 +01:00
2016-07-21 20:33:57 +10:00
2018-07-31 19:56:44 +10:00
2018-12-21 20:56:41 -06:00
2018-10-13 22:21:25 +11:00
2018-10-20 13:26:47 +11:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:17 +10:00
2018-07-30 22:48:17 +10:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:18 +10:00
2017-04-11 07:46:03 +10:00
2017-07-02 20:40:24 +10:00
2019-02-18 22:41:03 +11:00
2017-04-20 11:36:41 +10:00
2019-02-18 22:41:04 +11:00
2019-02-18 22:41:04 +11:00
2017-11-02 11:10:55 +01:00
2018-09-19 22:08:12 +10:00
2018-07-30 22:48:17 +10:00
2019-02-22 00:10:15 +11:00
2019-02-22 00:10:14 +11:00
2017-07-10 16:32:36 -07:00
2017-09-27 08:23:22 +10:00
2018-03-13 15:50:32 +11:00
2018-10-20 13:26:43 +11:00
2018-01-10 03:07:30 +11:00
2018-10-14 18:04:09 +11:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-12-21 11:32:49 +11:00
2017-11-02 11:10:55 +01:00
2018-12-20 22:53:39 +11:00
2018-10-19 00:56:17 +11:00
2018-10-14 18:04:09 +11:00
2017-10-19 16:37:08 +02:00
2017-08-10 23:32:12 +10:00
2017-02-27 18:43:46 -08:00
2016-03-04 23:50:27 -06:00
2018-06-03 20:32:02 +10:00
2019-01-03 18:57:57 -08:00
2017-11-02 11:10:55 +01:00
2018-06-07 10:23:33 -07:00
2018-08-07 21:49:38 +10:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:20 +10:00
2018-01-18 15:31:25 +11:00
2018-12-19 18:56:32 +11:00
2018-12-17 11:33:50 +11:00
2019-01-14 20:39:27 +11:00
2018-08-17 11:32:50 -07:00
2018-07-24 22:03:14 +10:00
2016-03-01 19:27:20 +11:00
2017-11-02 11:10:55 +01:00
2017-09-01 16:42:50 +10:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-06-03 20:43:37 +10:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-12-19 18:56:26 +11:00
2019-02-18 22:41:04 +11:00
2019-01-14 20:39:27 +11:00
2018-03-13 15:50:37 +11:00
2019-02-23 22:31:40 +11:00
2018-01-19 22:37:01 +11:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:16 +10:00
2018-12-21 14:46:50 +11:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-04-13 17:10:27 -07:00
2017-11-02 11:10:55 +01:00
2018-10-20 13:26:47 +11:00
2018-06-21 12:33:15 +02:00
2018-10-09 16:04:27 +11:00
2018-12-21 14:39:35 +11:00
2018-10-09 16:04:27 +11:00
2018-12-21 14:39:35 +11:00
2018-07-30 22:48:17 +10:00
2018-10-09 16:04:27 +11:00
2018-12-21 11:28:41 +01:00
2018-03-06 18:40:44 +01:00
2019-02-21 23:16:44 +11:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2019-02-23 22:31:40 +11:00
2018-01-19 22:37:04 +11:00
2018-04-03 21:50:07 +10:00
2019-02-18 22:41:03 +11:00
2017-11-02 11:10:55 +01:00
2019-02-21 23:16:45 +11:00
2017-11-02 11:10:55 +01:00
2018-02-05 21:34:31 +01:00
2015-06-24 17:49:41 -07:00
2018-03-18 07:38:47 -07:00
2018-12-21 16:20:46 +11:00
2019-02-23 21:04:32 +11:00
2017-11-02 11:10:55 +01:00
2018-06-11 09:16:29 +09:00
2017-11-02 11:10:55 +01:00
2015-10-22 16:06:08 +02:00
2018-05-25 12:04:42 +10:00
2015-10-22 15:19:40 +02:00
2017-11-02 11:10:55 +01:00
2016-09-20 20:57:12 +10:00
2018-01-21 15:06:16 +11:00
2018-10-21 19:32:07 +11:00
2015-10-05 21:32:50 +11:00
2018-06-19 23:03:50 +10:00
2017-11-02 11:10:55 +01:00
2018-10-03 15:39:45 +10:00
2018-12-21 11:32:49 +11:00
2018-10-14 18:04:09 +11:00
2018-12-04 19:45:01 +11:00
2018-07-30 22:48:16 +10:00
2019-02-23 21:04:32 +11:00
2017-11-02 11:10:55 +01:00
2019-02-22 00:10:14 +11:00
2019-02-18 22:41:03 +11:00
2017-11-02 11:10:55 +01:00
2018-12-20 20:53:11 +11:00
2018-12-20 20:53:11 +11:00
2017-11-15 18:21:04 -08:00
2017-11-16 12:47:46 -08:00
2018-12-04 19:45:01 +11:00
2019-02-18 22:41:04 +11:00
2018-07-24 21:43:24 +10:00
2018-06-03 20:40:25 +10:00
2016-06-14 13:58:26 +10:00
2018-05-25 12:04:41 +10:00
2018-03-30 23:34:22 +11:00
2018-06-03 20:40:32 +10:00
2018-09-18 17:52:15 -05:00
2019-02-22 00:10:15 +11:00
2016-07-14 21:12:06 +10:00
2018-12-20 22:58:57 +11:00
2019-02-23 21:04:31 +11:00
2019-02-05 11:55:44 +11:00
2019-02-23 22:31:40 +11:00
2018-01-21 16:21:46 +11:00
2017-01-24 12:23:35 -05:00
2016-06-14 13:58:26 +10:00
2017-08-17 23:13:46 +10:00
2019-02-23 22:31:40 +11:00
2018-01-16 23:47:12 +11:00
2018-07-30 22:48:16 +10:00
2017-08-03 16:06:52 +10:00
2018-07-30 22:48:17 +10:00
2019-02-23 22:31:40 +11:00
2018-05-25 12:04:43 +10:00
2018-10-26 21:58:58 +11:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-01-09 10:45:37 +01:00
2018-08-08 00:32:26 +10:00
2018-12-20 22:59:03 +11:00
2018-12-04 19:45:01 +11:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-12-19 18:56:32 +11:00
2019-02-23 22:31:40 +11:00
2017-11-02 11:10:55 +01:00
2018-10-14 18:04:09 +11:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:16 +10:00
2015-08-18 19:29:49 +10:00
2018-06-03 21:19:40 +10:00
2018-10-03 15:40:03 +10:00
2018-08-08 00:32:30 +10:00
2018-08-07 21:49:30 +10:00
2019-02-18 22:41:04 +11:00
2018-06-03 20:40:31 +10:00
2018-07-30 22:48:17 +10:00
2018-12-21 14:46:50 +11:00
2018-05-10 23:25:14 +10:00
2019-02-23 22:31:39 +11:00
2019-02-23 22:31:39 +11:00
2016-07-17 16:42:47 +10:00
2019-02-23 22:31:40 +11:00
2018-11-26 22:33:37 +11:00
2017-11-02 11:10:55 +01:00
2018-11-26 22:33:37 +11:00
2018-07-30 22:48:21 +10:00
2018-05-24 16:04:02 +10:00
2019-01-30 23:28:56 +11:00
2015-08-06 16:36:23 +10:00
2018-10-20 13:26:47 +11:00
2015-09-16 15:47:51 +02:00
2016-06-14 13:58:26 +10:00
2016-06-14 13:58:27 +10:00
2019-01-04 09:58:25 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-12-21 14:46:50 +11:00
2018-10-19 15:09:04 +11:00
2017-11-12 09:03:10 +11:00
2015-11-26 22:11:17 +11:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-11-14 11:11:51 +11:00
2017-11-02 11:10:55 +01:00
2016-11-29 09:14:50 +00:00
2018-06-03 20:43:35 +10:00
2018-08-07 21:49:28 +10:00
2018-05-25 12:04:36 +10:00
2018-05-25 12:04:38 +10:00
2018-05-25 12:04:38 +10:00