Ariel Marcovitch
2225a8dda2
powerpc: Fix alignment bug within the init sections
...
This is a bug that causes early crashes in builds with an .exit.text
section smaller than a page and an .init.text section that ends in the
beginning of a physical page (this is kinda random, which might
explain why this wasn't really encountered before).
The init sections are ordered like this:
.init.text
.exit.text
.init.data
Currently, these sections aren't page aligned.
Because the init code might become read-only at runtime and because
the .init.text section can potentially reside on the same physical
page as .init.data, the beginning of .init.data might be mapped
read-only along with .init.text.
Then when the kernel tries to modify a variable in .init.data (like
kthreadd_done, used in kernel_init()) the kernel panics.
To avoid this, make _einittext page aligned and also align .exit.text
to make sure .init.data is always seperated from the text segments.
Fixes: 060ef9d89d ("powerpc32: PAGE_EXEC required for inittext")
Signed-off-by: Ariel Marcovitch <ariel.marcovitch@gmail.com >
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu >
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au >
Link: https://lore.kernel.org/r/20210102201156.10805-1-ariel.marcovitch@gmail.com
2021-01-12 15:06:23 +11:00
..
2020-12-04 01:01:26 +11:00
2020-12-19 11:18:38 -08:00
2020-07-23 17:41:36 +10:00
2020-12-21 22:06:26 +11:00
2020-12-21 22:06:25 +11:00
2020-03-25 11:50:48 +01:00
2020-07-29 21:09:37 +10:00
2020-12-04 01:01:25 +11:00
2020-10-25 14:51:49 -07:00
2020-12-11 00:10:25 +11:00
2019-06-15 16:52:06 +10:00
2020-06-02 20:59:11 +10:00
2020-12-05 21:49:18 +11:00
2020-12-04 01:01:29 +11:00
2020-12-09 16:48:59 +11:00
2020-05-19 00:10:39 +10:00
2020-07-26 23:34:19 +10:00
2020-07-29 21:02:09 +10:00
2020-11-27 10:33:42 +01:00
2020-12-10 23:13:26 +11:00
2019-11-13 19:27:40 +11:00
2020-11-02 12:54:20 +11:00
2020-08-07 18:48:15 -07:00
2019-09-14 00:01:14 +10:00
2020-10-07 22:34:47 +11:00
2020-07-26 23:34:20 +10:00
2020-10-22 10:38:53 +11:00
2020-12-09 23:48:14 +11:00
2020-12-09 23:48:14 +11:00
2020-05-19 00:10:37 +10:00
2020-12-09 23:48:14 +11:00
2020-12-09 23:48:14 +11:00
2020-10-16 12:21:15 -07:00
2020-12-04 01:01:22 +11:00
2020-10-08 21:17:13 +11:00
2019-11-13 19:27:40 +11:00
2020-12-09 23:48:13 +11:00
2020-12-21 22:24:00 +11:00
2020-11-05 23:34:16 +11:00
2020-06-09 09:39:13 -07:00
2020-12-09 23:48:14 +11:00
2021-01-04 23:59:25 +11:00
2020-12-05 21:49:18 +11:00
2020-12-05 21:49:18 +11:00
2020-09-15 22:13:19 +10:00
2020-12-11 00:09:10 +11:00
2020-06-02 20:59:11 +10:00
2020-01-16 14:59:37 +10:00
2020-06-02 20:59:11 +10:00
2020-11-24 16:47:35 +01:00
2020-05-07 17:25:54 +10:00
2020-06-09 09:39:13 -07:00
2020-12-04 01:01:09 +11:00
2020-09-03 18:12:15 +02:00
2020-12-09 23:48:15 +11:00
2020-06-02 10:59:10 -07:00
2020-05-19 00:10:37 +10:00
2020-06-18 12:10:37 -07:00
2020-11-13 12:14:55 -05:00
2020-09-08 11:52:34 +02:00
2019-09-14 00:04:40 +10:00
2019-09-14 00:04:40 +10:00
2020-10-08 21:17:13 +11:00
2019-12-18 15:04:42 +01:00
2020-11-19 14:50:14 +11:00
2020-12-04 01:01:23 +11:00
2020-12-04 01:01:23 +11:00
2020-09-02 11:00:21 +10:00
2020-10-08 21:17:12 +11:00
2020-06-02 20:59:11 +10:00
2020-05-11 23:15:14 +10:00
2020-06-17 10:57:41 -07:00
2020-07-27 00:01:30 +10:00
2019-08-30 09:40:15 +10:00
2020-06-05 12:39:30 -07:00
2020-07-26 23:34:19 +10:00
2020-05-19 00:10:39 +10:00
2020-05-26 23:36:57 +10:00
2020-11-19 14:50:14 +11:00
2019-08-22 23:11:48 +10:00
2020-06-05 12:39:30 -07:00
2020-07-26 23:34:21 +10:00
2020-01-06 16:25:29 +11:00
2020-12-04 01:01:34 +11:00
2020-05-18 21:58:44 +10:00
2020-04-04 21:40:57 +11:00
2020-02-04 03:05:26 +00:00
2020-12-09 17:01:40 +11:00
2019-10-29 15:12:17 +11:00
2020-11-18 14:18:09 -06:00
2020-12-04 01:01:34 +11:00
2020-02-04 03:05:26 +00:00
2020-06-09 09:39:13 -07:00
2020-02-04 03:05:26 +00:00
2020-12-09 13:36:51 +11:00
2020-07-16 13:12:38 +10:00
2020-07-16 14:49:53 +10:00
2020-10-08 12:50:52 +11:00
2019-11-13 00:33:22 +11:00
2019-11-13 00:33:22 +11:00
2020-12-05 21:49:52 +11:00
2020-11-25 23:17:31 +11:00
2020-12-05 21:49:52 +11:00
2020-11-19 14:50:14 +11:00
2020-12-04 01:01:17 +11:00
2020-12-04 01:01:17 +11:00
2020-12-17 13:34:25 -08:00
2020-12-04 01:01:14 +11:00
2020-12-21 22:06:10 +11:00
2020-06-09 09:39:13 -07:00
2019-06-14 10:48:56 +02:00
2020-06-02 20:59:11 +10:00
2019-06-19 17:11:22 +02:00
2019-06-19 17:11:22 +02:00
2020-12-04 01:01:28 +11:00
2019-11-15 14:38:29 +01:00
2020-09-18 20:05:24 +10:00
2020-04-01 13:42:13 +11:00
2020-09-15 22:13:30 +10:00
2020-12-17 13:34:25 -08:00
2020-10-06 23:22:25 +11:00
2020-12-05 21:49:18 +11:00
2019-08-30 09:40:15 +10:00
2019-10-11 19:33:25 +11:00
2020-11-18 14:18:09 -06:00
2020-12-04 01:01:19 +11:00
2020-05-19 00:10:37 +10:00
2020-07-16 13:00:24 +10:00
2021-01-12 15:06:23 +11:00