From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DC6AC32753 for ; Fri, 2 Aug 2019 14:27:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1BF0E20679 for ; Fri, 2 Aug 2019 14:27:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436672AbfHBO1k (ORCPT ); Fri, 2 Aug 2019 10:27:40 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:55132 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394891AbfHBO1h (ORCPT ); Fri, 2 Aug 2019 10:27:37 -0400 Received: from 162-237-133-238.lightspeed.rcsntx.sbcglobal.net ([162.237.133.238] helo=elm) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1htYWl-0002GM-Bi; Fri, 02 Aug 2019 14:27:27 +0000 Date: Fri, 2 Aug 2019 09:27:22 -0500 From: Tyler Hicks To: Roberto Sassu , Jarkko Sakkinen Cc: jejb@linux.ibm.com, zohar@linux.ibm.com, jgg@ziepe.ca, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, crazyt2019+lml@gmail.com, nayna@linux.vnet.ibm.com, silviu.vlasceanu@huawei.com Subject: Re: [PATCH] KEYS: trusted: allow module init if TPM is inactive or deactivated Message-ID: <20190802142721.GA26616@elm> References: <20190705163735.11539-1-roberto.sassu@huawei.com> <20190711194811.rfsohbfc3a7carpa@linux.intel.com> <20190801163215.mfkagoafkxscesne@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 2019-08-02 10:21:16, Roberto Sassu wrote: > On 8/1/2019 6:32 PM, Jarkko Sakkinen wrote: > > On Mon, Jul 15, 2019 at 06:44:28PM +0200, Roberto Sassu wrote: > > > According to the bug report at https://bugs.archlinux.org/task/62678, > > > the trusted module is a dependency of the ecryptfs module. We should > > > load the trusted module even if the TPM is inactive or deactivated. > > > > > > Given that commit 782779b60faa ("tpm: Actually fail on TPM errors during > > > "get random"") changes the return code of tpm_get_random(), the patch > > > should be modified to ignore the -EIO error. I will send a new version. > > > > Do you have information where this dependency comes from? > > ecryptfs retrieves the encryption key from encrypted keys (see > ecryptfs_get_encrypted_key()). That has been there for many years with any problems. It was added in 2011: commit 1252cc3b232e582e887623dc5f70979418caaaa2 Author: Roberto Sassu Date: Mon Jun 27 13:45:45 2011 +0200 eCryptfs: added support for the encrypted key type What's recently changed the situation is this patch: commit 240730437deb213a58915830884e1a99045624dc Author: Roberto Sassu Date: Wed Feb 6 17:24:51 2019 +0100 KEYS: trusted: explicitly use tpm_chip structure from tpm_default_chip() Now eCryptfs has a hard dependency on a TPM chip that's working as expected even if eCryptfs (or the rest of the system) isn't utilizing the TPM. If the TPM behaves unexpectedly, you can't access your files. We need to get this straightened out soon. Tyler > > Roberto > > -- > HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 > Managing Director: Li Peng, Li Jian, Shi Yanli