Re: [PATCH] arch: x86: power: cpu: init %gs before __restore_processor_state (clang)

From: Borislav Petkov
Date: Tue Sep 15 2020 - 14:28:20 EST


On Tue, Sep 15, 2020 at 10:57:16AM -0700, Roman Kiryanov wrote:
> I believe the kernel makes a questionable assumption on how clang
> uses registers (gs will not be used if stack protection is disabled).
> Both kernel and clang behaves unfortunate here.

If the kernel is at fault here and this same thing happens with GCC,
sure, but this is a clang-specific fix.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette