Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755309AbcKOAMn (ORCPT ); Mon, 14 Nov 2016 19:12:43 -0500 Received: from mga07.intel.com ([134.134.136.100]:1352 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755212AbcKOAMl (ORCPT ); Mon, 14 Nov 2016 19:12:41 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,640,1473145200"; d="scan'208";a="31263957" Date: Mon, 14 Nov 2016 16:12:36 -0800 From: Jarkko Sakkinen To: Nayna Jain Cc: tpmdd-devel@lists.sourceforge.net, peterhuewe@gmx.de, tpmdd@selhorst.net, jgunthorpe@obsidianresearch.com, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v6 5/9] tpm: have event log use the tpm_chip Message-ID: <20161115001236.6qsfrr6snodjyyhn@intel.com> References: <1479117656-12403-1-git-send-email-nayna@linux.vnet.ibm.com> <1479117656-12403-6-git-send-email-nayna@linux.vnet.ibm.com> <20161114234401.dkffb5gcvols4sgb@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161114234401.dkffb5gcvols4sgb@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 21 On Mon, Nov 14, 2016 at 03:44:01PM -0800, Jarkko Sakkinen wrote: > On Mon, Nov 14, 2016 at 05:00:52AM -0500, Nayna Jain wrote: > > Move the backing memory for the event log into tpm_chip and push > > the tpm_chip into read_log. This optimizes read_log processing by > > only doing it once and prepares things for the next patches in the > > series which require the tpm_chip to locate the event log via > > ACPI and OF handles instead of searching. > > > > This is straightfoward except for the issue of passing a kref through > > i_private with securityfs. Since securityfs_remove does not have any > > removal fencing like sysfs we use the inode lock to safely get a > > kref on the tpm_chip. > > > > Suggested-by: Jason Gunthorpe > > Signed-off-by: Nayna Jain > > Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen /Jarkko