RE: [PATCH 4/9] x86/dumpstack: Improve opcodes dumping in the Code: section

From: David Laight
Date: Fri Mar 16 2018 - 07:56:28 EST


From: Borislav Petkov
> Sent: 15 March 2018 18:16
> On Thu, Mar 15, 2018 at 01:10:54PM -0500, Josh Poimboeuf wrote:
> > I liked OPCODE_BUFSIZE where it was before :-) Here it disrupts the
> > readability of the function a bit IMO.
>
> My thinking is have it close by so that you don't have to go search for
> its definition.
>
> But I don't have a strong opinion on where it should be so...

Is OPCODE_BUFSIZE even needed?
Maybe replace with 64 and use sizeof() and/or ARRAY_SIZE() elsewhere.
Then no one has to check that the bound is appropriate for the array.

David