From patchwork Tue Oct 24 21:34:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10025497 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5137260245 for ; Tue, 24 Oct 2017 21:35:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45D8228A0B for ; Tue, 24 Oct 2017 21:35:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A6BD28A8F; Tue, 24 Oct 2017 21:35:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB8D128A0B for ; Tue, 24 Oct 2017 21:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbdJXVfD (ORCPT ); Tue, 24 Oct 2017 17:35:03 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:34277 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbdJXVfC (ORCPT ); Tue, 24 Oct 2017 17:35:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=obsidianresearch.com; s=rsa1; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=syOBonZB5uMga2/a3HeG1lHk86kvwslPvD8hizXtEaI=; b=tzbnh5+ealE99UoZXPRRVA4iD6hoonErrBh5fq8NbZv6YMlFjLzXx0Dv0bOOaR76Hix63tttDlq/dVBHReaeSq7t1qlD9Wkt0AgOWBOUHtBNNBEWHHqU3ynAT1svL1ly4zbPht+4xyGW+g9MQ05Vl/0oJRx17bqZy1qPl7noSyI=; Received: from jgg by quartz.orcorp.ca with local (Exim 4.84_2) (envelope-from ) id 1e76qX-0005jV-7y; Tue, 24 Oct 2017 15:34:49 -0600 Date: Tue, 24 Oct 2017 15:34:49 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: PrasannaKumar Muralidharan , Stefan Berger , linux-integrity@vger.kernel.org, David Howells , Herbert Xu , Dmitry Kasatkin , open list , linux-security-module@vger.kernel.org, "open list:KEYS-TRUSTED" , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , James Morris , Matt Mackall , David Safford , Mimi Zohar , "Serge E. Hallyn" Subject: Re: [PATCH] tpm: Move Linux RNG connection to hwrng Message-ID: <20171024213449.GA21662@obsidianresearch.com> References: <20171024184235.GC1806@obsidianresearch.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171024184235.GC1806@obsidianresearch.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Oct 24, 2017 at 12:42:35PM -0600, Jason Gunthorpe wrote: > This is compile tested only. 0day says the kconfig has a problem when randomized, here is the fix I will roll into a v2 in a few days: diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig index a95725fa77789e..ca89da3e4b2ae9 100644 --- a/drivers/char/tpm/Kconfig +++ b/drivers/char/tpm/Kconfig @@ -27,16 +27,13 @@ menuconfig TCG_TPM if TCG_TPM config HW_RANDOM_TPM - tristate "TPM HW Random Number Generator support" - depends on TCG_TPM && HW_RANDOM - default HW_RANDOM + bool "TPM HW Random Number Generator support" + depends on TCG_TPM && HW_RANDOM && !(TCG_TPM=y && HW_RANDOM=m) + default y ---help--- This driver provides kernel-side support for the Random Number Generator in the Trusted Platform Module - To compile this driver as a module, choose M here: the - module will be called tpm-rng. - If unsure, say Y. config TCG_TIS_CORE