Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp78114imu; Thu, 8 Nov 2018 15:09:43 -0800 (PST) X-Google-Smtp-Source: AJdET5dgK0DvaBZ0pkyiV+suLqZvK7YCQRoS/9j6g/0kc+sTG2WGM/jCkMvhfzuwyTWU8kYhoggi X-Received: by 2002:a17:902:da8:: with SMTP id 37-v6mr6615408plv.12.1541718583428; Thu, 08 Nov 2018 15:09:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541718583; cv=none; d=google.com; s=arc-20160816; b=L/yv41lCetWkVT+pe+rgWCrF6gk9x5FqkRAa7Xrq9gYx5L/bdJut1dVo0Krc8knsYM 5cFSl58oxXmtXw+9/pRZ5veCzWtgYko6fEz0Iqze46yX0Q/PG+EtG/Lr01fOndYiPZRt oO3fJP0jZ+LPpaIzG4QhDcwjX8ybSudafENBNWCfCRuCkzufko6J+NkSEnYkvdwyLHve 12Ye2n+oO3KJ3AQY8xpYFZmuvdNzf64otndI846DYaBXymHglpDMblHpdk4/YvAGPUIy LOjQSP0gf4FlzdhR08u4Wq62XOQYIfoI03ra3NI8GnblGJNp/YNCv4wUanLwsYjiupVS aaoA== 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=RzJXZt7xBH5FejCIILXjNfKWCK9yvXO+hC7aBfrtMpo=; b=g/NGyd6Lu4Yr6Ldla0dZEAvyps1GyItW+HNaR3sov7PCwpZby3gJBI1JDVRartoJ7h SMT6pCCzHPnl0fISmMEls82bXb2BSqoH1OTb5SY4Ls/YOxiWTUGwzeQ63WxqdXr6Vcd1 Lu+1Mj5s2K1/EsKd3kFs11BQin0O3OoQJb0HXF0jbD7aVp0hbSHWHewxnHYWrtMUu9Wy LFd114XhkcoAJBGimMwAfjsBxLinG7SN20b0tN++5ltYGCFfufgTp8SC0UL8udFIxCR/ /tsVpOQxRVsjzy2OH7ez5JIWqKyAZlZ0G7CtVDh/PktRp12cox1GglGWNHgSNeWEhLYS VBVg== 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 x64-v6si6085309pfd.219.2018.11.08.15.09.27; Thu, 08 Nov 2018 15:09:43 -0800 (PST) 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 S1727667AbeKIIo6 (ORCPT + 99 others); Fri, 9 Nov 2018 03:44:58 -0500 Received: from mga07.intel.com ([134.134.136.100]:25010 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725922AbeKIIo5 (ORCPT ); Fri, 9 Nov 2018 03:44:57 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2018 15:07:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,481,1534834800"; d="scan'208";a="94778598" Received: from carstenv-mobl.ger.corp.intel.com (HELO localhost) ([10.249.254.134]) by FMSMGA003.fm.intel.com with ESMTP; 08 Nov 2018 15:07:01 -0800 Date: Fri, 9 Nov 2018 01:07:00 +0200 From: Jarkko Sakkinen To: "Winkler, Tomas" Cc: "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , James Bottomley , "Struk, Tadeusz" , Stefan Berger , Nayna Jain , Peter Huewe , Jason Gunthorpe , Arnd Bergmann , Greg Kroah-Hartman , open list Subject: Re: [PATCH v5 16/17] tpm: take TPM chip power gating out of tpm_transmit() Message-ID: <20181108230700.GA8038@linux.intel.com> References: <20181108141541.12832-1-jarkko.sakkinen@linux.intel.com> <20181108141541.12832-17-jarkko.sakkinen@linux.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B9DA18602@hasmsx108.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B9DA18602@hasmsx108.ger.corp.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 Thu, Nov 08, 2018 at 06:38:59PM +0000, Winkler, Tomas wrote: > > Call tpm_chip_start() and tpm_chip_stop() in > > > > * tpm_try_get_ops() and tpm_put_ops() > > * tpm_chip_register() > > * tpm2_del_space() > > > > And remove these calls from tpm_transmit(). The core reason for this change > > is that in tpm_vtpm_proxy a locality change requires a virtual TPM command > > (a command made up just for that driver). > > > I don't think you can do that, locality has to be request for each > command, as for example tboot can request higher locality any time. That could be a potential problem. How tboot intervention gets prevented without this patch? > Same for cmd_ready()/go_idle() powergatin, you will prevent the whole > platform entering power save state. Why would you want that in a middle of using the TPM anyway? > Thanks > Tomas /Jarkko