Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp427236pxk; Thu, 24 Sep 2020 08:56:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrkqAPuMBO6ysiqZdObqKb49qn6d0hhg4K4p5SQCAxsw7tq06NaejGAo863xAVvpwby56a X-Received: by 2002:aa7:d747:: with SMTP id a7mr572116eds.304.1600962996280; Thu, 24 Sep 2020 08:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600962996; cv=none; d=google.com; s=arc-20160816; b=LKA+2eOe0dH9Un8kfr/ytmKQfBVdtqpjcTAFslHs8LLUVI7K2cqKd4kEwJRQjM+5j5 ruGcI+KdmStp8dh6V/5u1/BF5tkuPfcppxJnZDG7jt5h3g2UchK1OWkTEd4vr/1aotmk cZxwxKChXwUC/3CMPa54d+YHQayaEg9nwqT2VtwiHK8XCEav+KsZuwVlI4H4m9tS9MBF 4gC4WVw5Yp+V+wt3Nzvy1HdTenrUy1h1TklKNgNGnIlqrm321k9f1JrVtFtxDrFvJq3V 2+P7LirzD8xHqi9Gdy/jcz4gZN1p32tqiFw56wXZon2SzWjwQON6Io/7+b3zs3yI7Cwt jRLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=J/4r033Gyo3ppyqwY9Pbc9elt+QQJk8ct5cP7ZKcUho=; b=fp1NpyELxAPaKBYNilyCuEhF1sT8HQtqV2dvbvAVJnZst3x1oGQMX5Qkq8igj23d5I RKQf28Qrq1GFY8OLAdYDRr3W5j+qlshc6vfHGpwWc3FLhsccvLWM2lXIzEC6MLxzd2VS ZVUV4pDBtJKpa8BTzn3btq/gLiqCk0S9UfxHsCaVlNp0bHcmIzPhnOY4YotphYW77ixr ztaS2QXUQUG0yOsmLmeu67L4p0CfiBRWG2V3BTzB86KRQEFJbOnAvpA8nVv2BtIA6Oqu qqPv0jlDKr9krRbLvH1MPKQyZ/zGHuSy+4we9nSn+oOqvReBvxdlwLoH7FZuOJ8HS6Ir 4QiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="j/EqoXz2"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si2224230ejc.209.2020.09.24.08.56.13; Thu, 24 Sep 2020 08:56:36 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b="j/EqoXz2"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728558AbgIXPzD (ORCPT + 99 others); Thu, 24 Sep 2020 11:55:03 -0400 Received: from mail.skyhub.de ([5.9.137.197]:35022 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728285AbgIXPzC (ORCPT ); Thu, 24 Sep 2020 11:55:02 -0400 Received: from zn.tnic (p200300ec2f0c950086c1a307bd73ace8.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:9500:86c1:a307:bd73:ace8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 1EAD81EC03D2; Thu, 24 Sep 2020 17:55:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1600962901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=J/4r033Gyo3ppyqwY9Pbc9elt+QQJk8ct5cP7ZKcUho=; b=j/EqoXz2+IffhVveRKizA8vUZ3LdiGdPZpMaCqlpWuU1mRu4YjukcKsXG87JkoBBxXCz7N e5A/OBJs/ho96hyFZmIfML/QsE5kVlyjlSbhoyuKgC/U5mO2rj4W6Fjh2wDnH8lvdcqqP8 GJH2TbreiYgkDjikll+THr+aOv9wGBw= Date: Thu, 24 Sep 2020 17:54:59 +0200 From: Borislav Petkov To: Jarkko Sakkinen 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: <20200924155459.GI5030@zn.tnic> References: <20200915112842.897265-1-jarkko.sakkinen@linux.intel.com> <20200915112842.897265-24-jarkko.sakkinen@linux.intel.com> <20200923135005.GI28545@zn.tnic> <20200924112801.GC56811@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200924112801.GC56811@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 24, 2020 at 02:28:01PM +0300, Jarkko Sakkinen wrote: > 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." ACK. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette