Re: [PATCH 0/7] x86: remove always-defined CONFIG_AS_* options
From: Jason A. Donenfeld
Date: Mon Mar 23 2020 - 18:11:06 EST
On Mon, Mar 23, 2020 at 4:04 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> Hi Jason,
>
> On Mon, Mar 23, 2020 at 3:53 PM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
> >
> > On Mon, Mar 23, 2020 at 12:36 AM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> > >
> > > Hi Jason,
> > >
> > > On Mon, Mar 23, 2020 at 1:28 PM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
> > > >
> > > > Hi again,
> > > >
> > > > I've consolidated your patches and rebased mine on top, and
> > > > incorporated your useful binutils comments. The result lives here:
> > > >
> > > > https://git.zx2c4.com/linux-dev/log/?h=jd/kconfig-assembler-support
> > > >
> > > > I can submit all of those to the list, if you want, or maybe you can
> > > > just pull them out of there, include them in your v2, and put them in
> > > > your tree for 5.7? However you want is fine with me.
> > >
> > >
> > > Your series does not work correctly.
> > >
> > > I will comment why later.
> >
> > Bummer, okay. Looking forward to learning what's up. Also, if some
> > parts of it are useful (like the resorting and organizing of
> > arch/x86/crypto/Makefile), feel free to cannibalize it, keeping what's
> > useful and discarding what's not.
> >
>
>
> The answer is mostly in my previous reply to Linus:
> https://lkml.org/lkml/2020/3/13/27
>
>
> I think this problem would happen
> for CONFIG_AS_CFI and CONFIG_AS_ADX
> since the register in instruction code
> is machine-bit dependent.
>
> The former is OK wince we are planning to
> remove it.
>
> We need to handle -m64 for the latter.
> Otherwise, a problem like commit
> 3a7c733165a4799fa1 would happen.
>
>
> So, I think we should merge this
> https://lore.kernel.org/patchwork/patch/1214332/
> then, fix-up CONFIG_AS_ADX on top of it.
>
> (Or, if we do not need to rush,
> we can delete CONFIG_AS_ADX entirely after
> we bump the binutils version to 2.23)
Oh, gotcha. The easiest thing to do for that case would actually be
passing 32-bit registers to adox, which are valid. I'll fix that up in
my tree.
And then indeed it looks like the binutils bump is coming anyway for 5.7.
Your flags patch looks fine and potentially useful for other things
down the line though. I suppose you had in mind something like:
def_bool $(as-instr,...,-m64) if 64BIT
def_bool $(as-instr,...,-m32) if !64BIT
Anyway, I'll fix up the ADX code to be biarch like the AVX test code.
Jason