From patchwork Fri Jun 29 15:10:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Sakkinen X-Patchwork-Id: 10496863 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 A71A260325 for ; Fri, 29 Jun 2018 15:10:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C49229B26 for ; Fri, 29 Jun 2018 15:10:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A13E29BB3; Fri, 29 Jun 2018 15:10:31 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 2076629B26 for ; Fri, 29 Jun 2018 15:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935845AbeF2PK3 (ORCPT ); Fri, 29 Jun 2018 11:10:29 -0400 Received: from mga04.intel.com ([192.55.52.120]:50596 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935602AbeF2PKX (ORCPT ); Fri, 29 Jun 2018 11:10:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2018 08:10:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,285,1526367600"; d="scan'208";a="52885362" Received: from tmuluk-mobl4.ger.corp.intel.com (HELO localhost) ([10.249.254.88]) by orsmga007.jf.intel.com with ESMTP; 29 Jun 2018 08:10:11 -0700 From: Jarkko Sakkinen To: linux-integrity@vger.kernel.org Cc: linux-security-module@vger.kernel.org, Jarkko Sakkinen , Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , "Winkler, Tomas" , Azhar Shaikh , Stefan Berger , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] tpm: require to compile as part of the kernel Date: Fri, 29 Jun 2018 18:10:02 +0300 Message-Id: <20180629151005.10899-1-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.17.1 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Do not allow to compile TPM core as a module. TPM defines a root of trust for integrity and keyring subsystems and should be always available and not be loaded from the user space. There is no a reasonable use case for a loadable module existing. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/Kconfig | 2 +- include/linux/tpm.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig index 18c81cbe4704..9728771aecbd 100644 --- a/drivers/char/tpm/Kconfig +++ b/drivers/char/tpm/Kconfig @@ -3,7 +3,7 @@ # menuconfig TCG_TPM - tristate "TPM Hardware Support" + bool "TPM Hardware Support" depends on HAS_IOMEM select SECURITYFS select CRYPTO diff --git a/include/linux/tpm.h b/include/linux/tpm.h index 4609b94142d4..cefa61b12891 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h @@ -50,8 +50,7 @@ struct tpm_class_ops { void (*clk_enable)(struct tpm_chip *chip, bool value); }; -#if defined(CONFIG_TCG_TPM) || defined(CONFIG_TCG_TPM_MODULE) - +#if defined(CONFIG_TCG_TPM) extern int tpm_is_tpm2(struct tpm_chip *chip); extern int tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf); extern int tpm_pcr_extend(struct tpm_chip *chip, int pcr_idx, const u8 *hash);