Received: by 10.223.164.202 with SMTP id h10csp307235wrb; Thu, 30 Nov 2017 10:37:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMZdqiOBvI18rAkQttSWEmci38vA2EHaAdTG08+lc7qo/rxltagk2xeMxzDklrPyA6m2wFBc X-Received: by 10.98.51.6 with SMTP id z6mr7649145pfz.34.1512067070839; Thu, 30 Nov 2017 10:37:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512067070; cv=none; d=google.com; s=arc-20160816; b=w+AP16CPueu4LGry5i8f2/QgHeKrC1BaQA8DRwi1IgZ30lFxgZxVSvdX1ksKxVOkvG 8lf4WHlWO8rt0jqni8ucuG8p1jcTZLnS1499OWK1UsbfzzWkyKO2c7uxOHictcNC7I1k GpQn+hhuAxNQZTxxlQQbW7ZlkoVN+w1joXjP5IqRjTtszbr1qfCdHnWhAojdtSfMLO4Q KlBHzFVnTCnPvAkfqjuKfJWDullInEyAtsqNJQYdLO/QbrbVxm4O2tlnkMZ5mMD8HotW pscTBXhXsSqPVt27tzXT/ZOHhwtqo+2M/cAdRmEA707/eWRnIFpmJIyH29gJRs1fktTs kArA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=IM59ZraiOER3PNMmrFC+hzxZF0GoIko0psLFSpQMa34=; b=Dj8a8CQxHC6SXlt8/6p2lL+sP+Ywr0eoFvhDQU3BfawXW6ViTOZ4RLD/Gq+DTeQ0oo I2m78/94zTAO4XzF1Aop+flVrAB+pI8mIWR3Uc3e3riv7Zz1ZCc929jYqeRn2t+wnGPT zoaIdF3Nue/bZ3sFJud5BjXzvzTY5hmHh7Dd26LKKlKLYyhPGDlfkXKjEkyLy3/hFVcK BVlBtcFkf7kQSc+Owg3OM9xR1rA/uQG3N7QAOjVav2cbuS5YRKtgLmSN7tstUd0PLGW/ mssdrtF+IQ2ii7qVDSCylT8DnQB1mFxzT1ZpfyH8u3bdwCw/oh4xi+6EnxZ42lN+Y+WL 6lMQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si3438687pgf.534.2017.11.30.10.37.36; Thu, 30 Nov 2017 10:37:50 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750961AbdK3Sh1 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 30 Nov 2017 13:37:27 -0500 Received: from mga06.intel.com ([134.134.136.31]:53175 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750723AbdK3ShZ (ORCPT ); Thu, 30 Nov 2017 13:37:25 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2017 10:37:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,341,1508828400"; d="scan'208";a="9003467" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga001.fm.intel.com with ESMTP; 30 Nov 2017 10:37:24 -0800 Received: from orsmsx159.amr.corp.intel.com (10.22.240.24) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 30 Nov 2017 10:37:23 -0800 Received: from orsmsx109.amr.corp.intel.com ([169.254.11.62]) by ORSMSX159.amr.corp.intel.com ([169.254.11.33]) with mapi id 14.03.0319.002; Thu, 30 Nov 2017 10:37:23 -0800 From: "Shaikh, Azhar" To: Jarkko Sakkinen CC: "jgunthorpe@obsidianresearch.com" , "peterhuewe@gmx.de" , "linux-security-module@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "tpmdd-devel@lists.sourceforge.net" Subject: RE: [PATCH v6 0/2] Fix corner cases with disabling CLKRUN in tpm_tis Thread-Topic: [PATCH v6 0/2] Fix corner cases with disabling CLKRUN in tpm_tis Thread-Index: AQHTafk7Qf0xjWUknUGu5736T6G/VaMtQGHQ Date: Thu, 30 Nov 2017 18:37:23 +0000 Message-ID: <5FFFAD06ADE1CA4381B3F0F7C6AF582897061B@ORSMSX109.amr.corp.intel.com> References: <1511980791-125269-1-git-send-email-azhar.shaikh@intel.com> <20171130163516.uazhkglg7yfzpuvo@linux.intel.com> In-Reply-To: <20171130163516.uazhkglg7yfzpuvo@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjFlOTg4NzUtNDMxYy00NjBiLWIxOGItODBkOTVmZmJjM2ViIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJoRmIwRHI2bDFQTTBMUjdpQmoraFduOEFod1Z1dE9PREJPNHhmbGZWWmZnbTdZVWRUZGowVE1SZ0JsOGROOXJRIn0= dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >-----Original Message----- >From: Jarkko Sakkinen [mailto:jarkko.sakkinen@linux.intel.com] >Sent: Thursday, November 30, 2017 8:35 AM >To: Shaikh, Azhar >Cc: jgunthorpe@obsidianresearch.com; peterhuewe@gmx.de; linux-security- >module@vger.kernel.org; linux-kernel@vger.kernel.org; tpmdd- >devel@lists.sourceforge.net >Subject: Re: [PATCH v6 0/2] Fix corner cases with disabling CLKRUN in tpm_tis > >On Wed, Nov 29, 2017 at 10:39:49AM -0800, Azhar Shaikh wrote: >> Changes from v1: >> - Patch 1: "tpm: Keep CLKRUN enabled throughout the duration of >transmit_cmd()" >> - Add NULL checks before calling clk_toggle callback >> - Use IS_ENABLED instead of ifdef in tpm_tis_clkrun_toggle() >> - Do not call tpm_platform_begin_xfer() and tpm_platform_end_xfer() >> from tpm_tis_clkrun_toggle(). Make them static again. >> >> - Patch 2: "tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy" >> - This is a new patch in this series as per suggestion from Jason. >> - Is the current implementation ok or I should move the code in >tpm_tis_pnp_remove() >> and tpm_tis_plat_remove() inside tpm_tis_remove(). That way all the >unmapping >> can be done in one place, instead of 3 different places now. Also the >unmapping >> in tpm_tis_init() can be moved to tpm_tis_remove(), since in case of error >> tpm_tis_core_init() calls tpm_tis_remove(). Kindly suggest. >> >> Changes from v2: >> - Patch 1: "tpm: Keep CLKRUN enabled throughout the duration of >transmit_cmd()" >> - No changes >> >> - Patch 2: "tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy" >> - Updated is_bsw() function to have the #ifdef CONFIG_X86 check within >the function >> itself. Also removed the #ifdef CONFIG_X86 from all other places >> around is_bsw() >> >> Changes from v3: >> - Patch 1: "tpm: Keep CLKRUN enabled throughout the duration of >transmit_cmd()" >> - Change function name from clk_toggle to clk_enable >> - Update the commit message. >> >> - Patch 2: "tpm_tis: Move ilb_base_addr to tpm_tis_tcg_phy" >> - No changes >> >> Changes from v4: >> - The numbering of patches is now interchanged. >> >> - Patch 1: "tpm_tis: Move ilb_base_addr to tpm_tis_data" >> - Had to move ilb_base_addr to tpm_tis_data, from tpm_tis_tcg_phy. >> Since the ioremapping of ilb_base_addr had to be done before any TPM >access, >> hence moved the variable to tpm_tis_data. >> - Also move the ioremapping of ilb_base_addr from tpm_tis_init() to >> tpm_tis_core_init() i.e. before any TPM access is done. >> - Rename marco LPC_CNTRL_REG_OFFSET to LPC_CNTRL_OFFSET >> - Update the commit message. >> >> - Patch 2: "tpm: Keep CLKRUN enabled throughout the duration of >transmit_cmd()" >> - Remove the functions tpm_platform_begin_xfer() and >tpm_platform_end_xfer() >> - Move the code from these functions to tpm_tis_clkrun_enable(). >> >> Changes from v5: >> - Patch 1: "tpm_tis: Move ilb_base_addr to tpm_tis_data" >> - No changes >> >> - Patch 2: "tpm: Keep CLKRUN enabled throughout the duration of >transmit_cmd()" >> - Update the commit message. >> >> Azhar Shaikh (2): >> tpm_tis: Move ilb_base_addr to tpm_tis_data >> tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd() >> >> drivers/char/tpm/tpm-interface.c | 6 ++ >> drivers/char/tpm/tpm_tis.c | 121 ++++++--------------------------------- >> drivers/char/tpm/tpm_tis_core.c | 111 >> +++++++++++++++++++++++++++++++++-- >> drivers/char/tpm/tpm_tis_core.h | 17 ++++++ >> include/linux/tpm.h | 1 + >> 5 files changed, 147 insertions(+), 109 deletions(-) >> >> -- >> 1.9.1 > >I'll go through this next week and test with SPI based TPM that it doesn't break >anything. > Sure! Thank you! >/Jarkko Regards, Azhar Shaikh From 1585509562745634888@xxx Thu Nov 30 16:35:48 +0000 2017 X-GM-THRID: 1585426859785919312 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread