Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp179732ybp; Thu, 3 Oct 2019 11:57:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgb1ty9FtH+fOeCTmIbmClDWIMzIyWT/LtUESXGqYRu15Nty9ekBR9MItmICLD4XtGVAPP X-Received: by 2002:a17:907:11c8:: with SMTP id va8mr8968626ejb.111.1570129023087; Thu, 03 Oct 2019 11:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570129023; cv=none; d=google.com; s=arc-20160816; b=WoW+MFLYRmSHcJ9AlEW6th1+TebpnBcuWYn2Bs3BCePr0dhsSZC6uHZa5C5u/mCsJP fjzlZngBgWe2QijLtkV7x87XpcU1maYrVcvw9vJ7mmNiJWaWu/hWn07Pq2fbSxN9ftw9 f7CM2kKWYmdo7MZf2rifLjy5y9BB6OvFtcIUqT7n0ro+w94O/MJDUD3Y4iJSoU7rCK4C Nl9DckW1oFpsbvBfAmOowZF9DQpwWlxP9AOY4mQSz1cRmTCGP4LvwxSaT4r8D/dwA87g MDB0v/cg/4ksR36FqDWBj8t9zAVFG8UgIskIJDqh1GmIUMWlwThcg7srKqRT7x9EidqW BUbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=irrQ4zRT0Un+92B5rRz5IcoAi1G6DjtoFasBd9qeE78=; b=0okmu321Qkl0lphlhuah0K8FGqjUV7G8UdbR95K8pUVcxrlwdO8E3JegHIpijWEq1B hj7UKhRaEkHqSne4jtFNvuqlDVLlFW8i+y0oSFg8Pf8cXf1tSubbu6La2svf1cSwVJdp 0Zb+PbBy2Y7yKqjvHVrjlVPURbmdxEIqSORsKrfYYP86Jvl1TLSISTE/k/s1OPzWH0wE yZGBoEkhwsxdOT3RzFFTVfxH6BB5uz4KOy8DVE7a8CxxC3fzajgtU4bSWEPv8Sa7jSSn BhAQg1P38T8JErczbY09bHVcI/Xrr+zeCvhVSQPNQ0mEFduXYKvX/lKAghNOiinJqMTp C7bQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id v19si2145784edm.103.2019.10.03.11.56.38; Thu, 03 Oct 2019 11:57:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1732580AbfJCR7G (ORCPT + 99 others); Thu, 3 Oct 2019 13:59:06 -0400 Received: from mga07.intel.com ([134.134.136.100]:44326 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731174AbfJCR7G (ORCPT ); Thu, 3 Oct 2019 13:59:06 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2019 10:59:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,253,1566889200"; d="scan'208";a="343737720" Received: from okiselev-mobl1.ccr.corp.intel.com (HELO localhost) ([10.251.93.117]) by orsmga004.jf.intel.com with ESMTP; 03 Oct 2019 10:59:00 -0700 Date: Thu, 3 Oct 2019 20:58:54 +0300 From: Jarkko Sakkinen To: Mimi Zohar Cc: linux-integrity@vger.kernel.org, stable@vger.kernel.org, David Howells , Herbert Xu , "David S. Miller" , "open list:ASYMMETRIC KEYS" , "open list:CRYPTO API" , open list Subject: Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes() Message-ID: <20191003175854.GB19679@linux.intel.com> References: <20190926171601.30404-1-jarkko.sakkinen@linux.intel.com> <1570024819.4999.119.camel@linux.ibm.com> <20191003114119.GF8933@linux.intel.com> <1570107752.4421.183.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1570107752.4421.183.camel@linux.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 03, 2019 at 09:02:32AM -0400, Mimi Zohar wrote: > On Thu, 2019-10-03 at 14:41 +0300, Jarkko Sakkinen wrote: > > On Wed, Oct 02, 2019 at 10:00:19AM -0400, Mimi Zohar wrote: > > > On Thu, 2019-09-26 at 20:16 +0300, Jarkko Sakkinen wrote: > > > > Only the kernel random pool should be used for generating random numbers. > > > > TPM contributes to that pool among the other sources of entropy. In here it > > > > is not, agreed, absolutely critical because TPM is what is trusted anyway > > > > but in order to remove tpm_get_random() we need to first remove all the > > > > call sites. > > > > > > At what point during boot is the kernel random pool available? ?Does > > > this imply that you're planning on changing trusted keys as well? > > > > Well trusted keys *must* be changed to use it. It is not a choice > > because using a proprietary random number generator instead of defacto > > one in the kernel can be categorized as a *regression*. > > I really don't see how using the TPM random number for TPM trusted > keys would be considered a regression. ?That by definition is a > trusted key. ?If anything, changing what is currently being done would > be the regression.? It is really not a TPM trusted key. It trusted key that gets sealed with the TPM. The key itself is used in clear by kernel. The random number generator exists in the kernel to for a reason. It is without doubt a regression. /Jarkko