Re: [PATCH] x86: Fix early boot crash on gcc-10, third try

From: Kalle Valo
Date: Thu May 14 2020 - 10:46:14 EST


Borislav Petkov <bp@xxxxxxxxx> writes:

> Ok,
>
> here's the new version. Changes are:
>
> - It does mb() now (Linus).
> - I've added a call to prevent_tail_call_optimization() in init/main.c
> because it does generate the stack canary there too. This is a
> future-proof thing. (Arvind).
> - Dropped Reviewed-by tags.
> - Dropped compiler checking from the branch (Linus).
> - Added Cc:stable because gcc10 has released already, apparently.
>
> Testing with gcc10 passes after making sure that without it it would
> cause the tailcall optimization and fail stack check.
>
> Plan is to send it to Linus on the weekend so that it makes it into 5.7.

This fixed my boot issue, thanks!

Tested-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>

[ 0.000000] Linux version 5.7.0-rc4-wt-ath+ (gcc version 10.1.0 (GCC), GNU ld (GNU Binutils) 2.34) #11 SMP Thu May 14 17:28:35 EEST 2020

--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches