lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Feb 2017 07:32:07 -0800
To:     Peter Zijlstra <>
CC:     Thomas Gleixner <>,
        Ingo Molnar <>,,,,,,
Subject: Re: [PATCH] x86: Implement __WARN using UD0

On February 23, 2017 7:23:09 AM PST, Peter Zijlstra <> wrote:
>On Thu, Feb 23, 2017 at 07:09:05AM -0800, wrote:
>> Well, it only matters if the instruction extends past a segment
>> boundary or page.  However, the CPU instruction decoder will consume
>> modrm for UD1, and so using just the two opcode bytes may cause a #PF
>> or #GP when a #UD was intended.
>It also matters if you want the decoded instruction stream to make
>If for instance I use UD1 without the ModRM byte for WARN, objtool gets
>mighty confused because the instruction stream doesn't decode properly.
>objtool will also consume the extra byte and then the next instruction
>is offset and decodes wrong and it stresses out.
>Similarly, if you were to do objdump (and objdump were to actually
>correctly decode UD1) then the resulting asm would make no sense.
>The kernel will work 'fine', because even without ModRM it will #UD,
>the #UD handler will IP+=2 and all is well, but it becomes impossible
>actually decode the function..

Well, once you are using invalid instructions, it depends not on what the CPU decodes but what your own handler expects.  Consider Microsoft's use of C4 C4 /ib as a meta-instruction (called BOP, "BIOS operation")... that format has nothing to do with the CPU, but if you want to disassemble the resulting code you need to know about how they encode BOP.

Sent from my Android device with K-9 Mail. Please excuse my brevity.

Powered by blists - more mailing lists