From: Jarkko Sakkinen Subject: Re: [PATCH v6 5/9] tpm: have event log use the tpm_chip Date: Mon, 14 Nov 2016 16:12:36 -0800 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-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20161114234401.dkffb5gcvols4sgb-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Nayna Jain Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net 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 ------------------------------------------------------------------------------