All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Tyler Hicks <tyhicks@linux.microsoft.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
	James Morris <jmorris@namei.org>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org, linux-audit@redhat.com,
	linux-integrity@vger.kernel.org,
	"Serge E . Hallyn" <serge@hallyn.com>
Subject: Re: [PATCH] ima: Rename internal audit rule functions
Date: Thu, 16 Jul 2020 10:23:01 -0400	[thread overview]
Message-ID: <1594909381.12900.361.camel@linux.ibm.com> (raw)
In-Reply-To: <20200710194234.GA7254@sequoia>

On Fri, 2020-07-10 at 14:42 -0500, Tyler Hicks wrote:
> On 2020-06-29 17:30:03, Mimi Zohar wrote:
> > [Cc'ing the audit mailing list]
> > 
> > On Mon, 2020-06-29 at 10:30 -0500, Tyler Hicks wrote:
> > > 
> > > diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
> > > index ff2bf57ff0c7..5d62ee8319f4 100644
> > > --- a/security/integrity/ima/ima.h
> > > +++ b/security/integrity/ima/ima.h
> > > @@ -419,24 +419,24 @@ static inline void ima_free_modsig(struct modsig *modsig)
> > >  /* LSM based policy rules require audit */
> > >  #ifdef CONFIG_IMA_LSM_RULES
> > >  
> > > -#define security_filter_rule_init security_audit_rule_init
> > > -#define security_filter_rule_free security_audit_rule_free
> > > -#define security_filter_rule_match security_audit_rule_match
> > > +#define ima_audit_rule_init security_audit_rule_init
> > > +#define ima_audit_rule_free security_audit_rule_free
> > > +#define ima_audit_rule_match security_audit_rule_match
> > 
> > Instead of defining an entirely new method of identifying files, IMA
> > piggybacks on top of the existing audit rule syntax.  IMA policy rules
> > "filter" based on this information.
> > 
> > IMA already audits security/integrity related events.  Using the word
> > "audit" here will make things even more confusing than they currently
> > are.  Renaming these functions as ima_audit_rule_XXX provides no
> > benefit.  At that point, IMA might as well call the
> > security_audit_rule prefixed function names directly.  As a quick fix,
> > rename them as "ima_filter_rule".
> > 
> > The correct solution would probably be to rename these prefixed
> > "security_audit_rule" functions as "security_filter_rule", so that
> > both the audit subsystem and IMA could use them.
> 
> There doesn't seem to be any interest, from the audit side, in re-using
> these. I don't quite understand why they would want to use them since
> they're just simple wrappers around the security_audit_rule_*()
> functions.

The security_filter_rule_* wasn't meant to be in addition, but as a
replacement for security_audit_rule_*
> 
> I'll go the "quick fix" route of renaming them as ima_filter_rule_*().

That's fine.

Mimi


--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit

WARNING: multiple messages have this Message-ID (diff)
From: Mimi Zohar <zohar@linux.ibm.com>
To: Tyler Hicks <tyhicks@linux.microsoft.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
	James Morris <jmorris@namei.org>,
	"Serge E . Hallyn" <serge@hallyn.com>,
	linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	Casey Schaufler <casey@schaufler-ca.com>,
	linux-audit@redhat.com
Subject: Re: [PATCH] ima: Rename internal audit rule functions
Date: Thu, 16 Jul 2020 10:23:01 -0400	[thread overview]
Message-ID: <1594909381.12900.361.camel@linux.ibm.com> (raw)
In-Reply-To: <20200710194234.GA7254@sequoia>

On Fri, 2020-07-10 at 14:42 -0500, Tyler Hicks wrote:
> On 2020-06-29 17:30:03, Mimi Zohar wrote:
> > [Cc'ing the audit mailing list]
> > 
> > On Mon, 2020-06-29 at 10:30 -0500, Tyler Hicks wrote:
> > > 
> > > diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
> > > index ff2bf57ff0c7..5d62ee8319f4 100644
> > > --- a/security/integrity/ima/ima.h
> > > +++ b/security/integrity/ima/ima.h
> > > @@ -419,24 +419,24 @@ static inline void ima_free_modsig(struct modsig *modsig)
> > >  /* LSM based policy rules require audit */
> > >  #ifdef CONFIG_IMA_LSM_RULES
> > >  
> > > -#define security_filter_rule_init security_audit_rule_init
> > > -#define security_filter_rule_free security_audit_rule_free
> > > -#define security_filter_rule_match security_audit_rule_match
> > > +#define ima_audit_rule_init security_audit_rule_init
> > > +#define ima_audit_rule_free security_audit_rule_free
> > > +#define ima_audit_rule_match security_audit_rule_match
> > 
> > Instead of defining an entirely new method of identifying files, IMA
> > piggybacks on top of the existing audit rule syntax.  IMA policy rules
> > "filter" based on this information.
> > 
> > IMA already audits security/integrity related events.  Using the word
> > "audit" here will make things even more confusing than they currently
> > are.  Renaming these functions as ima_audit_rule_XXX provides no
> > benefit.  At that point, IMA might as well call the
> > security_audit_rule prefixed function names directly.  As a quick fix,
> > rename them as "ima_filter_rule".
> > 
> > The correct solution would probably be to rename these prefixed
> > "security_audit_rule" functions as "security_filter_rule", so that
> > both the audit subsystem and IMA could use them.
> 
> There doesn't seem to be any interest, from the audit side, in re-using
> these. I don't quite understand why they would want to use them since
> they're just simple wrappers around the security_audit_rule_*()
> functions.

The security_filter_rule_* wasn't meant to be in addition, but as a
replacement for security_audit_rule_*
> 
> I'll go the "quick fix" route of renaming them as ima_filter_rule_*().

That's fine.

Mimi

  reply	other threads:[~2020-07-16 14:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 15:30 [PATCH] ima: Rename internal audit rule functions Tyler Hicks
2020-06-29 16:24 ` Casey Schaufler
2020-06-29 21:30 ` Mimi Zohar
2020-06-29 21:30   ` Mimi Zohar
2020-07-10 19:42   ` Tyler Hicks
2020-07-10 19:42     ` Tyler Hicks
2020-07-16 14:23     ` Mimi Zohar [this message]
2020-07-16 14:23       ` Mimi Zohar

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=1594909381.12900.361.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=jmorris@namei.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=tyhicks@linux.microsoft.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.