linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: hujianyang <hujianyang@huawei.com>
To: <miklos@szeredi.hu>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	<linux-unionfs@vger.kernel.org>
Subject: Xattr issues with overlayfs
Date: Mon, 24 Nov 2014 18:16:05 +0800	[thread overview]
Message-ID: <54730565.4040308@huawei.com> (raw)

Hi Miklos,

I'm learning overlayfs and finding some issues in xattr support. I
don't know if they are real problems or misunderstandings. I wish you
could take some time to help.

As is said in Documentation/filesystems/overlayfs.txt:

"""
A directory is made opaque by setting the xattr "trusted.overlay.opaque"
to "y".  Where the upper filesystem contains an opaque directory, any
directory in the lower filesystem with the same name is ignored.
"""

I think users could set *ovl_opaque_xattr* to hide the files in lower
directory in userspace like this:

	setxattr(path, "trusted.overlay.opaque", &value, 1, XATTR_CREATE);

But It seems not true because we forbid this operation in userspace:

ovl_setxattr():

        if (ovl_is_private_xattr(name))
                goto out_drop_write;


I think current xattr operations in overlayfs including setxattr,
getxattr, listxattr, removexattr are used for upper/lower xattrs and
overlayfs private xattrs also.

Is ovl_set/remove_opauqe() related to this?

I'd like to introduce some of my work.

1) Use macros to indicate overlayfs_private_xattr.
2) Enable overlayfs_private_xattr setting an removing in userspace.
   * I'm not clear with this one

Thanks~!

Hu


             reply	other threads:[~2014-11-24 10:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24 10:16 hujianyang [this message]
2014-11-24 10:25 ` [PATCH] ovl: Use macros to present ovl_xattr hujianyang
2014-11-24 10:30 ` [PATCH] ovl: Enable opauqe setting an removing in userspace hujianyang
2014-11-25 14:41 ` Xattr issues with overlayfs Miklos Szeredi
2014-11-26  8:09   ` hujianyang

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=54730565.4040308@huawei.com \
    --to=hujianyang@huawei.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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).