Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp580859pxu; Fri, 23 Oct 2020 08:19:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbgUlHzSoT3K9A784ev1N3YMz4xOSZc8OzOwMDmqzU+8cpK61YDxhxDhmWFKDPtVPeB3tz X-Received: by 2002:a05:6402:3133:: with SMTP id dd19mr2759908edb.100.1603466355114; Fri, 23 Oct 2020 08:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603466355; cv=none; d=google.com; s=arc-20160816; b=nTt2LsdJkpljl/0C7FfZfmKpuslYCLw2DSdQZBRmN47dnRqW/dHpGCs0Vc/w0CZyqR vEtQprAycOdjhWYCwrcww2Ij/I50E8JfKLUGemHf5xSvSCZ1pZYWkCofwMJLNbu7Aqme 5DWwCe81HwsSbEADdBkPrfMpCHvCLjmnuu01Z42i0M/iw0Blx5C3BHM0TnpGMNQS6HBE Wek+ZSPyQRt1pr0pa4Pgu8gtRtlA9xFsl5Rw5nwj9Zjxis7/lVyLKofmRPbAWgntVAAd bOESQDYPaW1iS9Eq4yeFW0IGXSAPXELtj2WubgCqyE8YYNeZysuSJiEtL0hU68oXyiM6 Tlhw== 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=lL/IOmlN8Ih3YWQ4GfRf+zEIw3qsZN2c3JkXWcJwDtk=; b=ohFXa814oXjRkzWsvu964xuXh4oMj9WCv+JEgd+H4ExjScDNOIEr3DmHt1midqzWms iACqbSZdExxSPMdKoxjYEhoPYIzPwpeaftbFJlSFyAUznxI+cuyFW9AAb8z02Xr9rGFW BDAYHGh4hUX1qHoWeQPOP2Uo1OCfQp3Ok5vARHjeF4nGq0wwDOWwQhzrr0GY2rvu7uH0 BtqqOSk/2apkwp/BptZfo2b0ooz2mZAPwNrItunjAB9r/OCzdo0IYunpllQ2dURNjKim +5YARZYrlt6ulxZ0tf0msKSM2BUwKsfS/00E58UC2pz/wq9tGacjeOS3aiEjinh+1uo5 BIPw== 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 m26si1010987edf.113.2020.10.23.08.18.52; Fri, 23 Oct 2020 08:19:15 -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 S462016AbgJWKRu (ORCPT + 99 others); Fri, 23 Oct 2020 06:17:50 -0400 Received: from mga01.intel.com ([192.55.52.88]:25468 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S461988AbgJWKRu (ORCPT ); Fri, 23 Oct 2020 06:17:50 -0400 IronPort-SDR: A8IA4UzmUDifyKHjT85CA9A59uVoaWk+N+/+FxmIknTZTDFN1QNAijcF0Dqdv+7IP64eEHPYX0 4GE5UbZXcbBQ== X-IronPort-AV: E=McAfee;i="6000,8403,9782"; a="185352567" X-IronPort-AV: E=Sophos;i="5.77,407,1596524400"; d="scan'208";a="185352567" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2020 03:17:47 -0700 IronPort-SDR: 8R2W1v3NGVDW9ZLWYANyBw7bz22goQZILHJf34zh6h07eJo3OMc2zb6OFpHq7BgJQerIu0fPAg BfizRXJhv4OA== X-IronPort-AV: E=Sophos;i="5.77,407,1596524400"; d="scan'208";a="302629463" Received: from spiccard-mobl1.ger.corp.intel.com (HELO localhost) ([10.249.41.38]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2020 03:17:35 -0700 Date: Fri, 23 Oct 2020 13:17:36 +0300 From: Jarkko Sakkinen To: Dave Hansen Cc: x86@kernel.org, linux-sgx@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Jethro Beekman , Darren Kenny , 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, haitao.huang@intel.com, 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, mikko.ylinen@intel.com Subject: Re: [PATCH v39 15/24] x86/sgx: Add SGX_IOC_ENCLAVE_PROVISION Message-ID: <20201023101736.GG168477@linux.intel.com> References: <20201003045059.665934-1-jarkko.sakkinen@linux.intel.com> <20201003045059.665934-16-jarkko.sakkinen@linux.intel.com> <7bb4ff7b-0778-ad70-1fe0-6e1db284d45a@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7bb4ff7b-0778-ad70-1fe0-6e1db284d45a@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 20, 2020 at 02:19:26PM -0700, Dave Hansen wrote: > On 10/2/20 9:50 PM, Jarkko Sakkinen wrote: > > + * Failure to explicitly request access to a restricted attribute will cause > > + * sgx_ioc_enclave_init() to fail. Currently, the only restricted attribute > > + * is access to the PROVISION_KEY. > > Could we also justify why access is restricted, please? Maybe: > > Access is restricted because PROVISION_KEY is burned uniquely > into each each processor, making it a perfect unique identifier > with privacy and fingerprinting implications. > > Are there any other reasons for doing it this way? AFAIK, if I interperet the SDM correctl, PROVISION_KEY and PROVISION_SEALING_KEY also have random salt added, i.e. they change every boot cycle. There is "RAND = yes" on those keys in Table 40-64 of Intel SDM volume 3D :-) /Jarkko