From: Mimi Zohar <zohar@linux.ibm.com>
To: Prakhar Srivastava <prsriva02@gmail.com>,
linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: roberto.sassu@huawei.com, vgoyal@redhat.com
Subject: Re: [PATCH V8 2/3] Define a new ima template field buf
Date: Thu, 13 Jun 2019 15:59:40 -0400 [thread overview]
Message-ID: <1560455980.4805.57.camel@linux.ibm.com> (raw)
In-Reply-To: <20190612221549.28399-3-prsriva02@gmail.com>
On Wed, 2019-06-12 at 15:15 -0700, Prakhar Srivastava wrote:
As before, the patch title needs to be prefixed with "ima: ".
> /* IMA template field data definition */
> 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".
> int result = -ENOMEM;
> int violation = 0;
> struct {
> diff --git a/security/integrity/ima/ima_template_lib.h b/security/integrity/ima/ima_template_lib.h
> index 6a3d8b831deb..f0178bc60c55 100644
> --- a/security/integrity/ima/ima_template_lib.h
> +++ b/security/integrity/ima/ima_template_lib.h
> @@ -29,6 +29,8 @@ void ima_show_template_string(struct seq_file *m, enum ima_show_type show,
> struct ima_field_data *field_data);
> void ima_show_template_sig(struct seq_file *m, enum ima_show_type show,
> struct ima_field_data *field_data);
> +void ima_show_template_buf(struct seq_file *m, enum ima_show_type show,
> + struct ima_field_data *field_data);
Formatting ...
> int ima_parse_buf(void *bufstartp, void *bufendp, void **bufcurp,
> int maxfields, struct ima_field_data *fields, int *curfields,
> unsigned long *len_mask, int enforce_mask, char *bufname);
> @@ -42,4 +44,6 @@ int ima_eventname_ng_init(struct ima_event_data *event_data,
> struct ima_field_data *field_data);
> int ima_eventsig_init(struct ima_event_data *event_data,
> struct ima_field_data *field_data);
> +int ima_eventbuf_init(struct ima_event_data *event_data,
> + struct ima_field_data *field_data);
Formatting ...
> #endif /* __LINUX_IMA_TEMPLATE_LIB_H */
next prev parent reply other threads:[~2019-06-13 20:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 22:15 [PATCH V8 0/3] Add support for measuring the boot command line during kexec_file_load Prakhar Srivastava
2019-06-12 22:15 ` [PATCH V8 1/3] Define a new IMA hook to measure the boot command line arguments Prakhar Srivastava
2019-06-13 19:10 ` James Morris
2019-06-13 19:22 ` Mimi Zohar
2019-06-14 17:48 ` prakhar srivastava
2019-06-12 22:15 ` [PATCH V8 2/3] Define a new ima template field buf Prakhar Srivastava
2019-06-13 19:15 ` James Morris
2019-06-13 19:59 ` Mimi Zohar [this message]
2019-06-14 10:57 ` Mimi Zohar
2019-06-14 14:14 ` Mimi Zohar
2019-06-14 17:52 ` prakhar srivastava
2019-06-12 22:15 ` [PATCH V8 3/3] Call ima_kexec_cmdline to measure the cmdline args Prakhar Srivastava
2019-06-12 22:31 ` Mimi Zohar
2019-06-13 8:26 ` Dave Young
2019-06-13 20:07 ` Mimi Zohar
2019-06-13 19:16 ` James Morris
2019-06-13 20:20 ` Mimi Zohar
2019-06-13 20:48 ` [PATCH V8 0/3] Add support for measuring the boot command line during kexec_file_load Mimi Zohar
2019-06-14 17:39 ` prakhar srivastava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1560455980.4805.57.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=prsriva02@gmail.com \
--cc=roberto.sassu@huawei.com \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).