Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4221853imm; Mon, 18 Jun 2018 11:08:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKPVCj49Tn6G00GRbPj1E90iXq6z96GX8oH5pe2+HlyC7jAbmYnP+G33Q/QdgB4Ql8BRuTq X-Received: by 2002:a17:902:650a:: with SMTP id b10-v6mr15366180plk.45.1529345293138; Mon, 18 Jun 2018 11:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529345293; cv=none; d=google.com; s=arc-20160816; b=VroyE/QmdSmcggeExbZtVRwCt2soqkJtgEJq+rUMEwXKfWq0HwPNh0ZlpQaIckY0Ua 8TcMF7ynNiQ9A/qGroy3mDz5cTEvsHt1RlvHsPI6CF2raPogr2WfjpGcTBTTUF1ROiXj TZ8BrQZAFOI/qRNZCyDUmqSKkUbmTjDUpUHETrwU0dFRnv+mGWpTVLuTu7DHQhBoJYNv m9giOszec0lNZpY/57RNbnnjuT4SkZi08I+YlILEwjlMNJGG7cSHRvai89deWSgA5XN4 /U2OMQlFeiuiKFbUjgvtwx5l1I1bqPdn1lDz+TCUrOaUykvKQNNH0sgi7/WJVM3KZSO+ fQtA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=C4MPBajEDcDkpBBS34L0BVPkWRoAbilOGYZE2Mm0Dkg=; b=eTqz+Iq3yKmRC9FaEbgHWcBLmKTJ7ufV35shc0fMewqAqEK3yDRhLMFREMYPNkXWdO dm3SurLpuIgyw+1tfVKi7jMTFMh55ROskTELdBVnMCVQsgXqrO20h4ahsCMujq33kq3a Ap6i4oIClzRyInNDL7Se3qUUIv9sZbnkpNv8nADE+7SY9QPabfnbYsboYOilBH91jAqS JHXgWaMzI6eH2oDv1dqowMfSBDscwU4noZo1Yce46K5XsuVHBZVfhDKvMrCJ8aG0HHKE VTdNqSv9St2jpnmZ2d/yUtGFMKJhYii33OfF/wR2E0LZpokfUy7ZXEJZF4FqXIykDWn7 r9hg== 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 l12-v6si12511149pgp.683.2018.06.18.11.07.58; Mon, 18 Jun 2018 11:08:13 -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 S964788AbeFRSHU (ORCPT + 99 others); Mon, 18 Jun 2018 14:07:20 -0400 Received: from mga05.intel.com ([192.55.52.43]:7641 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935531AbeFRSHS (ORCPT ); Mon, 18 Jun 2018 14:07:18 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2018 11:07:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,240,1526367600"; d="scan'208";a="238174363" Received: from mjozwowi-mobl.ger.corp.intel.com (HELO localhost) ([10.249.254.183]) by fmsmga005.fm.intel.com with ESMTP; 18 Jun 2018 11:07:14 -0700 Date: Mon, 18 Jun 2018 21:07:12 +0300 From: Jarkko Sakkinen To: Louis Collard Cc: linux-integrity@vger.kernel.org, Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, apronin@chromium.org Subject: Re: [PATCH] tpm: Add module parameter for hwrng quality. Message-ID: <20180618180712.GB20697@linux.intel.com> References: <20180608065438.110109-1-louiscollard@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180608065438.110109-1-louiscollard@chromium.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 08, 2018 at 02:54:38PM +0800, Louis Collard wrote: > It is now possible for drivers to easily specify a hwrng quality, however > most do not currently do this, and in cases where they do, it may be > desirable to override the driver-specified value with a user-specified > one. This patch adds a parameter to set or override the hwrng quality. > > Signed-off-by: Louis Collard > --- > drivers/char/tpm/tpm-chip.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c > index 0a62c19937b6..4def49cfc634 100644 > --- a/drivers/char/tpm/tpm-chip.c > +++ b/drivers/char/tpm/tpm-chip.c > @@ -33,6 +33,11 @@ > DEFINE_IDR(dev_nums_idr); > static DEFINE_MUTEX(idr_lock); > > +static short override_rng_quality = -1; > +module_param(override_rng_quality, short, 0644); Should this be 600 i.e. not to leak this information? /Jarkko