Messages in this thread | | | Date | Tue, 2 Mar 2021 09:38:37 +0100 | From | Peter Zijlstra <> | Subject | Re: [RFC PATCH 1/1] x86/kprobes: Use int3 instead of debug trap for single-step |
| |
On Mon, Mar 01, 2021 at 11:08:15PM +0900, Masami Hiramatsu wrote:
> + default: > + if ((opcode & 0xf0) == 0x70) { > + /* 1 byte conditional jump */ > + p->ainsn.emulate_op = kprobe_emulate_jcc; > + p->ainsn.jcc.type = opcode & 0xf; > + p->ainsn.rel32 = *(char *)insn->immediate.bytes; > + } > }
Would it make sense to write that as:
case 0x70 ... 0x7f: /* 1 byte conditional jump */ p->ainsn.emulate_op = kprobe_emulate_jcc; p->ainsn.jcc.type = opcode & 0xf; p->ainsn.rel32 = *(char *)insn->immediate.bytes; break;
instead? Preferably right before the 0x0f case :-)
| |