All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Roberto Sassu <roberto.sassu@huawei.com>,
	Matthew Garrett <matthewgarrett@google.com>,
	linux-integrity@vger.kernel.org
Cc: zohar@linux.vnet.ibm.com, prsriva02@gmail.com,
	bauerman@linux.ibm.com, Matthew Garrett <mjg59@google.com>
Subject: Re: [PATCH V3] IMA: Allow profiles to define the desired IMA template
Date: Tue, 04 Jun 2019 10:47:48 -0400	[thread overview]
Message-ID: <1559659668.4076.10.camel@linux.ibm.com> (raw)
In-Reply-To: <3b452fea-f8e6-ebd3-824d-f7b8c5ceae58@huawei.com>

On Tue, 2019-06-04 at 16:40 +0200, Roberto Sassu wrote:
> On 6/4/2019 4:32 PM, Mimi Zohar wrote:
> > On Tue, 2019-06-04 at 16:03 +0200, Roberto Sassu wrote:
> >> On 6/4/2019 3:51 AM, Mimi Zohar wrote:
> >>> On Mon, 2019-06-03 at 13:13 -0700, Matthew Garrett wrote:
> >>>> Admins may wish to log different measurements using different IMA
> >>>> templates. Add support for overriding the default template on a per-rule
> >>>> basis.
> >>>>
> >>>> Signed-off-by: Matthew Garrett <mjg59@google.com>
> >>>> ---
> >>>>
> >>>> Updated based on review feedback, verified that I can generate an event
> >>>> log that contains multiple different templates.
> >>>>
> >>>>    Documentation/ABI/testing/ima_policy  |  6 ++++--
> >>>>    security/integrity/ima/ima.h          | 13 +++++++++----
> >>>>    security/integrity/ima/ima_api.c      | 24 ++++++++++++++++-------
> >>>>    security/integrity/ima/ima_appraise.c |  2 +-
> >>>>    security/integrity/ima/ima_init.c     |  2 +-
> >>>>    security/integrity/ima/ima_main.c     |  9 +++++----
> >>>>    security/integrity/ima/ima_policy.c   | 28 +++++++++++++++++++++++++--
> >>>>    security/integrity/ima/ima_template.c | 10 ++++++++--
> >>>>    8 files changed, 71 insertions(+), 23 deletions(-)
> >>>>
> >>>> diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy
> >>>> index 74c6702de74e..4ded0668a22d 100644
> >>>> --- a/Documentation/ABI/testing/ima_policy
> >>>> +++ b/Documentation/ABI/testing/ima_policy
> >>>> @@ -24,8 +24,7 @@ Description:
> >>>>    				[euid=] [fowner=] [fsname=]]
> >>>>    			lsm:	[[subj_user=] [subj_role=] [subj_type=]
> >>>>    				 [obj_user=] [obj_role=] [obj_type=]]
> >>>> -			option:	[[appraise_type=]] [permit_directio]
> >>>> -
> >>>> +			option:	[[appraise_type=]] [template=] [permit_directio]
> >>>>    		base: 	func:= [BPRM_CHECK][MMAP_CHECK][CREDS_CHECK][FILE_CHECK][MODULE_CHECK]
> >>>>    				[FIRMWARE_CHECK]
> >>>>    				[KEXEC_KERNEL_CHECK] [KEXEC_INITRAMFS_CHECK]
> >>>> @@ -38,6 +37,9 @@ Description:
> >>>>    			fowner:= decimal value
> >>>>    		lsm:  	are LSM specific
> >>>>    		option:	appraise_type:= [imasig]
> >>>> +			template:= name or format of a defined IMA template
> >>>> +			type (eg,ima-ng or d-ng|n-ng). Only valid when action
> >>>> +			is "measure".
> >>>
> >>> This patch only supports specifying the template name, not the
> >>> template format description.  Please remove "d-ng|n-ng".
> >>
> >> The patch is correct. lookup_template_desc() also considers the format.
> > 
> > Specifying the template format works if it is defined in
> > builtin_templates[], but seems to fail if it isn't.
> 
> Yes, the original patch set supports the definition of new templates.
> That part is not included in this patch.

There are three patch sets waiting for this new feature.  For now,
let's remove the reference to the template definition in this patch.
 The missing support could be added as a separate patch.

Roberto, are you ok with that?

Mimi


  reply	other threads:[~2019-06-04 14:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 20:13 [PATCH V3] IMA: Allow profiles to define the desired IMA template Matthew Garrett
2019-06-04  1:51 ` Mimi Zohar
2019-06-04 13:52   ` Mimi Zohar
2019-06-04 14:03   ` Roberto Sassu
2019-06-04 14:32     ` Mimi Zohar
2019-06-04 14:40       ` Roberto Sassu
2019-06-04 14:47         ` Mimi Zohar [this message]
2019-06-04 14:49           ` Roberto Sassu
2019-06-04 20:03   ` Matthew Garrett
2019-06-04 20:16     ` Mimi Zohar
2019-06-04 14:29 ` Roberto Sassu

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=1559659668.4076.10.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=bauerman@linux.ibm.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=matthewgarrett@google.com \
    --cc=mjg59@google.com \
    --cc=prsriva02@gmail.com \
    --cc=roberto.sassu@huawei.com \
    --cc=zohar@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.