Re: [PATCH] checkpatch: Check for .byte-spelled insn opcodes documentation on x86
From: Borislav Petkov
Date: Sat Oct 10 2020 - 19:11:18 EST
On Sat, Oct 10, 2020 at 08:27:20AM -0700, Joe Perches wrote:
> Then this could use:
>
> /"\s*\.byte\s+(?:0x[0-9a-fA-F]{1,2}\s*,\s*){2,4}/
Yes, this is getting close.
I've tweaked it a bit to:
'/\s*\.byte\s+(?:0x[0-9a-f]{1,2}[\s,]*){2,}/i'
which assumes at least 2 opcode bytes; upper limit can be more than 4.
It still has some false positives in crypto but I'd say that's good
enough. I'll play more with it later.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette