From: "Andreas Grünbacher" <andreas.gruenbacher@gmail.com>
To: Hugh Dickins <hughd@google.com>,
Michael Kerrisk <michael.kerrisk@gmail.com>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@infradead.org>,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
Aristeu Rozanski <arozansk@redhat.com>,
Eric Paris <eparis@redhat.com>,
linux-mm@kvack.org,
Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] tmpfs: listxattr should include POSIX ACL xattrs
Date: Mon, 9 Nov 2015 01:24:23 +0100 [thread overview]
Message-ID: <CAHpGcM+Wnt75ebrmsu3_GOuGESa9Pr8yEhwL3-Tbabsg+K20xw@mail.gmail.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1511081504460.14116@eggly.anvils>
2015-11-09 0:37 GMT+01:00 Hugh Dickins <hughd@google.com>:
> On Tue, 3 Nov 2015, Andreas Gruenbacher wrote:
>
>> When a file on tmpfs has an ACL or a Default ACL, listxattr should include the
>> corresponding xattr names.
>>
>> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
>> ---
>> fs/kernfs/inode.c | 2 +-
>> fs/xattr.c | 53 +++++++++++++++++++++++++++++++++++----------------
>> include/linux/xattr.h | 2 +-
>> mm/shmem.c | 2 +-
>> 4 files changed, 40 insertions(+), 19 deletions(-)
>
> Hmm, can you make a stronger argument for this patch than above?
>
> My ignorance of ACLs and XATTRs is boundless, I'll have to defer to
> you and others.
That shouldn't be a problem.
> But when I read the listxattr(2) manpage saying
> "Filesystems like ext2, ext3 and XFS which implement POSIX ACLs
> using extended attributes, might return a list like ...",
> I don't see that as mandating that any filesystem which happens
> for its own internal convenience to implement ACLs via XATTRs,
> has to list the ACLs with the XATTRs - I read it rather as an
> apology that some of them (for their own simplicity) do so.
The user-space interface for POSIX ACLs is always the same no matter
how they are implemented in the kernel: they are exposed as two
extended attributes called "system.posix_acl_access" (directories and
non-directories) and "system.posix_acl_default" (diectories only). The
extended attribute syscalls are [fl]getxattr, [fl]setxattr,
[fl]listxattr, and [fl]removexattr.
The listxattr syscalls is expected to list all the attributes which
the calling process is allowed to see / access. Tmpfs misbehaves in
this regard; it doesn't list the extended attributes for POSIX ACLs
even when they are set.
This example on the listxattr manpage is rather unfortunate and should
be fixed; how filesystems implement stuff internally should really be
of no relevance here. I'm taking Michael into the CC.
> If this patch simplified the code, I'd be all for it;
> but it's the reverse, and we seem to have survived for several
> years without it: I don't see yet why it's needed.
It's a confusing inconsistency. Many utilities like ls and
getfacl/setfacl check for the presence of POSIX ACLs with getxattr,
they don't use listxattr for that. Other utilities that rely on
listxattr currently won't see when objects on tmpfs have POSIX ACLs
though; this is bad.
> I've no
> fundamental objection, but I'd like to understand why it's
> a step forwards rather than a step backwards.
Yes, I hope I could explain that well enough.
Thanks,
Andreas
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2015-11-09 0:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 14:13 [PATCH] tmpfs: listxattr should include POSIX ACL xattrs Andreas Gruenbacher
2015-11-08 23:37 ` Hugh Dickins
2015-11-09 0:24 ` Andreas Grünbacher [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=CAHpGcM+Wnt75ebrmsu3_GOuGESa9Pr8yEhwL3-Tbabsg+K20xw@mail.gmail.com \
--to=andreas.gruenbacher@gmail.com \
--cc=agruenba@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=arozansk@redhat.com \
--cc=eparis@redhat.com \
--cc=hch@infradead.org \
--cc=hughd@google.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=michael.kerrisk@gmail.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).