Messages in this thread | | | From | Denys Vlasenko <> | Date | Fri, 13 Feb 2015 15:12:47 +0100 | Subject | Re: [PATCH] x86: insn decoder: create artificial 3rd byte for 2-byte VEX |
| |
On Fri, Feb 13, 2015 at 1:32 PM, Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote: > (2015/02/13 4:04), Denys Vlasenko wrote: >> Before this patch, users need to do this to fetch vex.vvvv: >> >> if (insn->vex_prefix.nbytes == 2) { >> vex_vvvv = ((insn->vex_prefix.bytes[1] >> 3) & 0xf) ^ 0xf; >> } >> if (insn->vex_prefix.nbytes == 3) { >> vex_vvvv = ((insn->vex_prefix.bytes[2] >> 3) & 0xf) ^ 0xf; >> } >> >> Make it so that insn->vex_prefix.bytes[2] always contains vex.wvvvvLpp bits. >> >> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> > > Looks OK for me :) > > Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> > > BTW, where would you use this ??
arch/x86/kernel/uprobes.c
reg2 = 0xff; /* Fetch vex.vvvv */ if (insn->vex_prefix.nbytes == 2) reg2 = insn->vex_prefix.bytes[1]; else if (insn->vex_prefix.nbytes == 3) reg2 = insn->vex_prefix.bytes[2];
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/uprobes.c#n354
| |