Re: [PATCH v1 1/1] scripts/decodecode: Decode 32-bit code correctly on x86_64

From: Andy Shevchenko
Date: Mon Mar 08 2021 - 05:23:27 EST


On Mon, Mar 8, 2021 at 12:17 PM Borislav Petkov <bp@xxxxxxx> wrote:
>
> On Mon, Mar 08, 2021 at 11:59:34AM +0200, Andy Shevchenko wrote:
> > It works, but... The question here is why the script behaviour depends
> > so much on the architecture in question (by environment). ARM stuff is
> > using traditional ARCH (and that's what I have expected to work),
> > while x86 has a set of other variables.
> > So, I have to rephrase the commit message then and do actually an
> > alias when ARCH is set in a certain way, Would it be better?
>
> No, I have no clue what you're trying to accomplish. You wanted to
> supply ARCH when decoding a 32-bit oops because you expected ARCH to
> work...?

Yes.

> AFLAGS has always been there, ARM folks added ARCH AFAIR. Also, you need
> AFLAGS to compile the snippet in the correct bitsize.
>
> And there's a usage note at the beginning of the script and I always
> read it to make sure I'm using it right.
>
> So what's the problem again?

Inconsistency.
For the ARM we have to provide ARCH, for x86 a variety of all the flags.

--
With Best Regards,
Andy Shevchenko