Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp820693imm; Wed, 11 Jul 2018 11:30:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcSp/PiiChDwBvc6KfBAncQlaegMsawwCgk0D/I9vs5wf53Riotvxee//8YpiQBMmfxhHeL X-Received: by 2002:a63:ff21:: with SMTP id k33-v6mr21101084pgi.38.1531333822141; Wed, 11 Jul 2018 11:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531333822; cv=none; d=google.com; s=arc-20160816; b=WaccuLDZT1j/j/bHJPmZMEOt0MzGejXvmbyX25A+xrwiHhUU5Zmx3EsseJ5d5vvDnR Yd910qWpARuP/0CfFOGoTKIcf4ciGy++GXkcXCsBmOfMwHGpmEjwVBnourkStbQfG/9e m5Myu2CoRVJ4N+0PW04IlgZ3fW/Q0KVFW0boITii61HSDU3mG7+2JGRLoVoi7Bq1lJWu yhU0JF6TVweRQiJxVx3TCzkDhQlTOvMQQ1z2dGPO20bXb1Ewogu2QMxtR0UbHXJ1r6aU FihMf+WkAmThxyfd9XxxUvmdLt+ZbXzjPMpZwz0dwVRj4bHb9KzpmZQkuRuFaUSIUbkt mQEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=J7EJQ7XR7VXRilprHQoiuuDkVty79rDetbRX4snHleU=; b=oKHlr6qGUB++ik8ghtdOUFkgWgv4xqfWH0YJDLeiFjECykfnzgX7vERv9azWFB89UM fD+vzhE2SggBRnjW/Oo5hxtYtWeHebQElXG92NaBcgn1jq/MM8oqPE2CbuA0swD/kqB3 ojhXSVrgDXFVPCz5NTbGrEsGCR9hg2/VDDmsF6KeKC2GvU5lhO92pWTVeNI3JRIaQu4o iMkpYdjj82IaZnmAW+1GZ2aiRPnvVOugb0EI+62FK24x4mveF9VPgsrp2E7xhzV6nl/6 aw8CbYl8VdiThzPsqy63AgGIMXyjZpHL4LUxG33iJJ7Zy0CpFlMjFDACpiqwreg8B8gE wDBA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2-v6si19324894pgd.357.2018.07.11.11.30.06; Wed, 11 Jul 2018 11:30:22 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389427AbeGKPv3 (ORCPT + 99 others); Wed, 11 Jul 2018 11:51:29 -0400 Received: from mga12.intel.com ([192.55.52.136]:40653 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389424AbeGKPv2 (ORCPT ); Wed, 11 Jul 2018 11:51:28 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 08:46:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,338,1526367600"; d="scan'208";a="71462702" Received: from 2b52.sc.intel.com ([143.183.136.52]) by fmsmga001.fm.intel.com with ESMTP; 11 Jul 2018 08:45:26 -0700 Message-ID: <1531323709.13297.25.camel@intel.com> Subject: Re: [RFC PATCH v2 18/27] x86/cet/shstk: Introduce WRUSS instruction From: Yu-cheng Yu To: Peter Zijlstra Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , "Ravi V. Shankar" , Vedvyas Shanbhogue Date: Wed, 11 Jul 2018 08:41:49 -0700 In-Reply-To: <20180711152754.GJ2476@hirez.programming.kicks-ass.net> References: <20180710222639.8241-1-yu-cheng.yu@intel.com> <20180710222639.8241-19-yu-cheng.yu@intel.com> <20180711094549.GA2476@hirez.programming.kicks-ass.net> <1531321089.13297.4.camel@intel.com> <20180711152754.GJ2476@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-07-11 at 17:27 +0200, Peter Zijlstra wrote: > On Wed, Jul 11, 2018 at 07:58:09AM -0700, Yu-cheng Yu wrote: > > > > On Wed, 2018-07-11 at 11:45 +0200, Peter Zijlstra wrote: > > > > > > On Tue, Jul 10, 2018 at 03:26:30PM -0700, Yu-cheng Yu wrote: > > > > > > > > > > > > diff --git a/arch/x86/lib/x86-opcode-map.txt > > > > b/arch/x86/lib/x86- > > > > opcode-map.txt > > > > index e0b85930dd77..72bb7c48a7df 100644 > > > > --- a/arch/x86/lib/x86-opcode-map.txt > > > > +++ b/arch/x86/lib/x86-opcode-map.txt > > > > @@ -789,7 +789,7 @@ f0: MOVBE Gy,My | MOVBE Gw,Mw (66) | CRC32 > > > > Gd,Eb (F2) | CRC32 Gd,Eb (66&F2) > > > >  f1: MOVBE My,Gy | MOVBE Mw,Gw (66) | CRC32 Gd,Ey (F2) | CRC32 > > > > Gd,Ew (66&F2) > > > >  f2: ANDN Gy,By,Ey (v) > > > >  f3: Grp17 (1A) > > > > -f5: BZHI Gy,Ey,By (v) | PEXT Gy,By,Ey (F3),(v) | PDEP Gy,By,Ey > > > > (F2),(v) > > > > +f5: BZHI Gy,Ey,By (v) | PEXT Gy,By,Ey (F3),(v) | PDEP Gy,By,Ey > > > > (F2),(v) | WRUSS Pq,Qq (66),REX.W > > > >  f6: ADCX Gy,Ey (66) | ADOX Gy,Ey (F3) | MULX By,Gy,rDX,Ey > > > > (F2),(v) > > > >  f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX > > > > Gy,Ey,By > > > > (F3),(v) | SHRX Gy,Ey,By (F2),(v) > > > >  EndTable > > > Where are all the other instructions? ISTR that documentation > > > patch > > > listing a whole bunch of new instructions, not just wuss. > > Currently we only use WRUSS in the kernel code.  Do we want to add > > all > > instructions here? > Yes, since we also use the in-kernel decoder to decode random > userspace > code. I will add other instructions. Yu-cheng