Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp864596ybk; Wed, 20 May 2020 14:06:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTPTV1TMU1rnQLZ47wJRMK5hZSu/BUrb+vTntZDpaLRWKYLYMzexY7YvA2fq5d0wRgJdY5 X-Received: by 2002:a17:907:2142:: with SMTP id rk2mr897408ejb.225.1590008798846; Wed, 20 May 2020 14:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590008798; cv=none; d=google.com; s=arc-20160816; b=MhtW65TohfRqSUkh9e/4/h9LrTd3vK7l1BtVwmgBOSZFnETrr1Jm7hAR5api/m2djb meRusMIVNXTGibg1rekTmxgx4ZzmbE75E8zuy5IfF2MznxyrsUEp/anxLOl+lmZC93zp 4uYpSJ1PTu0tOWPOJUAjl+SD2gXo4MGc5NuteCmzDruNSR9CeGmD0+ZHI+Weu93qJWKh BfwTDqrjldAl7tSblE8dNFHTXsdFABA2vU5FNMN5OgedDqaWmaij3FUKIxaD1hpqC0Z3 vRiP6Egl3gUGF+uK8AptlqI3XoiF7bzYUU2jYGDv7Gc3fcdJbRiMDiUKHtg7Q52guFHW w5pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=3uSjutUgtrrLFiOC2Y+IBpFeiW4nFN8whKPxzSiABsQ=; b=gzTRtTlxi4tbhDYWnE5JrcF+ZU8wS2ijwmd5EBOD96aEjIfXxCcc2O2iCCDsNGZwWv SjJ36H9HGkgKdmJ67V1MWtr3cQyVVoT6ArldI3xZAoWw12LHwcUeQ6t5XVwX+5yOFd5P 6MhBKnJourwfvK+mbjlDtdTIhJ1H6RyM7AkKztHfpXK2W9PsOS7fk8XfyTxlbKaWl5EU o30gDktXUinAxUJ1I905zTG5wU22+EZ+eIUu+4TxfqhNNVbvUwb+VUqNoe3cNy+FYOPu dwsXT7dxWtQfVG5HYkgf+r9G6Pda7fqivcGIcq7SYJfdkrc//PmV79VNgR1i3Ng2rPEI QhKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id g7si2375220ejc.469.2020.05.20.14.06.16; Wed, 20 May 2020 14:06:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727942AbgETVEn (ORCPT + 99 others); Wed, 20 May 2020 17:04:43 -0400 Received: from mga14.intel.com ([192.55.52.115]:60965 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727067AbgETVEn (ORCPT ); Wed, 20 May 2020 17:04:43 -0400 IronPort-SDR: o3Bo0UT+dO6ibuBadmxuVg+z5NlkdXbUgnO/hmW0bdtyM5Gq5LqK8/vqYTd5IDeMcrzt0GT72O Y+9rD1fhjAwg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2020 14:04:42 -0700 IronPort-SDR: 4xYjxQw9iQNwd+UAdFu4L3s23woNlbuAhhuV1E0+mLOeQ75curoIzQvYtn3y6Xv8ueWEDlckJw pP6x9/dSsilg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,415,1583222400"; d="scan'208";a="289486103" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.152]) by fmsmga004.fm.intel.com with ESMTP; 20 May 2020 14:04:41 -0700 Date: Wed, 20 May 2020 14:04:41 -0700 From: Sean Christopherson To: Borislav Petkov Cc: Jarkko Sakkinen , linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, nhorman@redhat.com, npmccallum@redhat.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com, puiterwijk@redhat.com, Jethro Beekman Subject: Re: [PATCH v30 04/20] x86/sgx: Add SGX microarchitectural data structures Message-ID: <20200520210441.GD18102@linux.intel.com> References: <20200515004410.723949-1-jarkko.sakkinen@linux.intel.com> <20200515004410.723949-5-jarkko.sakkinen@linux.intel.com> <20200520184745.GJ1457@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200520184745.GJ1457@zn.tnic> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 20, 2020 at 08:47:45PM +0200, Borislav Petkov wrote: > On Fri, May 15, 2020 at 03:43:54AM +0300, Jarkko Sakkinen wrote: > > +/** > > + * struct sgx_sigstruct_header - defines author of the enclave > > + * @header1: constant byte string > > + * @vendor: must be either 0x0000 or 0x8086 > > Out of pure curiosity: what is that about? > > Nothing in the patchset enforces this, so hw does? If so, why? Yes, enforced by hardware during EINIT. > Are those vendor IDs going to be assigned by someone or what's up? No, the field has no real meaning or value, and there is no (and never was any) intent to use it to create an OEM registry or anything of that nature. It's effectively a reserved-0 field that happens to allow 0x8086 because of legacy behavior within Intel's signing sytem. Intel signed enclaves currently populate it with 0x8086, but future enclaves may change the vendor to 0x0 just to avoid confusion. In short, software should ignore the field.