public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: James Morris <jmorris@namei.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	LSM List <linux-security-module@vger.kernel.org>
Subject: Re: [GIT] Security subsystem updates for 3.9
Date: Thu, 21 Feb 2013 14:03:40 -0500	[thread overview]
Message-ID: <1361473420.29360.97.camel@falcor1> (raw)
In-Reply-To: <CA+55aFxSgVX=d5RvL0kSTm5KQR-AJ=+t_+jXv9J+J3f-C4MOfA@mail.gmail.com>

On Thu, 2013-02-21 at 10:21 -0800, Linus Torvalds wrote:
> On Thu, Feb 21, 2013 at 10:06 AM, Mimi Zohar <zohar@linux.vnet.ibm.com> wrote:
> >
> > Almost, and enforcing file integrity is enabled.  The merged result
> > should look like what's contained in
> > linux-integrity/next-upstreamed-patches:
> >
> > int ima_module_check(struct file *file)
> > {
> >         if (!file) {
> >                 if ((ima_appraise & IMA_APPRAISE_MODULES) &&
> >                     (ima_appraise & IMA_APPRAISE_ENFORCE)) {
> > #ifndef CONFIG_MODULE_SIG_FORCE
> >                         return -EACCES; /* INTEGRITY_UNKNOWN */
> > #endif
> >                 }
> >                 return 0;
> 
> Ugh. The placement of that #ifndef is just horrible, please don't do
> that. Just add it around the whole if-statement rather than around
> just the return. Not because the compiler can't optimize away the
> tests, but because it's much more obvious to a *human* what the ifndef
> actually does.

Having the 'ifndef' is ugly.  Thanks for the suggestion on making it
less ugly.

> Anyway, I don't have the IMA_APPRAISE_ENFORCE bit checking, it wasn't
> obvious from the conflict, so somebody will need to add that.

Commit "750943a ima: remove enforce checking duplication" moved the test
to process_measurement().

Because commit "a7f2a36 ima: fallback to MODULE_SIG_ENFORCE for existing
kernel module syscall" never went into linux-security/next, subsequent
patches resulted in this merge conflict.

I'll post an additional patch.

thanks,

Mimi




      reply	other threads:[~2013-02-21 19:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21 14:03 [GIT] Security subsystem updates for 3.9 James Morris
2013-02-21 16:26 ` Linus Torvalds
2013-02-21 18:06   ` Mimi Zohar
2013-02-21 18:21     ` Linus Torvalds
2013-02-21 19:03       ` Mimi Zohar [this message]

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=1361473420.29360.97.camel@falcor1 \
    --to=zohar@linux.vnet.ibm.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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