Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp233642pxk; Thu, 24 Sep 2020 04:30:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytKoepz/KRfyFPNRZqalDypptk0GxmpQvB95IcWbpLMHvHdab6TnkeCgU0f8v+UM4X4xi9 X-Received: by 2002:a05:6402:396:: with SMTP id o22mr489163edv.316.1600947007941; Thu, 24 Sep 2020 04:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600947007; cv=none; d=google.com; s=arc-20160816; b=boCPIfKS4CFuvsXH58N3CuCjuQ4zCDitWhw84M5vq/3ASWpzGRCyuQGmOQ2bgI9Lez bSbS/kBrKAJeU1CDoLzcJwSSKEoESV8qO91Z+n7bf5/fotEHF1EC5MqRRe7QNU/0s98B qIlpJBf6Rr0KrZUCVTLrsx8G53gelEVojSzE5HOaxJD0h9xcAEq4sbn/TQPFylQJ/ua+ zmhWE6EJ2x/gXygV9sehv7o1QdANxO5m7xCanUjvpGfvYABK3S6k8+HjE3NkbqzxOB0q MWYjBrMzPjaUAdhjn2T8pCqXPUfYZGGG4xEHXH2i8HteO0/j/+VaeL34TmUsJC8VkfcI mhhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=NT1Si9EDB0gOKHzADCYzCQhH18T6fnWH8nwbMyTcII4=; b=T/LNmzsk5OxYoGKVpcaGt4Dmg/6zLz7Chf7HYD0CnNIoWHUvhxqf75KPx9ZpJnHQoX 6USxnG+Hw4Ops15MZBxybWPf/fqjuoAVOu/ejcaRPbX9trPIw810jwMBwyaUnHlUhNgq fzACmeOEDDeKT0R3EZ54RTgM3yKUO+sP6mEbsTPJSxccGieOdYQKz9pMAixBkPzzk1ZL jFINy/cc7mkHzj11jem8uJs3t39hEt3p/z0SsNQGNaUofDg84brWusT5mUWbW8dd9q/E ytgeiIG79CxogAJ9yky56nr7BJPRq+BY49erz5w+dAWTPRBlZk4EgQEa5PZ/7akgET8z Z67Q== 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 i6si989314ejs.301.2020.09.24.04.29.44; Thu, 24 Sep 2020 04:30:07 -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 S1727533AbgIXL2M (ORCPT + 99 others); Thu, 24 Sep 2020 07:28:12 -0400 Received: from mga14.intel.com ([192.55.52.115]:16373 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbgIXL2L (ORCPT ); Thu, 24 Sep 2020 07:28:11 -0400 IronPort-SDR: 190nK8jV78sjHnGgbbyr00u9Q3Tb/c37ZPFYUIxjXaAuPPLz6nsbiV3O+DIrtLrGN6J69MmFnz 4uaBXN8NsLNg== X-IronPort-AV: E=McAfee;i="6000,8403,9753"; a="160457571" X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="160457571" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 04:28:10 -0700 IronPort-SDR: 6AaJWL+W/8naSncd7ds/TQNBCRDBKYoSc7qLYzcsk3/4fkbG3+WX2R+VyamwX13Q2vJU66ZQUv BZCJFIs+FjRg== X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="486866581" Received: from ekoteln-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.45.129]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 04:28:04 -0700 Date: Thu, 24 Sep 2020 14:28:01 +0300 From: Jarkko Sakkinen To: Borislav Petkov Cc: x86@kernel.org, linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Randy Dunlap , Sean Christopherson , akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, asapek@google.com, cedric.xing@intel.com, chenalexchen@google.com, conradparker@google.com, cyhanish@google.com, dave.hansen@intel.com, haitao.huang@intel.com, josh@joshtriplett.org, kai.huang@intel.com, kai.svahn@intel.com, kmoy@google.com, ludloff@google.com, luto@kernel.org, nhorman@redhat.com, npmccallum@redhat.com, puiterwijk@redhat.com, rientjes@google.com, tglx@linutronix.de, yaozhangx@google.com Subject: Re: [PATCH v38 23/24] docs: x86/sgx: Document SGX micro architecture and kernel internals Message-ID: <20200924112801.GC56811@linux.intel.com> References: <20200915112842.897265-1-jarkko.sakkinen@linux.intel.com> <20200915112842.897265-24-jarkko.sakkinen@linux.intel.com> <20200923135005.GI28545@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200923135005.GI28545@zn.tnic> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 03:50:05PM +0200, Borislav Petkov wrote: > > +This leaf function takes an RSA-3072 signature of the enclave measurement and an > > +optional cryptographic token. Linux does not take advantage of launch tokens. > > +The instruction checks that the signature is signed with the key defined in > > +**IA32_SGXLEPUBKEYHASH?** MSRs and the measurement is correct. If so, the > > That '?' wants to be '[0123]' perhaps? What do you think of this: "The leaf instruction checks that the measurement is correct and signature is signed with the key hashed to the four +**IA32_SGXLEPUBKEYHASH{0, 1, 2, 3}** MSRs representing the SHA256 of a public key." I though that little more detail would make sense here (i.e. what do the MSRs represent). /Jarkko