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

2021-03-08 Thread Borislav Petkov
On Mon, Mar 08, 2021 at 12:22:34PM +0200, Andy Shevchenko wrote: > For the ARM we have to provide ARCH, for x86 a variety of all the flags. For x86 you have to provide only AFLAGS. If you want to make this script parse proper cmdline options like --arch, --width and --help along with keeping the

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

2021-03-08 Thread Andy Shevchenko
On Mon, Mar 8, 2021 at 12:17 PM Borislav Petkov 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 AR

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

2021-03-08 Thread Borislav Petkov
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 se

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

2021-03-08 Thread Andy Shevchenko
On Sat, Mar 6, 2021 at 12:25 AM Borislav Petkov wrote: > > On Fri, Mar 05, 2021 at 08:39:48PM +0200, Andy Shevchenko wrote: > > On x86_64 host the objdump uses current architecture which is 64-bit > > and hence decodecode shows wrong instructions. > > > > Fix it by supplying '-M i386' in case of A

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

2021-03-05 Thread Borislav Petkov
On Fri, Mar 05, 2021 at 08:39:48PM +0200, Andy Shevchenko wrote: > On x86_64 host the objdump uses current architecture which is 64-bit > and hence decodecode shows wrong instructions. > > Fix it by supplying '-M i386' in case of ARCH i?86 or x86. At the beginning of the script says: # e.g., to