[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025-10-03-chosen-flabby-plunder-premises-hrf07h@cyphar.com>
Date: Fri, 3 Oct 2025 14:22:11 +1000
From: Aleksa Sarai <cyphar@...har.com>
To: Alejandro Colomar <alx@...nel.org>
Cc: Askar Safin <safinaskar@...il.com>, brauner@...nel.org,
dhowells@...hat.com, g.branden.robinson@...il.com, jack@...e.cz,
linux-api@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-man@...r.kernel.org, mtk.manpages@...il.com, viro@...iv.linux.org.uk
Subject: Re: [PATCH v5 7/8] man/man2/open_tree{,_attr}.2: document new
open_tree_attr() API
On 2025-10-01, Alejandro Colomar <alx@...nel.org> wrote:
> Hi Aleksa,
>
> On Wed, Oct 01, 2025 at 05:35:45PM +1000, Aleksa Sarai wrote:
> > On 2025-10-01, Askar Safin <safinaskar@...il.com> wrote:
> > > Aleksa Sarai <cyphar@...har.com>:
> > > > +mntfd2 = open_tree(mntfd1, "", OPEN_TREE_CLONE,
> > > > + &attr, sizeof(attr));
> > >
> > > Your whole so-called "open_tree_attr example" doesn't contain any open_tree_attr
> > > calls. :)
> > >
> > > I think you meant open_tree_attr here.
> >
> > Oops.
> >
> > >
> > > > +\&
> > > > +/* Create a new copy with the id-mapping cleared */
> > > > +memset(&attr, 0, sizeof(attr));
> > > > +attr.attr_clr = MOUNT_ATTR_IDMAP;
> > > > +mntfd3 = open_tree(mntfd1, "", OPEN_TREE_CLONE,
> > > > + &attr, sizeof(attr));
> > >
> > > And here.
> >
> > Oops x2.
> >
> > > Otherwise your whole patchset looks good. Add to whole patchset:
> > > Reviewed-by: Askar Safin <safinaskar@...il.com>
>
> I've applied the patch, with the following amendment:
>
> diff --git i/man/man2/open_tree.2 w/man/man2/open_tree.2
> index 8b48f3b78..f6f2fbecd 100644
> --- i/man/man2/open_tree.2
> +++ w/man/man2/open_tree.2
> @@ -683,14 +683,14 @@ .SS open_tree_attr()
> .\" Using .attr_clr is not strictly necessary but makes the intent clearer.
> attr.attr_set = MOUNT_ATTR_IDMAP;
> attr.userns_fd = nsfd2;
> -mntfd2 = open_tree(mntfd1, "", OPEN_TREE_CLONE,
> - &attr, sizeof(attr));
> +mntfd2 = open_tree_attr(mntfd1, "", OPEN_TREE_CLONE,
> + &attr, sizeof(attr));
> \&
> /* Create a new copy with the id-mapping cleared */
> memset(&attr, 0, sizeof(attr));
> attr.attr_clr = MOUNT_ATTR_IDMAP;
> -mntfd3 = open_tree(mntfd1, "", OPEN_TREE_CLONE,
> - &attr, sizeof(attr));
> +mntfd3 = open_tree_attr(mntfd1, "", OPEN_TREE_CLONE,
> + &attr, sizeof(attr));
> .EE
> .in
> .P
>
>
> (Hopefully I got it right.)
That looks correct -- thanks!
--
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/
Download attachment "signature.asc" of type "application/pgp-signature" (266 bytes)
Powered by blists - more mailing lists