From: Steven Whitehouse <swhiteho@redhat.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, chris.mason@oracle.com,
josef@redhat.com, agruen@linbit.com,
"Serge E. Hallyn" <serue@us.ibm.com>
Subject: Re: [PATCH 1/4] Cache xattr security drop check for write v2
Date: Tue, 31 May 2011 19:42:26 +0100 [thread overview]
Message-ID: <1306867346.2816.49.camel@menhir> (raw)
In-Reply-To: <20110531180643.GB9261@alboin.amr.corp.intel.com>
Hi,
On Tue, 2011-05-31 at 11:06 -0700, Andi Kleen wrote:
> > It sounds like a good idea, but cluster filesystems will need to clear
> > the flag when they update their in-core inodes. Without that we could
> > have:
> >
> > Node A looks up inode and sets S_NOSEC since its not suid
> > Node B does chmod +s on the inode
> > Node A now has S_NOSEC set, but inode is suid, so writes don't clear
> > suid
>
> Good point. I assume that's also true for network file systems.
>
> This would essentially argue that for those putting the helper
> into the inode read paths is not optional. I'll look into this
> later.
>
> > - flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC);
> > + flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_NOSEC);
> > + if (!is_sxid(inode->i_mode))
> > + flags |= S_NOSEC;
>
> Doesn't that need a check for no xattr too? or do you not support
> those currently?
>
> Note I added a helper for this in the latest version:
> inode_has_no_xattr()
>
> -Andi
Yes, it should test for xattr too,
Steve.
next prev parent reply other threads:[~2011-05-31 18:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-28 15:25 [PATCH 1/4] Cache xattr security drop check for write v2 Andi Kleen
2011-05-28 15:25 ` [PATCH 2/4] EXT4: Set NOSEC flag early when there are no xattrs v2 Andi Kleen
2011-05-28 15:25 ` [PATCH 3/4] BTRFS: Set NOSEC early for btrfs v2 Andi Kleen
2011-05-28 15:25 ` [PATCH 4/4] XFS: Set NOSEC flag early when inode has no xattrs. v2 Andi Kleen
2011-05-31 13:51 ` [PATCH 1/4] Cache xattr security drop check for write v2 Steven Whitehouse
2011-05-31 18:06 ` Andi Kleen
2011-05-31 18:42 ` Steven Whitehouse [this message]
2011-05-31 20:07 ` Al Viro
2011-05-31 20:18 ` Andi Kleen
2011-05-31 20:21 ` Al Viro
2011-06-18 6:58 ` Marco Stornelli
2011-06-18 18:04 ` Andi Kleen
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=1306867346.2816.49.camel@menhir \
--to=swhiteho@redhat.com \
--cc=agruen@linbit.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=chris.mason@oracle.com \
--cc=josef@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
--cc=viro@zeniv.linux.org.uk \
/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.