Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1227948ybp; Fri, 4 Oct 2019 11:21:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVPir2bnFUyPZG5/dk09cxsHncZeEucNk/t7waw8fIIUoyXxIv4reT3BiGGv1G5HKg+EwB X-Received: by 2002:a17:906:eb86:: with SMTP id mh6mr13629832ejb.171.1570213287026; Fri, 04 Oct 2019 11:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570213287; cv=none; d=google.com; s=arc-20160816; b=kncwb7c3CBvS2Ec9xV/i4fdIEzjE/YAgZHI4cYlmZ1UeRsVk9TXIhjIp83TiEL1Ahe QEFsg7O3SJIJ5dZTNHiC0IGjXD6j9O3ntOTZtsM0AbVVVeyMSCE4PBABYGlFICuYVnML +logWOdQhNx18RJsPxGUBWy57SiJeyouPvRbGPDmp/DfD6MZ2p5QjiD827OtBZUwtKQh XM1xGngt3VDmgQ+/Qvb/Obe9Kw9rJc5YFacanW9qw74/DpHzhPoHIIxWXdy1LKBPkiQi J7tfWuOUQomx26rsIFZQL7T/brdxCoSv0qAOCogytMuasIWdB1eXEU345aSmDcP9MgSz xoJg== 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=A44Cg84R0vxmqSCRps9Hxf3I7fH4Dxi4hMW1cxgvmDw=; b=RfEUVNiZ4Qq1V3yEoggnyuQDSCZDyFO7CI6/PKJtUSS+mMJ+AVdz5Fo5k7e0OiP1h5 heUQ0YbwyvMpLDFxn7ISWC+aoqNFgpMBJztkAzU42gypfhcqFvvnKYST88iEvG2YRvoC NEAShtLKWIFzODwQgx083ND+taxQc9rPQGvZe3I8joENH0Pk3wFepLm4lItz35mT1p/L 7ZSWnhehqFzwtFVbPIexBSv8OhkfnotJVbpTMSWiU7ackZ2AWsTAgEflerFwJrOoC+ZS PxtNqP2Xp5x6jJbrot66jJGp1uslu/wC+AJyZBoT7m0GPxW8nPW731s4OO4oK4rlDJ3c kJAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 b13si4047532edy.320.2019.10.04.11.20.56; Fri, 04 Oct 2019 11:21:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 S1725907AbfJDSUQ (ORCPT + 99 others); Fri, 4 Oct 2019 14:20:16 -0400 Received: from mga07.intel.com ([134.134.136.100]:15752 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbfJDSUP (ORCPT ); Fri, 4 Oct 2019 14:20:15 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Oct 2019 11:20:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,257,1566889200"; d="scan'208";a="205910170" Received: from nzaki1-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.4.57]) by fmsmga001.fm.intel.com with ESMTP; 04 Oct 2019 11:20:08 -0700 Date: Fri, 4 Oct 2019 21:20:07 +0300 From: Jarkko Sakkinen To: Mimi Zohar Cc: David Safford , 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: <20191004182007.GA6945@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> <20191003175854.GB19679@linux.intel.com> <1570128827.5046.19.camel@linux.ibm.com> <20191003215125.GA30511@linux.intel.com> <20191003215743.GB30511@linux.intel.com> <1570140491.5046.33.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: <1570140491.5046.33.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-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Oct 03, 2019 at 06:08:11PM -0400, Mimi Zohar wrote: > > At the time when trusted keys was introduced I'd say that it was a wrong > > design decision and badly implemented code. But you are right in that as > > far that code is considered it would unfair to speak of a regression. > > > > asym-tpm.c on the other hand this is fresh new code. There has been > > *countless* of discussions over the years that random numbers should > > come from multiple sources of entropy. There is no other categorization > > than a bug for the tpm_get_random() there. > > This week's LWN article on "5.4 Merge window, part 2" discusses "boot- > time entropy". ?This article couldn't have been more perfectly timed. Do not see any obvious relation to this dicussion. Are you saying that you should not use the defacto kernel API's but instead bake your own hacks because even defacto stuff bumps into issues from time to time? And BTW, at the time you call tpm_get_random(), TPM driver is already contributing to the entropy pool (registered as hwrng). /Jarkko