[PATCH] powerpc/32: Fix boot failure with CONFIG_STACKPROTECTOR

Jonathan Neuschäfer j.neuschaefer at gmx.net
Fri Apr 30 03:49:21 AEST 2021


On Thu, Apr 29, 2021 at 04:52:09PM +0000, Christophe Leroy wrote:
> Commit 7c95d8893fb5 ("powerpc: Change calling convention for
> create_branch() et. al.") complexified the frame of function
> do_feature_fixups(), leading to GCC setting up a stack
> guard when CONFIG_STACKPROTECTOR is selected.
> 
> The problem is that do_feature_fixups() is called very early
> while 'current' in r2 is not set up yet and the code is still
> not at the final address used at link time.
> 
> So, like other instrumentation, stack protection needs to be
> deactivated for feature-fixups.c and code-patching.c
> 
> Reported-by: Jonathan Neuschaefer <j.neuschaefer at gmx.net>
> Fixes: 7c95d8893fb5 ("powerpc: Change calling convention for create_branch() et. al.")
> Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>
> ---

Thank you for looking into this issue. This patch does indeed fix my
issue.

Tested-by: Jonathan Neuschaefer <j.neuschaefer at gmx.net>


Thanks again,
Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20210429/fe089a23/attachment.sig>


More information about the Linuxppc-dev mailing list