Re: [PATCH 5.18 34/61] objtool: Update Retpoline validation
From: Borislav Petkov
Date: Wed Jul 13 2022 - 05:22:25 EST
On Wed, Jul 13, 2022 at 10:17:54AM +0200, Greg Kroah-Hartman wrote:
> > A naive fix is:
> > --- a/arch/x86/kernel/head_32.S
> > +++ b/arch/x86/kernel/head_32.S
> > @@ -23,6 +23,7 @@
> > #include <asm/cpufeatures.h>
> > #include <asm/percpu.h>
> > #include <asm/nops.h>
> > +#include <asm/nospec-branch.h>
> > #include <asm/bootparam.h>
> > #include <asm/export.h>
> > #include <asm/pgtable_32.h>
Yap, pls send a proper patch.
> I doubt it should be doing that, but I'll let others answer more
I'd leave that question to the objtool folks.
Technically, the UNTRAIN_RET sequence is meant for both 32- and 64-bit
so there should be no reason not to mitigate that on 32-bit too. Not
that people should run 32-bit kernels...
> Your commit seems sane, for some reason I thought Boris tested i386
> builds, but maybe in the end something snuck in that broke it.
I caught one build breakage in relocate_kernel_32.S but this is a new
SUSE Software Solutions Germany GmbH
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman
(HRB 36809, AG Nürnberg)