Patch for the close_range() musl build failure
Hi Huang Jing,
Thanks for investigating and fixing this! A few notes, inline, below.
They are all formal and trivial so I can fix up all of them on merge if
you agree (but you can also choose to re-send as v2 with those fixed,
let me know, in case).
I'm pointing those out especially for the future, should you happen to
contribute again to this project or projects following a similar workflow.
On Thu, 06 Aug 2026 20:06:07 +0800
Huang Jing
From 25831e518c9227a31b75f2c1eb2e620fd4c5d049 Mon Sep 17 00:00:00 2001
We follow essentially the same contribution process as the Linux kernel, see also CONTRIBUTING.md and: https://www.kernel.org/doc/html/next/process/submitting-patches.html ...so we don't send them patches as attachments, they're simply in the email body, just like git send-email sends them.
From: RadioNoiseE
Date: Thu, 6 Aug 2026 19:58:45 +0800 Subject: [PATCH] isolation: Include linux_dep.h for close_range() Now that close_open_files() has been moved, linux_dep.h can be safely
Stated like this, it looks like a more detailed description of the patch, compared to the title. It's something you're adding to it instead. To avoid confusion about what the patch does (most importantly, what's in the title), I'd suggest to phrase it like: ...and now that close_open_files() ...
removed from util.c.
Here we need a couple of tags to provide some context (which might be important when looking at this later), that is: Link: https://github.com/gentoo/gentoo/pull/46644 Fixes: 0a510066e916 ("isolation: Move close_open_files() to isolate_fds()") and, while at it, it's a good practice to Cc: the author of the change that's being fixed up (I just did).
Signed-off-by: Jing Huang
--- Makefile | 4 ++-- isolation.c | 1 + util.c | 1 - 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile index 77474d6..b315242 100644 --- a/Makefile +++ b/Makefile @@ -48,8 +48,8 @@ MANPAGES = passt.1 pasta.1 pesto.1 passt-repair.1
PASST_HEADERS = arch.h arp.h bitmap.h checksum.h conf.h dhcp.h dhcpv6.h \ epoll_ctl.h flow.h fwd.h fwd_rule.h flow_table.h icmp.h icmp_flow.h \ - inany.h iov.h ip.h isolation.h lineread.h log.h migrate.h ndp.h \ - netlink.h packet.h parse.h passt.h pasta.h pcap.h pif.h repair.h \ + inany.h iov.h ip.h isolation.h lineread.h linux_dep.h log.h migrate.h \ + ndp.h netlink.h packet.h parse.h passt.h pasta.h pcap.h pif.h repair.h \ serialise.h siphash.h tap.h tcp.h tcp_buf.h tcp_conn.h tcp_internal.h \ tcp_splice.h tcp_vu.h udp.h udp_flow.h udp_internal.h udp_vu.h util.h \ vhost_user.h virtio.h vu_common.h diff --git a/isolation.c b/isolation.c index 94cbe7f..a30b329 100644 --- a/isolation.c +++ b/isolation.c @@ -89,6 +89,7 @@ #include
#include "util.h" +#include "linux_dep.h" #include "seccomp.h" #include "passt.h" #include "log.h" diff --git a/util.c b/util.c index bd4c6ca..28c32e4 100644 --- a/util.c +++ b/util.c @@ -27,7 +27,6 @@ #include
#include -#include "linux_dep.h" #include "util.h" #include "iov.h" #include "passt.h"
The patch itself looks good to me. -- Stefano
On Thu, Aug 06, 2026 at 11:54:20PM +0200, Stefano Brivio wrote:
Hi Huang Jing,
Thanks for investigating and fixing this! A few notes, inline, below.
They are all formal and trivial so I can fix up all of them on merge if you agree (but you can also choose to re-send as v2 with those fixed, let me know, in case).
I'm pointing those out especially for the future, should you happen to contribute again to this project or projects following a similar workflow.
On Thu, 06 Aug 2026 20:06:07 +0800 Huang Jing
wrote: From 25831e518c9227a31b75f2c1eb2e620fd4c5d049 Mon Sep 17 00:00:00 2001
We follow essentially the same contribution process as the Linux kernel, see also CONTRIBUTING.md and:
https://www.kernel.org/doc/html/next/process/submitting-patches.html
...so we don't send them patches as attachments, they're simply in the email body, just like git send-email sends them.
From: RadioNoiseE
Date: Thu, 6 Aug 2026 19:58:45 +0800 Subject: [PATCH] isolation: Include linux_dep.h for close_range() Now that close_open_files() has been moved, linux_dep.h can be safely
Stated like this, it looks like a more detailed description of the patch, compared to the title.
It's something you're adding to it instead. To avoid confusion about what the patch does (most importantly, what's in the title), I'd suggest to phrase it like:
...and now that close_open_files() ...
removed from util.c.
Here we need a couple of tags to provide some context (which might be important when looking at this later), that is:
Link: https://github.com/gentoo/gentoo/pull/46644 Fixes: 0a510066e916 ("isolation: Move close_open_files() to isolate_fds()")
and, while at it, it's a good practice to Cc: the author of the change that's being fixed up (I just did).
I second the minor procedural nits, but the patch looks good to me
too, so,
Reviewed-by: David Gibson
Hi Huang Jing,
Thanks for investigating and fixing this! A few notes, inline, below.
They are all formal and trivial so I can fix up all of them on merge if you agree (but you can also choose to re-send as v2 with those fixed, let me know, in case).
I'm pointing those out especially for the future, should you happen to contribute again to this project or projects following a similar workflow.
Thanks!
From 25831e518c9227a31b75f2c1eb2e620fd4c5d049 Mon Sep 17 00:00:00 2001
We follow essentially the same contribution process as the Linux kernel, see also CONTRIBUTING.md and:
https://www.kernel.org/doc/html/next/process/submitting-patches.html
...so we don't send them patches as attachments, they're simply in the email body, just like git send-email sends them.
From: RadioNoiseE
Date: Thu, 6 Aug 2026 19:58:45 +0800 Subject: [PATCH] isolation: Include linux_dep.h for close_range() Now that close_open_files() has been moved, linux_dep.h can be safely
Stated like this, it looks like a more detailed description of the patch, compared to the title.
It's something you're adding to it instead. To avoid confusion about what the patch does (most importantly, what's in the title), I'd suggest to phrase it like:
...and now that close_open_files() ...
removed from util.c.
Here we need a couple of tags to provide some context (which might be important when looking at this later), that is:
Link: https://github.com/gentoo/gentoo/pull/46644 Fixes: 0a510066e916 ("isolation: Move close_open_files() to isolate_fds()")
and, while at it, it's a good practice to Cc: the author of the change that's being fixed up (I just did).
I second the minor procedural nits, but the patch looks good to me too, so,
Reviewed-by: David Gibson
Will send the fixed patch in the following mail.
Include linux_dep.h for close_range() usage in isolation.c. And now
that the close_open_files() function which makes use of linux_dep.h
has been moved from util.c to isolation.c, we can safely remove the
header inclusion from util.c.
Link: https://github.com/gentoo/gentoo/pull/46644
Fixes: 0a510066e916 ("isolation: Move close_open_files() to isolate_fds()")
Signed-off-by: Jing Huang
participants (3)
-
David Gibson
-
Huang Jing
-
Stefano Brivio