Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1821859ybb; Thu, 26 Mar 2020 07:58:42 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsLdDnHuLnbJ/lI5+LREniLmLD2jnDfsIuLymh/6S/aoLcODUvhOHbVsohbURg5QYoe231B X-Received: by 2002:a05:6830:19ec:: with SMTP id t12mr6219301ott.24.1585234722405; Thu, 26 Mar 2020 07:58:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585234722; cv=none; d=google.com; s=arc-20160816; b=al9Ct4Zg7pF1d2siPzdDaRFqA+K/yywJ2KXhkDsQyGp+PMsIlh3xzqkHlet2eCaJr4 Ldf0aqwTm1CkiD6gQv0sOjhrvhTajN/bMAKg9Z+Hqy546UJfLMZtcdAur9ce2x/8ODUd mgRVxNBcehxodlCel7EiL2F/GZjYtbU9My9bqZxI/j5EArkLWQU2vgoXu3R2YIyzUAZ8 +z4aRTDjW9Vc8jVqo3uN51OrfSFEhfuCQZiNVOLZdbdLz1Gs4k/kRLIQBOYkWUMXC2ru rPmnvea3OgfxTM671/ySPDPENvWricKKQyDJeGsjcKFjgd8mHmzY8EG9rrsYsXUPkLH4 hVqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=Ae/cSBEsHntpDVcOFjQz46ynMe+UadTdLe4WT8p1RpU=; b=QDh/mFYRSrqIfimlWy4wLT1LzwiqqhVdOgXcGJWxixPXb5+nQl+7PdII/UBZLQhrPe fvGqc2WkIGTSJkTlFYD6EWE3tbVHq6Qd+wX11xBLNstdLOaGGbgc+4S8iHRY9vDvaQO0 NKYoE81AzQyKD228A7ys4spa5xWnlFuHpW1kMF0mF7kjNGIwcG6ZPRvnOmCtG+MbK4nJ /h4cFNHwUElagFy2kUCkiqdrN99gIr0AB1BXHuI1XJVM/JHkTztZyYRPmXlKGO4wBGbm l8XYhtnxMaeilVUKjXmieGXWXJLrCCC3V0Afh2u/VqvQ4pbTq02U/RASEFp2YvPCx6/w KB8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ovEuv/Sk"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9si1150730oti.202.2020.03.26.07.58.29; Thu, 26 Mar 2020 07:58:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ovEuv/Sk"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728076AbgCZO5d (ORCPT + 99 others); Thu, 26 Mar 2020 10:57:33 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42120 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727831AbgCZO5c (ORCPT ); Thu, 26 Mar 2020 10:57:32 -0400 Received: by mail-qt1-f196.google.com with SMTP id t9so5478868qto.9 for ; Thu, 26 Mar 2020 07:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Ae/cSBEsHntpDVcOFjQz46ynMe+UadTdLe4WT8p1RpU=; b=ovEuv/Sk3SHlUrsbYzcjLJ8FJjziOHL6wrJf4miHPFqHIFF6wEre4H/VvYqiUrbl6Y EYoU/yPN+QPgpXfxQXy5TDCE5MrcZSi0YvSyDU3oNhHCfDhmRwyJZdhzt0c6/9axFG8b 6Gkeo06YdfTTGo4FM/gHL8Xpoghqp5L3hLFPjeVIGLlUJVvf2TnyEkIweGD8WPOlPYfj St8nb9gDjc2fbljl6WgnEumcDrahkX+1yRYJPX2PXYOJtyJE1oeqUG+e09FGPY/Dr76x 5s61CepEz8PivIA6Pa6g/zJmQwiOA63otedD2m+Sdb6J//FBXLM4lHRair4Xv7jrpR0D ARKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ae/cSBEsHntpDVcOFjQz46ynMe+UadTdLe4WT8p1RpU=; b=W6MXdONLp2ianE3aveQ6+p8HDcrdna6FjV0g56Bg20LLCFSDDP8IdzizgdxEhPEyk7 eT//wukFZWJ7zbuClslm1JLQ2V8UT370y4J4khRtobSnBJPkrobtDuZRGDb8yJZ8uJnP 8LCSn97YXAwAYM8fgU3M+LSR5zMSgpHbGiNaXmXMPCBnmWZC1byvlX9SOMolq5QQooGx saKRnYfJFh5E5ueCuUN3Ag1I/0d5IreLXx9a7z2j1RWwqMw2vlT+qMIUDb9D3/uD+PtN tk01j+L7dHFXqYiqsko+qd0so3Uu4Y6k+PjIit7DYRvZaRvptTYFdXyxB0RPJE5ZUKNH 20PA== X-Gm-Message-State: ANhLgQ2TRrLPtWSIB23QUldi1GWzORY0WRpq7W0svNImH5w+fzAhjFDz LFMeFcja67x4fR8/dHtTfzA= X-Received: by 2002:aed:3981:: with SMTP id m1mr8776154qte.35.1585234650090; Thu, 26 Mar 2020 07:57:30 -0700 (PDT) Received: from quaco.ghostprotocols.net ([179.97.37.151]) by smtp.gmail.com with ESMTPSA id f93sm1725423qtd.26.2020.03.26.07.57.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 07:57:29 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id E650140061; Thu, 26 Mar 2020 11:57:26 -0300 (-03) Date: Thu, 26 Mar 2020 11:57:26 -0300 To: "Hunter, Adrian" Cc: Arnaldo Carvalho de Melo , Masami Hiramatsu , Mingbo Zhang , "x86@kernel.org" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Andi Kleen , Josh Poimboeuf , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] x86: perf: insn: Tweak opcode map for Intel CET instructions Message-ID: <20200326145726.GC6411@kernel.org> References: <20200303045033.6137-1-whensungoes@gmail.com> <20200326103153.de709903f26fee0918414bd2@kernel.org> <20200326135547.GA20397@redhat.com> <363DA0ED52042842948283D2FC38E4649C72EFF3@IRSMSX106.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <363DA0ED52042842948283D2FC38E4649C72EFF3@IRSMSX106.ger.corp.intel.com> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Mar 26, 2020 at 02:19:07PM +0000, Hunter, Adrian escreveu: > > -----Original Message----- > > From: Arnaldo Carvalho de Melo > > Sent: Thursday, March 26, 2020 3:56 PM > > To: Hunter, Adrian > > Cc: Masami Hiramatsu ; Mingbo Zhang > > ; Arnaldo Carvalho de Melo > > ; x86@kernel.org; Thomas Gleixner > > ; Ingo Molnar ; Borislav Petkov > > ; H. Peter Anvin ; Andi Kleen > > ; Josh Poimboeuf ; linux- > > kernel@vger.kernel.org > > Subject: Re: [PATCH] x86: perf: insn: Tweak opcode map for Intel CET > > instructions > > > > Em Thu, Mar 26, 2020 at 07:09:45AM +0200, Adrian Hunter escreveu: > > > On 26/03/20 3:31 am, Masami Hiramatsu wrote: > > > > Hi, > > > > > > > > On Mon, 2 Mar 2020 23:50:30 -0500 > > > > Mingbo Zhang wrote: > > > > > > > >> Intel CET instructions are not described in the Intel SDM. When > > > >> trying to get the instruction length, the following instructions > > > >> get wrong (missing ModR/M byte). > > > >> > > > >> RDSSPD r32 > > > >> RSDDPQ r64 > > > >> ENDBR32 > > > >> ENDBR64 > > > >> WRSSD r/m32, r32 > > > >> WRSSQ r/m64, r64 > > > >> > > > >> RDSSPD/Q and ENDBR32/64 use the same opcode (f3 0f 1e) slot, which > > > >> is described in SDM as Reserved-NOP with no encoding characters, > > > >> and got an empty slot in the opcode map. WRSSD/Q (0f 38 f6) also got > > an empty slot. > > > >> > > > > > > > > This looks good to me. BTW, wouldn't we need to add decode test cases > > to perf? > > > > > > > > Acked-by: Masami Hiramatsu > > > > > > > > Thank you, > > > > > > > > > > We have correct patches that you ack'ed for CET here: > > > > > > > > > https://lore.kernel.org/lkml/20200204171425.28073-1-yu-cheng.yu@intel. > > > com/ > > > > > > But they have not yet been applied. > > > > > > Sorry for the confusion. > > > > I'll collect them, thanks for pointing this out. > > The patches are in tip courtesy of Borislav Petkov thank you! Ok, thanks Borislav, - Arnaldo