• Denys Vlasenko's avatar
    uprobes/x86: Fix 1-byte opcode tables · 67fc8092
    Denys Vlasenko authored
    This change fixes 1-byte opcode tables so that only insns
    for which we have real reasons to disallow probing are marked
    with unset bits.
    
    To that end:
    
    Set bits for all prefix bytes. Their setting is ignored anyway -
    we check the bitmap against OPCODE1(insn), not against first
    byte. Keeping them set to 0 only confuses code reader with
    "why we don't support that opcode" question.
    
    Thus: enable bytes c4,c5 in 64-bit mode (VEX prefixes).
    Byte 62 (EVEX prefix) is not yet enabled since insn decoder
    does not support that yet.
    
    For 32-bit mode, enable probing of opcodes 63 (arpl) and d6
    (salc). They don't require any special handling.
    
    For 64-bit mode, disable 9a and ea - these undefined opcodes
    were mistakenly left enabled.
    Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Jim Keniston <jkenisto@us.ibm.com>
    Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
    Link: http://lkml.kernel.org/r/1423768732-32194-2-git-send-email-dvlasenk@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    67fc8092
uprobes.c 32.4 KB