Re: [PATCH] scripts/decodecode: Make objdump always use operand-size suffix

From: Borislav Petkov
Date: Tue Mar 01 2022 - 05:44:40 EST


On Tue, Mar 01, 2022 at 04:16:47PM +0700, Ammar Faizi wrote:
> I would say always using operand-size is our habit in writing Assembly code.

"our" is who?

> Especially for the Linux kernel. Looking at entry_64.S, entry_32.S and many
> Assembly files here, we always use the operand-size. It also helps to determine
> the size quickly.

When do you ever need to determine the operand size quickly?

> It gives us extra information about the operand size when
> sometimes it can be vague.

So I'm looking at output of

objdump -d arch/x86/entry/entry_64.o

and it does by default add suffixes when it is not perfectly clear what
the operand size is, for example:

6a 2b pushq $0x2b

vs

41 51 push %r9

so I think the default of not explicitly adding suffixes when it is
clear what size it is, is the most optimal one.

> I don't think it's that urgent to have, but having it should not bother people
> who don't care with the operand-size suffix anyway.

So I'd prefer if this were a command line option which turns this on
only for whoever absolutely needs it.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette