Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752971AbbBMONK (ORCPT ); Fri, 13 Feb 2015 09:13:10 -0500 Received: from mail-qa0-f45.google.com ([209.85.216.45]:53494 "EHLO mail-qa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752608AbbBMONI (ORCPT ); Fri, 13 Feb 2015 09:13:08 -0500 MIME-Version: 1.0 In-Reply-To: <54DDEEFB.2010107@hitachi.com> References: <1423767879-31691-1-git-send-email-dvlasenk@redhat.com> <54DDEEFB.2010107@hitachi.com> From: Denys Vlasenko Date: Fri, 13 Feb 2015 15:12:47 +0100 Message-ID: Subject: Re: [PATCH] x86: insn decoder: create artificial 3rd byte for 2-byte VEX To: Masami Hiramatsu Cc: Denys Vlasenko , "Frank Ch. Eigler" , Srikar Dronamraju , Ananth N Mavinakayanahalli , Jim Keniston , Oleg Nesterov , Andi Kleen , Ingo Molnar , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1327 Lines: 37 On Fri, Feb 13, 2015 at 1:32 PM, Masami Hiramatsu 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 > > Looks OK for me :) > > Acked-by: Masami Hiramatsu > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/