Re: [PATCH 5.18 000/231] 5.18.13-rc1 review

Justin Forbes
2022-07-20T17:57:36Z

On Wed, Jul 20, 2022 at 10:28:33AM -0700, Linus Torvalds wrote:
> [ Adding PeterZ and Jiri to the participants. ]
>
> Looks like 5.18.13 added that commit 9bb2ec608a20 ("objtool: Update
> Retpoline validation") but I don't see 3131ef39fb03 ("x86/asm/32: Fix
> ANNOTATE_UNRET_SAFE use on 32-bit") in that list.

It should be noted that the build doesn't fail, it just warns.
I am guessing the 32bit failure is what promoted someone to look at
the logs to begin with and notice the warn initially. I just verified
that it exists in our builds of 5.18.13-rc1, but not on mainline builds.
I am gueesing it is because commit 9bb2ec608a20 ("objtool: Update Retpoline
validation") should be followed up with at least commit f43b9876e857c
("x86/retbleed: Add fine grained Kconfig knobs")

Justin

> That said, 3131ef39fb03 should have fixed a completely different issue
> on 32-bit, not the "naked ret" thing.
>
> PeterZ, Jiri, any ideas? Limited quoting below, see thread at
>
> https://lore.kernel.org/all/CA+G9fYsJBBbEXowA-3kxDNqcfbtcqmxBrEnJSkCnLUsMzNfJZw@mail.gmail.com/
>
> for more details.
>
> Linus
>
> On Wed, Jul 20, 2022 at 9:37 AM Justin Forbes <jforbes@fedoraproject.org> wrote:
> >
> > On Tue, Jul 19, 2022 at 12:32:48PM -0700, Linus Torvalds wrote:
> > > On Tue, Jul 19, 2022 at 10:57 AM Naresh Kamboju
> > > <naresh.kamboju@linaro.org> wrote:
> > > >
> > > >
> > > > 2. Large number of build warnings on x86 with gcc-11,
> > > > I do not see these build warnings on mainline,
> > > ..
> > > > 'naked' return found in RETPOLINE build
> > >
> > > Hmm. Does your cross-compiler support '-mfunction-return=thunk-extern'?
> > >
> > > Your build does magic things with 'scripts/kconfig/merge_config.sh',
> > > and I'm wondering if you perhaps end up enabling CONFIG_RETHUNK with a
> > > compiler that doesn't actually support it, or something like that?
> >
> > I am seeing these 'naked' return found in RETPOLINE build on the
> > standard fedora 36 toolchain as well. No cross compiling, nothing fancy.
> > These were not seen with mainline, or with the 5.18.12-rc1 retbleed
> > patches.
> >
> > Justin