Re: [PATCH -v4] checkpatch: Check for .byte-spelled insn opcodes documentation on x86

From: Borislav Petkov
Date: Mon Oct 12 2020 - 13:15:56 EST


On Mon, Oct 12, 2020 at 10:09:44AM -0700, Joe Perches wrote:
> From: Borislav Petkov <bp@xxxxxxx>
>
> Instruction opcode bytes spelled using the gas directive .byte should
> carry a comment above them stating which binutils version has added
> support for the instruction mnemonic so that they can be replaced with
> the mnemonic when that binutils version is equal or less than the
> minimum-supported version by the kernel.
>
> Add a check for that.
>
> Requested-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Signed-off-by: Borislav Petkov <bp@xxxxxxx>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
> ---
>
> v4: trivial neatening of $Hex_byte and adding a mechanism to
> only emit the message once per patched file (Joe)
>
> scripts/checkpatch.pl | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)

./scripts/checkpatch.pl /tmp/test
Global symbol "$rawline" requires explicit package name (did you forget to declare "my $rawline"?) at ./scripts/checkpatch.pl line 6943.
Global symbol "$herecurr" requires explicit package name (did you forget to declare "my $herecurr"?) at ./scripts/checkpatch.pl line 6948.
Execution of ./scripts/checkpatch.pl aborted due to compilation errors.

No workie.

--
Regards/Gruss,
Boris.

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