Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp1158561ybh; Sat, 3 Aug 2019 19:24:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwedXzGWrdpSD8LikX1w1QFgTPZAyZv7Rs2fXpJ9ktBeCJIm/rF/kS1H2t+qyQKuMvWwseq X-Received: by 2002:aa7:8619:: with SMTP id p25mr45981667pfn.220.1564885483174; Sat, 03 Aug 2019 19:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564885483; cv=none; d=google.com; s=arc-20160816; b=fFZaxQOodwge89ypCamQtvpuTmWRr03WJdkr3Jx28xDmkWhiApgWhB1Qu58knTpT03 2wtlzZHPQny9/RwJAGQz3GbIYdtOHaElZcFuSPZxsKzX/mP565k5r7gkIAFe/kw9Gnyx TFajErCiXbqyBtJSQM/+uZKpcuvp15r6ZIN6lZzII2AwMLDceJkX4q3A7gXvbmyWUiob qkteLIx25T/IIvND4J2MiZrRj2syCIwe0Li+AgDKmVYAgUaTlMQSVUhGL1Tn3V14mpsZ j72J8HLEWbC+VtE2X+UkpKa3wJGuDBEwuJHMmuUk6KcFn8qRR/VLdtbGHQnM7foUb2E2 egRw== 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; bh=BnO1LqlCCF+O53cZjb7n7XBsge87rNY+N/j/KVVcK8o=; b=PYrLG3nH8M57qQU/cbNM6s0m1318b26OtivtkBTNM4S3K8OpHQeTi6gHd4FQvcx0N4 ESn3RqeteVJdh/XSNU0iO7TTrj2gd6mtD4snzz9bGzyM8bDkE4scHuMnL1nE+tVLB0GJ cz5cPAMOAi5bvI4IN/VdN3YmRpDS9sg3sTn5yfe3paEyUZX41wYF6ufURP3gDJ/0eUd3 gus9XdRvQhnHe9LOGK2JbKaXep7XA3l9EhPmfKWRJ873G+5ZvDsy8Yn6X3qSioRJT4W2 4wbQTu7epbT/nfcg9hQdNLoN+tGJLKXwFbhok3JlTSoq+sSUahwoUwY4DR+4MkE6ts6k 0Ixg== 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 r4si43394512pgb.245.2019.08.03.19.24.28; Sat, 03 Aug 2019 19:24:43 -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 S2406334AbfHBTmc (ORCPT + 99 others); Fri, 2 Aug 2019 15:42:32 -0400 Received: from mga04.intel.com ([192.55.52.120]:1619 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405999AbfHBTmc (ORCPT ); Fri, 2 Aug 2019 15:42:32 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2019 12:42:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,339,1559545200"; d="scan'208";a="201767232" Received: from psathya-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.36.242]) by fmsmga002.fm.intel.com with ESMTP; 02 Aug 2019 12:42:27 -0700 Date: Fri, 2 Aug 2019 22:42:26 +0300 From: Jarkko Sakkinen To: Tyler Hicks Cc: Roberto Sassu , 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: <20190802194226.oiztvme5klkmw6fh@linux.intel.com> References: <20190705163735.11539-1-roberto.sassu@huawei.com> <20190711194811.rfsohbfc3a7carpa@linux.intel.com> <20190801163215.mfkagoafkxscesne@linux.intel.com> <20190802142721.GA26616@elm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190802142721.GA26616@elm> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 02, 2019 at 09:27:22AM -0500, Tyler Hicks wrote: > 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. I agree with this conclusion that eCryptfs needs to be fixed, not another workaround to trusted.ko. /Jarkko