From: Babanpreet Singh <bbnpreetsingh@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
yocto-patches@lists.yoctoproject.org
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>,
Babanpreet Singh <bbnpreetsingh@gmail.com>
Subject: Re: [pseudo] [PATCH 0/3] closefrom/close_range: protect every pseudo fd, then drop one
Date: Wed, 29 Jul 2026 05:08:07 +0000 [thread overview]
Message-ID: <20260729050807.7-1-bbnpreetsingh@gmail.com> (raw)
In-Reply-To: <d7ac8b50020fb439b47c512be36b674cccdc0b86.camel@linuxfoundation.org>
On Tue, 2026-07-28 at 16:59 +0100, Richard Purdie wrote:
> I think the missing piece is this:
>
> - 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
Sorry for the breakage, and thanks for chasing it down.
I can reproduce it both ways on master-next at 6d65d74, with a probe that
opens an fd and calls close_range(fd, ~0U, 0):
no PSEUDO_*_PATHS set OK
PSEUDO_IGNORE_PATHS covering the fd's path SIGSEGV
PSEUDO_INCLUDE_PATHS set, path not in it SIGSEGV
same env, closefrom() instead OK
all of the above, plus your line OK
For OP_CLOSE_RANGE the path comes from fd_path(lowfd), the ignore check
hits it, and pseudo_client_op() returns early with result still 0, which
close_range.c then dereferences.
Two things before I respin. Do you want the three fd-protect patches
resent, or will you carry the master-next commits since you have already
resolved the conflicts? And the ignore-path line: fold it into the
close_range patch with a Suggested-by, or keep it as your own commit ahead
of it? Either works for me.
Thanks,
Baban
next prev parent reply other threads:[~2026-07-29 5:08 UTC|newest]
Thread overview: 27+ 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
2026-07-29 5:08 ` Babanpreet Singh [this message]
2026-07-29 6:19 ` Richard Purdie
[not found] ` <18C6AE58128B91FB.3067440@lists.yoctoproject.org>
2026-07-29 8:14 ` [yocto-patches] " Richard Purdie
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=20260729050807.7-1-bbnpreetsingh@gmail.com \
--to=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=richard.purdie@linuxfoundation.org \
--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.