Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-11 Thread Jarkko Sakkinen
On Tue, Oct 11, 2016 at 10:49:56PM +0530, Nayna wrote: > > > On 10/11/2016 10:23 PM, Jason Gunthorpe wrote: > >On Tue, Oct 11, 2016 at 02:23:15PM +0300, Jarkko Sakkinen wrote: > + chip->bios_dir[cnt] = > securityfs_create_file("ascii_bios_measurements", > -

Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-11 Thread Jarkko Sakkinen
On Tue, Oct 11, 2016 at 10:53:55AM -0600, Jason Gunthorpe wrote: > On Tue, Oct 11, 2016 at 02:23:15PM +0300, Jarkko Sakkinen wrote: > > > >+chip->bios_dir[cnt] = > > > > securityfs_create_file("ascii_bios_measurements", > > > >- S_IRUSR |

Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-11 Thread Nayna
On 10/11/2016 10:23 PM, Jason Gunthorpe wrote: > On Tue, Oct 11, 2016 at 02:23:15PM +0300, Jarkko Sakkinen wrote: + chip->bios_dir[cnt] = securityfs_create_file("ascii_bios_measurements", - S_IRUSR | S_IRGRP, tpm_dir, +

Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-11 Thread Jason Gunthorpe
On Tue, Oct 11, 2016 at 02:23:15PM +0300, Jarkko Sakkinen wrote: > > >+ chip->bios_dir[cnt] = > > > securityfs_create_file("ascii_bios_measurements", > > >- S_IRUSR | S_IRGRP, tpm_dir, > > >+ S_IRUSR | S_IRGRP, chip->bios_dir[0], > > >

Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-11 Thread Jarkko Sakkinen
On Tue, Oct 11, 2016 at 12:23:15AM +0530, Nayna wrote: > > > On 10/02/2016 12:55 AM, Jarkko Sakkinen wrote: > >This commit is based on a commit by Nayna Jain. Replaced dynamically > >allocated bios_dir with a static array as the size is always constant. > > > >Suggested-by: Jason Gunthorpe

Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-10 Thread Nayna
On 10/02/2016 12:55 AM, Jarkko Sakkinen wrote: > This commit is based on a commit by Nayna Jain. Replaced dynamically > allocated bios_dir with a static array as the size is always constant. > > Suggested-by: Jason Gunthorpe > Signed-off-by: Nayna Jain

Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-08 Thread Jarkko Sakkinen
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

Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-03 Thread Jarkko Sakkinen
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

Re: [tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-02 Thread Jason Gunthorpe
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? Jason

[tpmdd-devel] [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array

2016-10-01 Thread Jarkko Sakkinen
This commit is based on a commit by Nayna Jain. Replaced dynamically allocated bios_dir with a static array as the size is always constant. Suggested-by: Jason Gunthorpe Signed-off-by: Nayna Jain Signed-off-by: Jarkko Sakkinen