Re: [pseudo] [PATCH v2 0/2] close_range: implement it rather than return ENOSYS

Richard Purdie <[email protected]> Thu, 16 Jul 2026 17:55:53 +0100
Newsgroups org.yoctoproject.lists.yocto-patches
Message-ID <4321836d169d2ff0e80884717ec1de4aaa868d83.camel@linuxfoundation.org>
On Thu, 2026-07-16 at 08:46 -0700, Babanpreet Singh wrote:
> Thanks!
> 
> >   That said, I couldn't see what pseudo_prefix_dir_fd actually helps with
> > and I couldn't see why we need that...
> 
> I flagged it since it is held open and a close_range() sweep will wipe it out. I hadn't checked if anything still reads it untill now. It seems like it is just kept open and alive and the socket connection + fchdir() has been moved to pseudo_localstate_dir_fd.
> 
> So, for the follow-up I'd purpose:
> 
> 1/2: remove  pseudo_prefix_dir_fd
> 2/2: add pseudo_pwd_lck_fd and pseudo_util_evlog_fd to the descriptors OP_CLOSEFROM and OP_CLOSE_RANGE step around
> 
> If you'd rather keep the fd, I'll drop the removal and add it to the protected set in 2/2 instead.

I'd suggest making the series the other way around, protect it for now,
send a removal patch on top and we can look at the removal patch and
test and check it isn't really used anywhere. It is possible I'm
missing some usage of it and I'm curious what Mark thinks.

The protection patch makes sense and should be easy to merge compared
to that.

Cheers,

Richard