linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Kasatkin, Dmitry" <dmitry.kasatkin@intel.com>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	LSM List <linux-security-module@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	James Morris <jmorris@namei.org>
Subject: Re: [PATCH 0/2] ima: policy search speedup
Date: Tue, 11 Dec 2012 10:35:57 -0800	[thread overview]
Message-ID: <CA+55aFwhY2+UG-VCGrUk=N3KNXvDudA-QHnDqPbWU5pf4Ty5jw@mail.gmail.com> (raw)
In-Reply-To: <CALLzPKakDLO-_ERScq_cAvAVLFU_5rRSyvoudjba=cFo96c-Mw@mail.gmail.com>

On Tue, Dec 11, 2012 at 10:12 AM, Kasatkin, Dmitry
<dmitry.kasatkin@intel.com> wrote:
>
> Actually S_PRIVATE does not work work for normal filesystems which IMA
> might want to ignore.

The reading comprehension here is abysmal.

First you claim that you need the new flag for pseudo-filesystems, and
now that I point out that we have an *old* flag for pseudo-filesystems
you turn around 180 degrees and talk about other filesystems.

And none of that matters for my argument AT ALL.

My argument has not been that we cannot add a new flag.

My argument has been that we already have the logical place for such a
flag, and that adding a totally new field seems so stupid.

Seriously. The i_flags place is where we already do pretty much
*exactly* what you ask for. The fact that it is faster and more
flexible to boot should be a bonus.

Now, there are real reasons to avoid "s_flags", notably the fact that
we're running out of bits there (unlike i_flags), and they are exposed
as generic fields and are generally meant for mount options etc. So I
understand why we might want to avoid that (although the whole
mount-option thing could also be seen as an advantage), but I really
don't see any argument against i_flags, considering that we already
use it for S_IMA and S_PRIVATE, both of which are related to exactly
what you seem to want to do.

The one downside of i_flags may be that any update should own the
inode semaphore. But within the context of a security model, that
should be fine (and normally you'd update it once per lifetime of the
inode).

                  Linus

  reply	other threads:[~2012-12-11 18:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22 21:54 [PATCH 0/2] ima: policy search speedup Dmitry Kasatkin
2012-11-22 21:54 ` [PATCH 1/2] vfs: new super block feature flags attribute Dmitry Kasatkin
2012-11-22 21:54 ` [PATCH 2/2] ima: skip policy search for never appraised or measured files Dmitry Kasatkin
2012-11-27 13:42 ` [PATCH 0/2] ima: policy search speedup Kasatkin, Dmitry
2012-12-11 12:51   ` Kasatkin, Dmitry
2012-12-11 14:08     ` Mimi Zohar
2012-12-11 16:59       ` Linus Torvalds
2012-12-11 17:40         ` Kasatkin, Dmitry
2012-12-11 17:55           ` Linus Torvalds
2012-12-11 18:09             ` Eric Paris
2012-12-11 18:35               ` Kasatkin, Dmitry
2012-12-11 19:07               ` Mimi Zohar
2012-12-11 22:16                 ` Dave Chinner
2012-12-11 18:10             ` Kasatkin, Dmitry
2012-12-11 18:29               ` Al Viro
2012-12-11 18:12             ` Kasatkin, Dmitry
2012-12-11 18:35               ` Linus Torvalds [this message]
2012-12-11 18:53                 ` Kasatkin, Dmitry
2012-12-11 18:18         ` Mimi Zohar
2012-12-11 18:35           ` Eric Paris
2012-12-11 18:59             ` Mimi Zohar
2012-12-11 19:10               ` Linus Torvalds
2012-12-11 19:48                 ` Mimi Zohar
2012-12-11 20:05                   ` Linus Torvalds
2012-12-11 20:15                     ` Eric Paris
2012-12-11 20:31                       ` Linus Torvalds
2012-12-11 20:08                   ` Eric Paris
2012-12-11 22:57                     ` Kasatkin, Dmitry
2012-12-11 23:02                       ` Eric Paris
2012-12-12 13:56                         ` Kasatkin, Dmitry
2012-12-12 14:25                           ` Eric Paris

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='CA+55aFwhY2+UG-VCGrUk=N3KNXvDudA-QHnDqPbWU5pf4Ty5jw@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=dmitry.kasatkin@intel.com \
    --cc=jmorris@namei.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --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 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).