Re: [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array
From: Jarkko Sakkinen
Date: Sat Oct 08 2016 - 07:01:40 EST
On Mon, Oct 03, 2016 at 03:21:35PM +0300, Jarkko Sakkinen wrote:
> On Sun, Oct 02, 2016 at 03:28:01PM -0600, Jason Gunthorpe wrote:
> > On Sat, Oct 01, 2016 at 10:25:25PM +0300, Jarkko Sakkinen wrote:
> >
> > > + for (i = (TPM_NUM_EVENT_LOG_FILES - 1); i >= 0; i--) {
> > > + if (chip->bios_dir[i])
> >
> > The entries can't actually be null here, right?
>
> They can because this function is called as a rollbcak procedure for
> tpm_bios_log_setup.
I've tested these with Dell E6400 laptop and IvyBridge NUC both with TPM
1.2 chip by repeating this a few iterations:
1. modprobe tpm_tis
2. Outputted sysfs attributes
3. Outputted measurement files.
4. rmmod tpm_tis
I think these three commits could be applied at any point and would help
with the event log series (shrunk it a bit).
/Jarkko