Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1049549ybm; Wed, 27 May 2020 14:55:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxjw9Xycr1rb30nLzKRoOeUaHC/lUI0WfzdratxpNBqhwu3qxnXLjYwVwUzVVK/Vl/4HlT X-Received: by 2002:a17:906:1ed3:: with SMTP id m19mr323841ejj.429.1590616523012; Wed, 27 May 2020 14:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590616523; cv=none; d=google.com; s=arc-20160816; b=z0pXmr0HIekj1YwAyuZsdDG1/zviNKrIDbWlLBke3IbbMsfDl+xh5EIlMwZHguMxbs A70A6KZrxyJicEplV+HuOkd5oETF7df6QyDlP0WzFMVJ9s4oLqB+JdKwPIkxgrwqprlv 9bVJ4VCndI7OK6k3UxnpRrvCpSoYTu3TEY1WJaOHXTmDLSqmOu86BsJGvs7cW6bmq7Ys HL5BgQLhJLDWFc4TDOVOUcZZFbCMn1wcMryfDFE9a3lxKaeOvFdLSiNcAIWHJl15NOG0 Lt3r0Zf22I+oV7A4q5Yp0Y29xN407yN92cenTUbuaMRgyaC09aBx5mbKnz9xOY57oVfT cxVQ== 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 :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:ironport-sdr:ironport-sdr; bh=O3CIk25cJvJUZSyqNGlTtr0TRnOG5qdpNYNVB9U9LBo=; b=fLYCIPld3ZE0iWN1oA0MDqMAwQVuk7WH48vkmCtgaJK1y7PKBiLbi+uGBhEA5Sg0Zz WCW9hLbwqzxOIknbi3Qf4DyxW+ve3qTXhIrXFrk/OBOiqC3DbZ8LPu6KsWXi1oSizgxw TUShUe1rR2dpQURKlT6LwdrjuMiDTzu9xsZbmBEEhTuZKtP4xVs9Kv+XfEHky3ylmlmy 0Xk8at2TstYSik7o0znLTZbu5/QChbHxeZgECsdqs4v9aK9HpJggeJsZURYMu5SDVLxt slj1CwJKKctJzOe/mBAsPC0rlX2jaZFCmpjRwkgqIRUwzMkLrjUqKlwE6FLFfP94sJtV XLGg== 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 o25si2531325ejx.662.2020.05.27.14.55.00; Wed, 27 May 2020 14:55:23 -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 S1728139AbgE0Tnj (ORCPT + 99 others); Wed, 27 May 2020 15:43:39 -0400 Received: from mga07.intel.com ([134.134.136.100]:50991 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbgE0Tnj (ORCPT ); Wed, 27 May 2020 15:43:39 -0400 IronPort-SDR: GRHZFPEodn44ButcYfPfFb+sFRWqP9BqSWzKdh1G6tHFkz3GUFqNcBRC0vm6ugRcvwN0uuU9wz ErRn4kTWcESw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2020 12:43:38 -0700 IronPort-SDR: hF0sOxrU7ydoJBeclUjIZCnUA5GkejfLmzFCFF2Hx5631FpY/5rLxCejvBNaRxbsHB+vIOsqLd JLwP3RIYPvAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,442,1583222400"; d="scan'208";a="468836609" Received: from lkakolx-mobl.ger.corp.intel.com ([10.249.43.73]) by fmsmga005.fm.intel.com with ESMTP; 27 May 2020 12:43:29 -0700 Message-ID: Subject: Re: [PATCH v30 04/20] x86/sgx: Add SGX microarchitectural data structures From: Jarkko Sakkinen To: Borislav Petkov Cc: Sean Christopherson , 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 Date: Wed, 27 May 2020 22:43:28 +0300 In-Reply-To: <20200525082013.GC25636@zn.tnic> References: <20200515004410.723949-1-jarkko.sakkinen@linux.intel.com> <20200515004410.723949-5-jarkko.sakkinen@linux.intel.com> <20200520184745.GJ1457@zn.tnic> <20200522155405.GA8377@linux.intel.com> <20200522161326.GC25128@linux.intel.com> <20200522195017.GA121470@linux.intel.com> <20200525082013.GC25636@zn.tnic> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.2-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-05-25 at 10:20 +0200, Borislav Petkov wrote: > On Fri, May 22, 2020 at 10:50:17PM +0300, Jarkko Sakkinen wrote: > > If other values except two are never going to be used it is more than a > > legit point to validate this field. > > > > It also the potential to use ~0x8086 bits to be defined later if ever > > needed lets say for some kernel specific purpose. > > Yah, let's cover our ass for the future. We have all seen the "this > won't be used" but then "we're using it" change of heart. IOW, let's > align with what the hw checks and we can always relax that in the future > but not the other way around. > I fully agree with this conclusion and that is exactly how I think about the issue too. I'll add a check for this. /Jarkko