linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seth Forshee <sforshee@digitalocean.com>
To: Christian Brauner <brauner@kernel.org>
Cc: Amir Goldstein <amir73il@gmail.com>,
	Miklos Szeredi <mszeredi@redhat.com>,
	Vivek Goyal <vgoyal@redhat.com>, Christoph Hellwig <hch@lst.de>,
	Aleksa Sarai <cyphar@cyphar.com>,
	linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] acl: move idmapped mount fixup into vfs_{g,s}etxattr()
Date: Thu, 14 Jul 2022 16:36:21 -0500	[thread overview]
Message-ID: <YtCMVQIm0cU1wnYU@do-x1extreme> (raw)
In-Reply-To: <20220708090134.385160-2-brauner@kernel.org>

On Fri, Jul 08, 2022 at 11:01:32AM +0200, Christian Brauner wrote:
> This cycle we added support for mounting overlayfs on top of idmapped mounts.
> Recently I've started looking into potential corner cases when trying to add
> additional tests and I noticed that reporting for POSIX ACLs is currently wrong
> when using idmapped layers with overlayfs mounted on top of it.

<snip detailed explanation>

Beyond the issues described here, it also looks like the vfs_*() calls
are been inconsistent wrt idmapped mounts. With acls it takes/returns
unmapped ids, but other interfaces like vfs_getattr() return mapped ids.
So it makes sense to make vfs_{get,set}xattr() behave likewise.

I have one small suggestion below, but I think this looks good.

Reviewed-by: Seth Forshee <sforshee@digitalocean.com>

> +static inline bool is_posix_acl_xattr(const char *name)
> +{
> +	return (strcmp(name, XATTR_NAME_POSIX_ACL_ACCESS) == 0) ||
> +	       (strcmp(name, XATTR_NAME_POSIX_ACL_DEFAULT) == 0);
> +}
> +

There are locations still open-coding this check -- setxattr_convert()
and do_getxattr(). Maybe consider adding a follow-on patch to convert
those too.

Seth

  reply	other threads:[~2022-07-14 21:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08  9:01 [PATCH v2 0/3] ovl: acl fixes Christian Brauner
2022-07-08  9:01 ` [PATCH v2 1/3] acl: move idmapped mount fixup into vfs_{g,s}etxattr() Christian Brauner
2022-07-14 21:36   ` Seth Forshee [this message]
2022-07-08  9:01 ` [PATCH v2 2/3] acl: make posix_acl_clone() available to overlayfs Christian Brauner
2022-07-14 21:36   ` Seth Forshee
2022-07-08  9:01 ` [PATCH v2 3/3] ovl: handle idmappings in ovl_get_acl() Christian Brauner
2022-07-14 21:37   ` Seth Forshee
2022-07-13 10:18 ` [PATCH v2 0/3] ovl: acl fixes Christian Brauner

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=YtCMVQIm0cU1wnYU@do-x1extreme \
    --to=sforshee@digitalocean.com \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=cyphar@cyphar.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=vgoyal@redhat.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).