Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3093852pxa; Tue, 18 Aug 2020 06:31:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytWEofWZIBkxQlpdRQL2tYJTgyJCK321y4MCivr1c/FrQKVhkobJHWAQ4SVelrUq2mfHOQ X-Received: by 2002:a17:907:11d0:: with SMTP id va16mr20920185ejb.426.1597757514731; Tue, 18 Aug 2020 06:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597757514; cv=none; d=google.com; s=arc-20160816; b=W3gk8s7OajNGaGHSKYyGTNCxnyyFqy89nbkuKc43ZfANrhEFg5aITpKj09huoqgCpY NKWET12owf7iJb3PSPY6DHFAaNF803x7kpEUZEgCTyFN+vWKAt/ahuGkfgP3z0OEcgFn xFfWrYrUi5If5A0dIavmHE7Xr7P6AKw4I0W8TXtSsqa+txZf2uHdNW/dgaqiLsUYaKMw WK4vbctSDWlgycLVfXQbBBaGCMZkMChjuN3fIIGDSh9+Zii4fkqAwY/v5RU+4JGKU3UQ KB/zReUSXA6Exl94a7hpJy6VsrlJdSUXrw3Ms23o5wLqoryPZ0aF0UZU/JDhUggSHAv5 JjgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=4DbMrZtS6vDDggh+UodzWIq/1Skxtnpc7pI8zWBZWZ8=; b=CMiDbb7x9PpXI3OCoSNxW7dTExNOAln4XTN1Tb86sqQs5+EuJOL4cpMZUYrdIrTKIE d8w4Kw0x32uc7hXeh5HRaJFf6ETHbQiV5bo7ypb+K+A/m6WuifpfsChTh3+XxYjZ8U5W ikDYrh8j4BAvmweO/7kumhV0ver/URFbdfi4zi6e5TTFnRfC8YeW09BhQBBgz/bl4aXR JrT/M5n0FL/DqHYHYOZKzD1mc9q4OY5RzlG3B18V+kb827CsomCkrHQ0rzB2vyg/Ha8H dyNgzgI1kOKJ0n13+79WlokXvzi+xPoVjhtLnftaz2fa/Mb24I5rW9BKx+rxHLE3+hKr X7tA== 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 y18si13365583edu.518.2020.08.18.06.31.26; Tue, 18 Aug 2020 06:31:54 -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 S1726633AbgHRNaz (ORCPT + 99 others); Tue, 18 Aug 2020 09:30:55 -0400 Received: from mga12.intel.com ([192.55.52.136]:30975 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726398AbgHRNaq (ORCPT ); Tue, 18 Aug 2020 09:30:46 -0400 IronPort-SDR: jNdtA3Y7TU7DSpeWm+hkBTwXujSn1HEyRfk+htIHdLshtAHxL8FfuYEqHF4ATvazDEXbR+iORW OSvMhmMhTEHw== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="134417565" X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="134417565" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2020 06:30:44 -0700 IronPort-SDR: jXUvZvRc+cIhhVBV2rYBhufEk84sPAFYVdOiBEwrwpRlcSSFTst3dT741J0f+18reKSDfNcmNW VtGIKQJbXNxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="292764503" Received: from ribnhajh-mobl.ger.corp.intel.com (HELO localhost) ([10.249.47.113]) by orsmga003.jf.intel.com with ESMTP; 18 Aug 2020 06:30:36 -0700 Date: Tue, 18 Aug 2020 16:30:36 +0300 From: Jarkko Sakkinen To: Darren Kenny Cc: x86@kernel.org, linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Jethro Beekman , Andy Lutomirski , akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, asapek@google.com, bp@alien8.de, 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, nhorman@redhat.com, npmccallum@redhat.com, puiterwijk@redhat.com, rientjes@google.com, sean.j.christopherson@intel.com, tglx@linutronix.de, yaozhangx@google.com Subject: Re: [PATCH v36 15/24] x86/sgx: Allow a limited use of ATTRIBUTE.PROVISIONKEY for attestation Message-ID: <20200818133026.GA132200@linux.intel.com> References: <20200716135303.276442-1-jarkko.sakkinen@linux.intel.com> <20200716135303.276442-16-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 06, 2020 at 06:00:02PM +0100, Darren Kenny wrote: > On Thursday, 2020-07-16 at 16:52:54 +03, Jarkko Sakkinen wrote: > > Provisioning Certification Enclave (PCE), the root of trust for other > > enclaves, generates a signing key from a fused key called Provisioning > > Certification Key. PCE can then use this key to certify an attestation key > > of a Quoting Enclave (QE), e.g. we get the chain of trust down to the > > hardware if the Intel signed PCE is used. > > > > To use the needed keys, ATTRIBUTE.PROVISIONKEY is required but should be > > only allowed for those who actually need it so that only the trusted > > parties can certify QE's. > > > > Obviously the attestation service should know the public key of the used > > PCE and that way detect illegit attestation, but whitelisting the legit > > users still adds an additional layer of defence. > > > > Add new device file called /dev/sgx/provision. The sole purpose of this > > file is to provide file descriptors that act as privilege tokens to allow > > to build enclaves with ATTRIBUTE.PROVISIONKEY set. A new ioctl called > > SGX_IOC_ENCLAVE_SET_ATTRIBUTE is used to assign this token to an enclave. > > > > Cc: linux-security-module@vger.kernel.org > > Acked-by: Jethro Beekman > > Suggested-by: Andy Lutomirski > > Signed-off-by: Jarkko Sakkinen > > Reviewed-by: Darren Kenny Thanks, I added your tags to the corresponding commits. /Jarkko