[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 10 Oct 2020 18:11:12 +0200
From: Borislav Petkov <bp@...en8.de>
To: Joe Perches <joe@...ches.com>
Cc: X86 ML <x86@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>,
Andy Whitcroft <apw@...onical.com>,
LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] checkpatch: Check for .byte-spelled insn opcodes
documentation on x86
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
Powered by blists - more mailing lists