From 1405c4a2c66b956950ad7eb2821db451cb1cb643 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Thu, 21 May 2020 07:40:38 +0000 Subject: [PATCH] Fix kernel crash when using STACK_PROTECTOR_STRONG=y git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11852 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 10 ++++++++++ chapter08/kernel.xml | 10 ++++++++++ general.ent | 6 +++--- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 48d90c77e..01a215550 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -42,6 +42,16 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2020-05-21 + + + [pierre] - Fix a crash at early boot when using + CONFIG_STACK_PROTECTOR_STRONG=y in kernel configuration. + + + + 2020-05-16 diff --git a/chapter08/kernel.xml b/chapter08/kernel.xml index 0173f7445..a31b545a9 100644 --- a/chapter08/kernel.xml +++ b/chapter08/kernel.xml @@ -54,6 +54,16 @@ kernel compilation. Do not rely on the source tree being clean after un-tarring. + + When using CONFIG_STACKPROTECTOR_STRONG=y, and + compiling with GCC 10 and later, the default optimization is too + aggressive, and generates a kernel panic when booting. This can be + fixed with: + +sed -e '/cpu_startup/a asm("");' \ + -i arch/x86/{kernel/smpboot.c,xen/smp_pv.c} + Configure the kernel via a menu-driven interface. For general diff --git a/general.ent b/general.ent index 0c6f40ff8..7e9a422c1 100644 --- a/general.ent +++ b/general.ent @@ -1,13 +1,13 @@ - + - + - +