All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: yocto-patches@lists.yoctoproject.org,
	Babanpreet Singh <bbnpreetsingh@gmail.com>
Cc: Mark Hatle <mark.hatle@amd.com>,
	Mark Hatle <mark.hatle@kernel.crashing.org>,
	 Paul Barker <paul@pbarker.dev>,
	Randy MacLeod <randy.macleod@windriver.com>,
	Vincent Haupert	 <mail@vincent-haupert.de>
Subject: Re: [yocto-patches] [pseudo] [PATCH 0/3] closefrom/close_range: protect every pseudo fd, then drop one
Date: Tue, 28 Jul 2026 16:59:43 +0100	[thread overview]
Message-ID: <d7ac8b50020fb439b47c512be36b674cccdc0b86.camel@linuxfoundation.org> (raw)
In-Reply-To: <18C67ECA93F98D2F.1643407@lists.yoctoproject.org>

On Tue, 2026-07-28 at 16:48 +0100, Richard Purdie via lists.yoctoproject.org wrote:
> On Tue, 2026-07-28 at 09:14 +0100, Richard Purdie via
> lists.yoctoproject.org wrote:
> > Hi Baban,
> > 
> > On Tue, 2026-07-28 at 05:08 +0000, Babanpreet Singh wrote:
> > > A gentle ping on this series and the close_range v2 it stacks on
> > > (which Richard okayed on-list on 16 Jul).
> > > 
> > > I noticed pseudo master has moved since (now ca47829, with the
> > > memory-handling and openat2 changes). I've checked that both series
> > > still apply cleanly on top of current master, so no rebase is
> > > needed.
> > > Happy to rebase and resend anyway if that's more convenient.
> > 
> > Sorry, we haven't forgotten about this, we even did discuss it
> > briefly
> > yesterday! Mark has struggled for time and I've been juggling a few
> > other issues.
> > 
> > There were a few fixes ahead of yours in the queue, I have those
> > merged
> > as you mentioned. We then have yours and the logging fixes along with
> > some tests Mark worked on which are next.
> > 
> > I've pushed your changes onto master-next where there were some minor
> > conflicts with other changes. I'll run some wider tests on the
> > resulting branch.
> 
> Further testing showed the problems came back so I think I messed up
> the testing somewhere along the way, sorry :/. I'm pretty sure the
> close_range() implementation is the point things break so there must be
> some subtle issue in that code...
> 
> I'd suggest we reorder the patches and get the skip fds and drop the
> prefix fd patches merged/queued, then come back to how to get
> close_range working. I still thing one common op codepath for both
> cases makes the most sense.

I think the missing piece is this:

diff --git a/pseudo_client.c b/pseudo_client.c
index ca37a80..a1c7052 100644
--- a/pseudo_client.c
+++ b/pseudo_client.c
@@ -1633,7 +1633,7 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path
                }
        }
 
-       if (op != OP_CHROOT && op != OP_CHDIR && op != OP_CLOSE && op != OP_CLOSEFROM && op != OP_DUP
+       if (op != OP_CHROOT && op != OP_CHDIR && op != OP_CLOSE && op != OP_CLOSEFROM && op != OP_CLOSE_RANGE && op != OP_DUP
                        && pseudo_client_ignore_path_chroot(path, 0)) {
                if (op == OP_OPEN) {
                        /* Sanitise the path to have no trailing slash as this is convention in the database */

Cheers,

Richard


      parent reply	other threads:[~2026-07-28 15:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15  5:41 [pseudo] [PATCH 0/2] close_range: implement it rather than return ENOSYS Baban
2026-07-15  5:41 ` [pseudo] [PATCH 1/2] ports/linux/guts: Implement close_range() instead of returning ENOSYS Baban
2026-07-15 19:51   ` [yocto-patches] " Paul Barker
2026-07-15  5:41 ` [pseudo] [PATCH 2/2] tests: Add close_range() test Baban
2026-07-15 20:03   ` [yocto-patches] " Paul Barker
2026-07-16  5:56 ` [pseudo] [PATCH v2 0/2] close_range: implement it rather than return ENOSYS Babanpreet Singh
2026-07-16  5:56   ` [pseudo] [PATCH v2 1/2] ports/linux/guts: Implement close_range() instead of returning ENOSYS Babanpreet Singh
2026-07-28  9:22     ` Richard Purdie
     [not found]     ` <18C669BEC7E582E7.1643407@lists.yoctoproject.org>
2026-07-28 10:15       ` [yocto-patches] " Richard Purdie
     [not found]       ` <18C66CA235EABC94.3010641@lists.yoctoproject.org>
2026-07-28 10:48         ` Richard Purdie
2026-07-16  5:56   ` [pseudo] [PATCH v2 2/2] tests: Add close_range() test Babanpreet Singh
2026-07-16 10:46   ` [pseudo] [PATCH v2 0/2] close_range: implement it rather than return ENOSYS Richard Purdie
2026-07-16 15:46     ` Babanpreet Singh
2026-07-16 16:55       ` Richard Purdie
2026-07-16 23:16         ` [yocto-patches] " Mark Hatle
2026-07-16 23:08     ` Mark Hatle
2026-07-18  4:37   ` [pseudo] [PATCH 0/3] closefrom/close_range: protect every pseudo fd, then drop one Babanpreet Singh
2026-07-18  4:37     ` [pseudo] [PATCH 1/3] pseudo_client: step fully past pseudo's own fds when computing startfd Babanpreet Singh
2026-07-18  4:37     ` [pseudo] [PATCH 2/3] pseudo_client: step around all of pseudo's own fds in closefrom/close_range Babanpreet Singh
2026-07-18  4:37     ` [pseudo] [PATCH 3/3] pseudo_client: remove the unused pseudo_prefix_dir_fd Babanpreet Singh
2026-07-28  5:08     ` [pseudo] [PATCH 0/3] closefrom/close_range: protect every pseudo fd, then drop one Babanpreet Singh
2026-07-28  8:14       ` Richard Purdie
     [not found]       ` <18C6660077364169.3010641@lists.yoctoproject.org>
2026-07-28 15:48         ` [yocto-patches] " Richard Purdie
     [not found]         ` <18C67ECA93F98D2F.1643407@lists.yoctoproject.org>
2026-07-28 15:59           ` Richard Purdie [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=d7ac8b50020fb439b47c512be36b674cccdc0b86.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bbnpreetsingh@gmail.com \
    --cc=mail@vincent-haupert.de \
    --cc=mark.hatle@amd.com \
    --cc=mark.hatle@kernel.crashing.org \
    --cc=paul@pbarker.dev \
    --cc=randy.macleod@windriver.com \
    --cc=yocto-patches@lists.yoctoproject.org \
    /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.