[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1560509860.4171.13.camel@linux.ibm.com>
Date: Fri, 14 Jun 2019 06:57:40 -0400
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Prakhar Srivastava <prsriva02@...il.com>,
linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: roberto.sassu@...wei.com, vgoyal@...hat.com
Subject: Re: [PATCH V8 2/3] Define a new ima template field buf
Hi Prakhar,
> > diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
> > index ea7d8cbf712f..83ca99d65e4b 100644
> > --- a/security/integrity/ima/ima_api.c
> > +++ b/security/integrity/ima/ima_api.c
> > @@ -140,7 +140,7 @@ void ima_add_violation(struct file *file, const unsigned char *filename,
> > struct ima_template_entry *entry;
> > struct inode *inode = file_inode(file);
> > struct ima_event_data event_data = {iint, file, filename, NULL, 0,
> > - cause};
> > + cause, NULL, 0};
>
> This change here and
>
> > int violation = 1;
> > int result;
> >
> > @@ -296,7 +296,7 @@ void ima_store_measurement(struct integrity_iint_cache *iint,
> > struct inode *inode = file_inode(file);
> > struct ima_template_entry *entry;
> > struct ima_event_data event_data = {iint, file, filename, xattr_value,
> > - xattr_len, NULL};
> > + xattr_len, NULL, NULL, 0};
>
> here and
>
> > int violation = 0;
> >
> > if (iint->measured_pcrs & (0x1 << pcr))
> > diff --git a/security/integrity/ima/ima_init.c b/security/integrity/ima/ima_init.c
> > index 993d0f1915ff..c8591406c0e2 100644
> > --- a/security/integrity/ima/ima_init.c
> > +++ b/security/integrity/ima/ima_init.c
> > @@ -50,7 +50,7 @@ static int __init ima_add_boot_aggregate(void)
> > struct ima_template_entry *entry;
> > struct integrity_iint_cache tmp_iint, *iint = &tmp_iint;
> > struct ima_event_data event_data = {iint, NULL, boot_aggregate_name,
> > - NULL, 0, NULL};
> > + NULL, 0, NULL, NULL, 0};
>
> here, don't belong in this patch. It belongs in "IMA: support for per
> policy rule template formats", in case it should ever be backported.
> Please post this as a separate patch, that will be squashed with
> "IMA: support for per policy rule template formats".
Might mistake. I should have picked up Thaigo's "ima: Use designated
initializers for struct ima_event_data". Please drop these changes
instead.
thanks,
Mimi
>
> > int result = -ENOMEM;
> > int violation = 0;
> > struct {
>
Powered by blists - more mailing lists