Re: [linus:master] BUILD REGRESSION a2e5790d841658485d642196dbb0927303d6c22f
From: Borislav Petkov
Date: Thu Feb 08 2018 - 04:47:20 EST
On Thu, Feb 08, 2018 at 10:13:02AM +0100, Peter Zijlstra wrote:
> diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
> index 34d99af43994..f0d5b4a1512d 100644
> --- a/arch/x86/include/asm/bug.h
> +++ b/arch/x86/include/asm/bug.h
> @@ -12,16 +12,21 @@
> * (binutils knows about "ud1" but {en,de}codes it as 2 bytes, whereas
> * our kernel decoder thinks it takes a ModRM byte, which seems consistent
> * with various things like the Intel SDM instruction encoding rules)
> + *
> + * And now someone went and taught binutils about UD0 as taking a ModR/M too
> + * and it generates crap when disassembling the kernel. Stick a pointless 0xD6
> + * ModR/M on, which the old binutils decodes as (bad) and the new binutils sees
> + * as a valid single byte ModR/M.
> */
>
> -#define ASM_UD0 ".byte 0x0f, 0xff"
> +#define ASM_UD0 ".byte 0x0f, 0xff, 0xd6"
Yeah, we probably should say that it was SALC:
http://ref.x86asm.net/geek.html#xD6
but undefined after P4.
Not that it matters a whole lot after an UD0. And it still won't matter
if it gets redefined to some new fancy prefix.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.