Re: [PATCH v6 5/9] tpm: have event log use the tpm_chip

From: Jarkko Sakkinen
Date: Mon Nov 14 2016 - 19:12:45 EST


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 <jgunthorpe@xxxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Nayna Jain <nayna@xxxxxxxxxxxxxxxxxx>
>
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>

Tested-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>

/Jarkko