* [PULL 0/6] misc patch queue
@ 2024-08-05 0:31 Richard Henderson
2024-08-05 0:31 ` [PULL 1/6] linux-user/elfload: Fix pr_pid values in core files Richard Henderson
` (7 more replies)
0 siblings, 8 replies; 14+ messages in thread
From: Richard Henderson @ 2024-08-05 0:31 UTC (permalink / raw)
To: qemu-devel
The following changes since commit f9851d2ffef59b3a7f39513469263ab3b019480f:
Merge tag 'migration-20240802-pull-request' of https://gitlab.com/farosas/qemu into staging (2024-08-03 07:26:26 +1000)
are available in the Git repository at:
https://gitlab.com/rth7680/qemu.git tags/pull-misc-20240805
for you to fetch changes up to 9996a35c6433c0e019a1c05791299db5e63a5db7:
net/tap: Use qemu_close_all_open_fd() (2024-08-05 08:33:36 +1000)
----------------------------------------------------------------
linux-user/elfload: Fix pr_pid values in core files
util: Add qemu_close_all_open_fd
net/tap: Use qemu_close_all_open_fd
----------------------------------------------------------------
Clément Léger (5):
qemu/osdep: Move close_all_open_fds() to oslib-posix
qemu/osdep: Split qemu_close_all_open_fd() and add fallback
net/tap: Factorize fd closing after forking
qemu/osdep: Add excluded fd parameter to qemu_close_all_open_fd()
net/tap: Use qemu_close_all_open_fd()
Ilya Leoshkevich (1):
linux-user/elfload: Fix pr_pid values in core files
include/qemu/osdep.h | 11 +++++
linux-user/elfload.c | 8 ++--
net/tap.c | 34 +++++++------
system/async-teardown.c | 37 +--------------
util/oslib-posix.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 159 insertions(+), 55 deletions(-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PULL 1/6] linux-user/elfload: Fix pr_pid values in core files
2024-08-05 0:31 [PULL 0/6] misc patch queue Richard Henderson
@ 2024-08-05 0:31 ` Richard Henderson
2024-08-05 0:31 ` [PATCH for-9.1] target/i386: Fix VSIB decode Richard Henderson
` (6 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2024-08-05 0:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Ilya Leoshkevich, qemu-stable
From: Ilya Leoshkevich <iii@linux.ibm.com>
Analyzing qemu-produced core dumps of multi-threaded apps runs into:
(gdb) info threads
[...]
21 Thread 0x3ff83cc0740 (LWP 9295) warning: Couldn't find general-purpose registers in core file.
<unavailable> in ?? ()
The reason is that all pr_pid values are the same, because the same
TaskState is used for all CPUs when generating NT_PRSTATUS notes.
Fix by using TaskStates associated with individual CPUs.
Cc: qemu-stable@nongnu.org
Fixes: 243c47066253 ("linux-user/elfload: Write corefile elf header in one block")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240801202340.21845-1-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/elfload.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 0d4dc1f6d1..b27dd01734 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -4102,8 +4102,7 @@ static void fill_elf_note_phdr(struct elf_phdr *phdr, size_t sz, off_t offset)
bswap_phdr(phdr, 1);
}
-static void fill_prstatus_note(void *data, const TaskState *ts,
- CPUState *cpu, int signr)
+static void fill_prstatus_note(void *data, CPUState *cpu, int signr)
{
/*
* Because note memory is only aligned to 4, and target_elf_prstatus
@@ -4113,7 +4112,7 @@ static void fill_prstatus_note(void *data, const TaskState *ts,
struct target_elf_prstatus prstatus = {
.pr_info.si_signo = signr,
.pr_cursig = signr,
- .pr_pid = ts->ts_tid,
+ .pr_pid = get_task_state(cpu)->ts_tid,
.pr_ppid = getppid(),
.pr_pgrp = getpgrp(),
.pr_sid = getsid(0),
@@ -4428,8 +4427,7 @@ static int elf_core_dump(int signr, const CPUArchState *env)
CPU_FOREACH(cpu_iter) {
dptr = fill_note(&hptr, NT_PRSTATUS, "CORE",
sizeof(struct target_elf_prstatus));
- fill_prstatus_note(dptr, ts, cpu_iter,
- cpu_iter == cpu ? signr : 0);
+ fill_prstatus_note(dptr, cpu_iter, cpu_iter == cpu ? signr : 0);
}
if (dump_write(fd, header, data_offset) < 0) {
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH for-9.1] target/i386: Fix VSIB decode
2024-08-05 0:31 [PULL 0/6] misc patch queue Richard Henderson
2024-08-05 0:31 ` [PULL 1/6] linux-user/elfload: Fix pr_pid values in core files Richard Henderson
@ 2024-08-05 0:31 ` Richard Henderson
2024-08-05 12:10 ` Paolo Bonzini
2024-08-05 0:31 ` [PULL 2/6] qemu/osdep: Move close_all_open_fds() to oslib-posix Richard Henderson
` (5 subsequent siblings)
7 siblings, 1 reply; 14+ messages in thread
From: Richard Henderson @ 2024-08-05 0:31 UTC (permalink / raw)
To: qemu-devel
With normal SIB, index == 4 indicates no index.
With VSIB, there is no exception for VR4/VR12.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2474
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/i386/tcg/translate.c | 20 ++++++++++----------
target/i386/tcg/decode-new.c.inc | 3 ++-
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index fb0d01b356..98f5fe61ed 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -1534,7 +1534,7 @@ typedef struct AddressParts {
} AddressParts;
static AddressParts gen_lea_modrm_0(CPUX86State *env, DisasContext *s,
- int modrm)
+ int modrm, bool is_vsib)
{
int def_seg, base, index, scale, mod, rm;
target_long disp;
@@ -1563,7 +1563,7 @@ static AddressParts gen_lea_modrm_0(CPUX86State *env, DisasContext *s,
int code = x86_ldub_code(env, s);
scale = (code >> 6) & 3;
index = ((code >> 3) & 7) | REX_X(s);
- if (index == 4) {
+ if (index == 4 && !is_vsib) {
index = -1; /* no index */
}
base = (code & 7) | REX_B(s);
@@ -1693,21 +1693,21 @@ static TCGv gen_lea_modrm_1(DisasContext *s, AddressParts a, bool is_vsib)
static void gen_lea_modrm(CPUX86State *env, DisasContext *s, int modrm)
{
- AddressParts a = gen_lea_modrm_0(env, s, modrm);
+ AddressParts a = gen_lea_modrm_0(env, s, modrm, false);
TCGv ea = gen_lea_modrm_1(s, a, false);
gen_lea_v_seg(s, ea, a.def_seg, s->override);
}
static void gen_nop_modrm(CPUX86State *env, DisasContext *s, int modrm)
{
- (void)gen_lea_modrm_0(env, s, modrm);
+ (void)gen_lea_modrm_0(env, s, modrm, false);
}
/* Used for BNDCL, BNDCU, BNDCN. */
static void gen_bndck(CPUX86State *env, DisasContext *s, int modrm,
TCGCond cond, TCGv_i64 bndv)
{
- AddressParts a = gen_lea_modrm_0(env, s, modrm);
+ AddressParts a = gen_lea_modrm_0(env, s, modrm, false);
TCGv ea = gen_lea_modrm_1(s, a, false);
tcg_gen_extu_tl_i64(s->tmp1_i64, ea);
@@ -2428,7 +2428,7 @@ static bool disas_insn_x87(DisasContext *s, CPUState *cpu, int b)
op = ((b & 7) << 3) | ((modrm >> 3) & 7);
if (mod != 3) {
/* memory op */
- AddressParts a = gen_lea_modrm_0(env, s, modrm);
+ AddressParts a = gen_lea_modrm_0(env, s, modrm, false);
TCGv ea = gen_lea_modrm_1(s, a, false);
TCGv last_addr = tcg_temp_new();
bool update_fdp = true;
@@ -3089,7 +3089,7 @@ static void disas_insn_old(DisasContext *s, CPUState *cpu, int b)
rm = (modrm & 7) | REX_B(s);
gen_op_mov_v_reg(s, MO_32, s->T1, reg);
if (mod != 3) {
- AddressParts a = gen_lea_modrm_0(env, s, modrm);
+ AddressParts a = gen_lea_modrm_0(env, s, modrm, false);
/* specific case: we need to add a displacement */
gen_exts(ot, s->T1);
tcg_gen_sari_tl(s->tmp0, s->T1, 3 + ot);
@@ -3646,7 +3646,7 @@ static void disas_insn_old(DisasContext *s, CPUState *cpu, int b)
}
} else if (mod != 3) {
/* bndldx */
- AddressParts a = gen_lea_modrm_0(env, s, modrm);
+ AddressParts a = gen_lea_modrm_0(env, s, modrm, false);
if (reg >= 4
|| (prefixes & PREFIX_LOCK)
|| s->aflag == MO_16
@@ -3690,7 +3690,7 @@ static void disas_insn_old(DisasContext *s, CPUState *cpu, int b)
|| s->aflag == MO_16) {
goto illegal_op;
}
- AddressParts a = gen_lea_modrm_0(env, s, modrm);
+ AddressParts a = gen_lea_modrm_0(env, s, modrm, false);
if (a.base >= 0) {
tcg_gen_extu_tl_i64(cpu_bndl[reg], cpu_regs[a.base]);
if (!CODE64(s)) {
@@ -3751,7 +3751,7 @@ static void disas_insn_old(DisasContext *s, CPUState *cpu, int b)
}
} else if (mod != 3) {
/* bndstx */
- AddressParts a = gen_lea_modrm_0(env, s, modrm);
+ AddressParts a = gen_lea_modrm_0(env, s, modrm, false);
if (reg >= 4
|| (prefixes & PREFIX_LOCK)
|| s->aflag == MO_16
diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
index d2da1d396d..b22210f45d 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -1811,7 +1811,8 @@ static int decode_modrm(DisasContext *s, CPUX86State *env, X86DecodedInsn *decod
} else {
op->has_ea = true;
op->n = -1;
- decode->mem = gen_lea_modrm_0(env, s, get_modrm(s, env));
+ decode->mem = gen_lea_modrm_0(env, s, modrm,
+ decode->e.vex_class == 12);
}
return modrm;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PULL 2/6] qemu/osdep: Move close_all_open_fds() to oslib-posix
2024-08-05 0:31 [PULL 0/6] misc patch queue Richard Henderson
2024-08-05 0:31 ` [PULL 1/6] linux-user/elfload: Fix pr_pid values in core files Richard Henderson
2024-08-05 0:31 ` [PATCH for-9.1] target/i386: Fix VSIB decode Richard Henderson
@ 2024-08-05 0:31 ` Richard Henderson
2024-08-05 0:31 ` [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback Richard Henderson
` (4 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2024-08-05 0:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Clément Léger, Philippe Mathieu-Daudé
From: Clément Léger <cleger@rivosinc.com>
Move close_all_open_fds() in oslib-posix, rename it
qemu_close_all_open_fds() and export it.
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240802145423.3232974-2-cleger@rivosinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/qemu/osdep.h | 7 +++++++
system/async-teardown.c | 37 +------------------------------------
util/oslib-posix.c | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 36 deletions(-)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 720ed21a7e..de77c5c254 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -757,6 +757,13 @@ static inline void qemu_reset_optind(void)
int qemu_fdatasync(int fd);
+/**
+ * qemu_close_all_open_fd:
+ *
+ * Close all open file descriptors
+ */
+void qemu_close_all_open_fd(void);
+
/**
* Sync changes made to the memory mapped file back to the backing
* storage. For POSIX compliant systems this will fallback
diff --git a/system/async-teardown.c b/system/async-teardown.c
index 396963c091..edf49e1007 100644
--- a/system/async-teardown.c
+++ b/system/async-teardown.c
@@ -26,40 +26,6 @@
static pid_t the_ppid;
-/*
- * Close all open file descriptors.
- */
-static void close_all_open_fd(void)
-{
- struct dirent *de;
- int fd, dfd;
- DIR *dir;
-
-#ifdef CONFIG_CLOSE_RANGE
- int r = close_range(0, ~0U, 0);
- if (!r) {
- /* Success, no need to try other ways. */
- return;
- }
-#endif
-
- dir = opendir("/proc/self/fd");
- if (!dir) {
- /* If /proc is not mounted, there is nothing that can be done. */
- return;
- }
- /* Avoid closing the directory. */
- dfd = dirfd(dir);
-
- for (de = readdir(dir); de; de = readdir(dir)) {
- fd = atoi(de->d_name);
- if (fd != dfd) {
- close(fd);
- }
- }
- closedir(dir);
-}
-
static void hup_handler(int signal)
{
/* Check every second if this process has been reparented. */
@@ -85,9 +51,8 @@ static int async_teardown_fn(void *arg)
/*
* Close all file descriptors that might have been inherited from the
* main qemu process when doing clone, needed to make libvirt happy.
- * Not using close_range for increased compatibility with older kernels.
*/
- close_all_open_fd();
+ qemu_close_all_open_fd();
/* Set up a handler for SIGHUP and unblock SIGHUP. */
sigaction(SIGHUP, &sa, NULL);
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index b090fe0eed..1e867efa47 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -807,3 +807,37 @@ int qemu_msync(void *addr, size_t length, int fd)
return msync(addr, length, MS_SYNC);
}
+
+/*
+ * Close all open file descriptors.
+ */
+void qemu_close_all_open_fd(void)
+{
+ struct dirent *de;
+ int fd, dfd;
+ DIR *dir;
+
+#ifdef CONFIG_CLOSE_RANGE
+ int r = close_range(0, ~0U, 0);
+ if (!r) {
+ /* Success, no need to try other ways. */
+ return;
+ }
+#endif
+
+ dir = opendir("/proc/self/fd");
+ if (!dir) {
+ /* If /proc is not mounted, there is nothing that can be done. */
+ return;
+ }
+ /* Avoid closing the directory. */
+ dfd = dirfd(dir);
+
+ for (de = readdir(dir); de; de = readdir(dir)) {
+ fd = atoi(de->d_name);
+ if (fd != dfd) {
+ close(fd);
+ }
+ }
+ closedir(dir);
+}
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback
2024-08-05 0:31 [PULL 0/6] misc patch queue Richard Henderson
` (2 preceding siblings ...)
2024-08-05 0:31 ` [PULL 2/6] qemu/osdep: Move close_all_open_fds() to oslib-posix Richard Henderson
@ 2024-08-05 0:31 ` Richard Henderson
2024-08-28 12:48 ` Daniel P. Berrangé
2024-08-05 0:31 ` [PULL 4/6] net/tap: Factorize fd closing after forking Richard Henderson
` (3 subsequent siblings)
7 siblings, 1 reply; 14+ messages in thread
From: Richard Henderson @ 2024-08-05 0:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Clément Léger
From: Clément Léger <cleger@rivosinc.com>
In order to make it cleaner, split qemu_close_all_open_fd() logic into
multiple subfunctions (close with close_range(), with /proc/self/fd and
fallback).
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240802145423.3232974-3-cleger@rivosinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
util/oslib-posix.c | 50 ++++++++++++++++++++++++++++++++++------------
1 file changed, 37 insertions(+), 13 deletions(-)
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 1e867efa47..9b79fc7cff 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -808,27 +808,16 @@ int qemu_msync(void *addr, size_t length, int fd)
return msync(addr, length, MS_SYNC);
}
-/*
- * Close all open file descriptors.
- */
-void qemu_close_all_open_fd(void)
+static bool qemu_close_all_open_fd_proc(void)
{
struct dirent *de;
int fd, dfd;
DIR *dir;
-#ifdef CONFIG_CLOSE_RANGE
- int r = close_range(0, ~0U, 0);
- if (!r) {
- /* Success, no need to try other ways. */
- return;
- }
-#endif
-
dir = opendir("/proc/self/fd");
if (!dir) {
/* If /proc is not mounted, there is nothing that can be done. */
- return;
+ return false;
}
/* Avoid closing the directory. */
dfd = dirfd(dir);
@@ -840,4 +829,39 @@ void qemu_close_all_open_fd(void)
}
}
closedir(dir);
+
+ return true;
+}
+
+static bool qemu_close_all_open_fd_close_range(void)
+{
+#ifdef CONFIG_CLOSE_RANGE
+ int r = close_range(0, ~0U, 0);
+ if (!r) {
+ /* Success, no need to try other ways. */
+ return true;
+ }
+#endif
+ return false;
+}
+
+static void qemu_close_all_open_fd_fallback(void)
+{
+ int open_max = sysconf(_SC_OPEN_MAX), i;
+
+ /* Fallback */
+ for (i = 0; i < open_max; i++) {
+ close(i);
+ }
+}
+
+/*
+ * Close all open file descriptors.
+ */
+void qemu_close_all_open_fd(void)
+{
+ if (!qemu_close_all_open_fd_close_range() &&
+ !qemu_close_all_open_fd_proc()) {
+ qemu_close_all_open_fd_fallback();
+ }
}
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PULL 4/6] net/tap: Factorize fd closing after forking
2024-08-05 0:31 [PULL 0/6] misc patch queue Richard Henderson
` (3 preceding siblings ...)
2024-08-05 0:31 ` [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback Richard Henderson
@ 2024-08-05 0:31 ` Richard Henderson
2024-08-05 0:31 ` [PULL 5/6] qemu/osdep: Add excluded fd parameter to qemu_close_all_open_fd() Richard Henderson
` (2 subsequent siblings)
7 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2024-08-05 0:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Clément Léger, Philippe Mathieu-Daudé
From: Clément Léger <cleger@rivosinc.com>
The same code is used twice to actually close all open file descriptors
after forking. Factorize it in a single place.
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240802145423.3232974-4-cleger@rivosinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
net/tap.c | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/net/tap.c b/net/tap.c
index 51f7aec39d..7b2d5d5703 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -385,6 +385,17 @@ static TAPState *net_tap_fd_init(NetClientState *peer,
return s;
}
+static void close_all_fds_after_fork(int excluded_fd)
+{
+ int open_max = sysconf(_SC_OPEN_MAX), i;
+
+ for (i = 3; i < open_max; i++) {
+ if (i != excluded_fd) {
+ close(i);
+ }
+ }
+}
+
static void launch_script(const char *setup_script, const char *ifname,
int fd, Error **errp)
{
@@ -400,13 +411,7 @@ static void launch_script(const char *setup_script, const char *ifname,
return;
}
if (pid == 0) {
- int open_max = sysconf(_SC_OPEN_MAX), i;
-
- for (i = 3; i < open_max; i++) {
- if (i != fd) {
- close(i);
- }
- }
+ close_all_fds_after_fork(fd);
parg = args;
*parg++ = (char *)setup_script;
*parg++ = (char *)ifname;
@@ -490,17 +495,11 @@ static int net_bridge_run_helper(const char *helper, const char *bridge,
return -1;
}
if (pid == 0) {
- int open_max = sysconf(_SC_OPEN_MAX), i;
char *fd_buf = NULL;
char *br_buf = NULL;
char *helper_cmd = NULL;
- for (i = 3; i < open_max; i++) {
- if (i != sv[1]) {
- close(i);
- }
- }
-
+ close_all_fds_after_fork(sv[1]);
fd_buf = g_strdup_printf("%s%d", "--fd=", sv[1]);
if (strrchr(helper, ' ') || strrchr(helper, '\t')) {
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PULL 5/6] qemu/osdep: Add excluded fd parameter to qemu_close_all_open_fd()
2024-08-05 0:31 [PULL 0/6] misc patch queue Richard Henderson
` (4 preceding siblings ...)
2024-08-05 0:31 ` [PULL 4/6] net/tap: Factorize fd closing after forking Richard Henderson
@ 2024-08-05 0:31 ` Richard Henderson
2024-08-05 0:31 ` [PULL 6/6] net/tap: Use qemu_close_all_open_fd() Richard Henderson
2024-08-05 21:59 ` [PULL 0/6] misc patch queue Richard Henderson
7 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2024-08-05 0:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Clément Léger
From: Clément Léger <cleger@rivosinc.com>
In order for this function to be usable by tap.c code, add a list of
file descriptors that should not be closed.
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Message-ID: <20240802145423.3232974-5-cleger@rivosinc.com>
[rth: Use max_fd in qemu_close_all_open_fd_close_range]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/qemu/osdep.h | 8 +++-
system/async-teardown.c | 2 +-
util/oslib-posix.c | 98 ++++++++++++++++++++++++++++++++++-------
3 files changed, 89 insertions(+), 19 deletions(-)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index de77c5c254..4cc4c32b14 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -760,9 +760,13 @@ int qemu_fdatasync(int fd);
/**
* qemu_close_all_open_fd:
*
- * Close all open file descriptors
+ * Close all open file descriptors except the ones supplied in the @skip array
+ *
+ * @skip: ordered array of distinct file descriptors that should not be closed
+ * if any, or NULL.
+ * @nskip: number of entries in the @skip array or 0 if @skip is NULL.
*/
-void qemu_close_all_open_fd(void);
+void qemu_close_all_open_fd(const int *skip, unsigned int nskip);
/**
* Sync changes made to the memory mapped file back to the backing
diff --git a/system/async-teardown.c b/system/async-teardown.c
index edf49e1007..9148ee8d04 100644
--- a/system/async-teardown.c
+++ b/system/async-teardown.c
@@ -52,7 +52,7 @@ static int async_teardown_fn(void *arg)
* Close all file descriptors that might have been inherited from the
* main qemu process when doing clone, needed to make libvirt happy.
*/
- qemu_close_all_open_fd();
+ qemu_close_all_open_fd(NULL, 0);
/* Set up a handler for SIGHUP and unblock SIGHUP. */
sigaction(SIGHUP, &sa, NULL);
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 9b79fc7cff..11b35e48fb 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -808,11 +808,12 @@ int qemu_msync(void *addr, size_t length, int fd)
return msync(addr, length, MS_SYNC);
}
-static bool qemu_close_all_open_fd_proc(void)
+static bool qemu_close_all_open_fd_proc(const int *skip, unsigned int nskip)
{
struct dirent *de;
int fd, dfd;
DIR *dir;
+ unsigned int skip_start = 0, skip_end = nskip;
dir = opendir("/proc/self/fd");
if (!dir) {
@@ -823,8 +824,33 @@ static bool qemu_close_all_open_fd_proc(void)
dfd = dirfd(dir);
for (de = readdir(dir); de; de = readdir(dir)) {
+ bool close_fd = true;
+
+ if (de->d_name[0] == '.') {
+ continue;
+ }
fd = atoi(de->d_name);
- if (fd != dfd) {
+ if (fd == dfd) {
+ continue;
+ }
+
+ for (unsigned int i = skip_start; i < skip_end; i++) {
+ if (fd < skip[i]) {
+ /* We are below the next skipped fd, break */
+ break;
+ } else if (fd == skip[i]) {
+ close_fd = false;
+ /* Restrict the range as we found fds matching start/end */
+ if (i == skip_start) {
+ skip_start++;
+ } else if (i == skip_end) {
+ skip_end--;
+ }
+ break;
+ }
+ }
+
+ if (close_fd) {
close(fd);
}
}
@@ -833,24 +859,60 @@ static bool qemu_close_all_open_fd_proc(void)
return true;
}
-static bool qemu_close_all_open_fd_close_range(void)
+static bool qemu_close_all_open_fd_close_range(const int *skip,
+ unsigned int nskip,
+ int open_max)
{
#ifdef CONFIG_CLOSE_RANGE
- int r = close_range(0, ~0U, 0);
- if (!r) {
- /* Success, no need to try other ways. */
- return true;
- }
-#endif
+ int max_fd = open_max - 1;
+ int first = 0, last;
+ unsigned int cur_skip = 0;
+ int ret;
+
+ do {
+ /* Find the start boundary of the range to close */
+ while (cur_skip < nskip && first == skip[cur_skip]) {
+ cur_skip++;
+ first++;
+ }
+
+ /* Find the upper boundary of the range to close */
+ last = max_fd;
+ if (cur_skip < nskip) {
+ last = skip[cur_skip] - 1;
+ last = MIN(last, max_fd);
+ }
+
+ /* With the adjustments to the range, we might be done. */
+ if (first > last) {
+ break;
+ }
+
+ ret = close_range(first, last, 0);
+ if (ret < 0) {
+ return false;
+ }
+
+ first = last + 1;
+ } while (last < max_fd);
+
+ return true;
+#else
return false;
+#endif
}
-static void qemu_close_all_open_fd_fallback(void)
+static void qemu_close_all_open_fd_fallback(const int *skip, unsigned int nskip,
+ int open_max)
{
- int open_max = sysconf(_SC_OPEN_MAX), i;
+ unsigned int cur_skip = 0;
/* Fallback */
- for (i = 0; i < open_max; i++) {
+ for (int i = 0; i < open_max; i++) {
+ if (cur_skip < nskip && i == skip[cur_skip]) {
+ cur_skip++;
+ continue;
+ }
close(i);
}
}
@@ -858,10 +920,14 @@ static void qemu_close_all_open_fd_fallback(void)
/*
* Close all open file descriptors.
*/
-void qemu_close_all_open_fd(void)
+void qemu_close_all_open_fd(const int *skip, unsigned int nskip)
{
- if (!qemu_close_all_open_fd_close_range() &&
- !qemu_close_all_open_fd_proc()) {
- qemu_close_all_open_fd_fallback();
+ int open_max = sysconf(_SC_OPEN_MAX);
+
+ assert(skip != NULL || nskip == 0);
+
+ if (!qemu_close_all_open_fd_close_range(skip, nskip, open_max) &&
+ !qemu_close_all_open_fd_proc(skip, nskip)) {
+ qemu_close_all_open_fd_fallback(skip, nskip, open_max);
}
}
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PULL 6/6] net/tap: Use qemu_close_all_open_fd()
2024-08-05 0:31 [PULL 0/6] misc patch queue Richard Henderson
` (5 preceding siblings ...)
2024-08-05 0:31 ` [PULL 5/6] qemu/osdep: Add excluded fd parameter to qemu_close_all_open_fd() Richard Henderson
@ 2024-08-05 0:31 ` Richard Henderson
2024-08-05 21:59 ` [PULL 0/6] misc patch queue Richard Henderson
7 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2024-08-05 0:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Clément Léger
From: Clément Léger <cleger@rivosinc.com>
Instead of using a slow implementation to close all open fd after
forking, use qemu_close_all_open_fd().
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240802145423.3232974-6-cleger@rivosinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
net/tap.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/net/tap.c b/net/tap.c
index 7b2d5d5703..3f90022c0b 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -387,13 +387,20 @@ static TAPState *net_tap_fd_init(NetClientState *peer,
static void close_all_fds_after_fork(int excluded_fd)
{
- int open_max = sysconf(_SC_OPEN_MAX), i;
+ const int skip_fd[] = {STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO,
+ excluded_fd};
+ unsigned int nskip = ARRAY_SIZE(skip_fd);
- for (i = 3; i < open_max; i++) {
- if (i != excluded_fd) {
- close(i);
- }
+ /*
+ * skip_fd must be an ordered array of distinct fds, exclude
+ * excluded_fd if already included in the [STDIN_FILENO - STDERR_FILENO]
+ * range
+ */
+ if (excluded_fd <= STDERR_FILENO) {
+ nskip--;
}
+
+ qemu_close_all_open_fd(skip_fd, nskip);
}
static void launch_script(const char *setup_script, const char *ifname,
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH for-9.1] target/i386: Fix VSIB decode
2024-08-05 0:31 ` [PATCH for-9.1] target/i386: Fix VSIB decode Richard Henderson
@ 2024-08-05 12:10 ` Paolo Bonzini
0 siblings, 0 replies; 14+ messages in thread
From: Paolo Bonzini @ 2024-08-05 12:10 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel
> With normal SIB, index == 4 indicates no index.
> With VSIB, there is no exception for VR4/VR12.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2474
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Thanks very much, patch queued.
Paolo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 0/6] misc patch queue
2024-08-05 0:31 [PULL 0/6] misc patch queue Richard Henderson
` (6 preceding siblings ...)
2024-08-05 0:31 ` [PULL 6/6] net/tap: Use qemu_close_all_open_fd() Richard Henderson
@ 2024-08-05 21:59 ` Richard Henderson
7 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2024-08-05 21:59 UTC (permalink / raw)
To: qemu-devel
On 8/5/24 10:31, Richard Henderson wrote:
> The following changes since commit f9851d2ffef59b3a7f39513469263ab3b019480f:
>
> Merge tag 'migration-20240802-pull-request' ofhttps://gitlab.com/farosas/qemu into staging (2024-08-03 07:26:26 +1000)
>
> are available in the Git repository at:
>
> https://gitlab.com/rth7680/qemu.git tags/pull-misc-20240805
>
> for you to fetch changes up to 9996a35c6433c0e019a1c05791299db5e63a5db7:
>
> net/tap: Use qemu_close_all_open_fd() (2024-08-05 08:33:36 +1000)
>
> ----------------------------------------------------------------
> linux-user/elfload: Fix pr_pid values in core files
> util: Add qemu_close_all_open_fd
> net/tap: Use qemu_close_all_open_fd
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback
2024-08-05 0:31 ` [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback Richard Henderson
@ 2024-08-28 12:48 ` Daniel P. Berrangé
2024-08-28 13:09 ` Clément Léger
2024-08-28 22:47 ` Richard Henderson
0 siblings, 2 replies; 14+ messages in thread
From: Daniel P. Berrangé @ 2024-08-28 12:48 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, Clément Léger
This is already merged, but I have two comments - one improvement
and one bug which we should probably fix before release.
On Mon, Aug 05, 2024 at 10:31:26AM +1000, Richard Henderson wrote:
> From: Clément Léger <cleger@rivosinc.com>
>
> In order to make it cleaner, split qemu_close_all_open_fd() logic into
> multiple subfunctions (close with close_range(), with /proc/self/fd and
> fallback).
>
> Signed-off-by: Clément Léger <cleger@rivosinc.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Message-ID: <20240802145423.3232974-3-cleger@rivosinc.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> util/oslib-posix.c | 50 ++++++++++++++++++++++++++++++++++------------
> 1 file changed, 37 insertions(+), 13 deletions(-)
>
> diff --git a/util/oslib-posix.c b/util/oslib-posix.c
> index 1e867efa47..9b79fc7cff 100644
> --- a/util/oslib-posix.c
> +++ b/util/oslib-posix.c
> @@ -808,27 +808,16 @@ int qemu_msync(void *addr, size_t length, int fd)
> return msync(addr, length, MS_SYNC);
> }
>
> -/*
> - * Close all open file descriptors.
> - */
> -void qemu_close_all_open_fd(void)
> +static bool qemu_close_all_open_fd_proc(void)
> {
> struct dirent *de;
> int fd, dfd;
> DIR *dir;
>
> -#ifdef CONFIG_CLOSE_RANGE
> - int r = close_range(0, ~0U, 0);
> - if (!r) {
> - /* Success, no need to try other ways. */
> - return;
> - }
> -#endif
> -
> dir = opendir("/proc/self/fd");
IIUC from previous threads this is valid on Linux and on Solaris.
On FreeBSD & macOS, you need /dev/fd though.
> if (!dir) {
> /* If /proc is not mounted, there is nothing that can be done. */
> - return;
> + return false;
> }
> /* Avoid closing the directory. */
> dfd = dirfd(dir);
> @@ -840,4 +829,39 @@ void qemu_close_all_open_fd(void)
> }
> }
> closedir(dir);
> +
> + return true;
> +}
> +
> +static bool qemu_close_all_open_fd_close_range(void)
> +{
> +#ifdef CONFIG_CLOSE_RANGE
> + int r = close_range(0, ~0U, 0);
> + if (!r) {
> + /* Success, no need to try other ways. */
> + return true;
> + }
> +#endif
> + return false;
> +}
> +
> +static void qemu_close_all_open_fd_fallback(void)
> +{
> + int open_max = sysconf(_SC_OPEN_MAX), i;
> +
> + /* Fallback */
> + for (i = 0; i < open_max; i++) {
> + close(i);
> + }
I'm told that sysconf(_SC_OPEN_MAX) returns -1 on some versions of
macOS. "Luckily" since we assigned to 'int' rather than 'unsigned int'
this will result in us not closing any FDs in this fallback path,
rather than trying to close several billion FDs (an effective hang).
If _SC_OPEN_MAX returns -1, we should fallback to the OPEN_MAX
constant on macOS (see commit de448e0f26e710e9d2b7fc91393c40ac24b75847
which tackled a similar issue wrt getrlimit), and fallback to perhaps
a hardcoded 1024 on non-macOS.
> +}
> +
> +/*
> + * Close all open file descriptors.
> + */
> +void qemu_close_all_open_fd(void)
> +{
> + if (!qemu_close_all_open_fd_close_range() &&
> + !qemu_close_all_open_fd_proc()) {
> + qemu_close_all_open_fd_fallback();
> + }
> }
> --
> 2.43.0
>
>
With regards,
Daniel
[1] https://github.com/open-mpi/ompi/issues/10358
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback
2024-08-28 12:48 ` Daniel P. Berrangé
@ 2024-08-28 13:09 ` Clément Léger
2024-08-28 22:47 ` Richard Henderson
1 sibling, 0 replies; 14+ messages in thread
From: Clément Léger @ 2024-08-28 13:09 UTC (permalink / raw)
To: Daniel P. Berrangé, Richard Henderson; +Cc: qemu-devel
On 28/08/2024 14:48, Daniel P. Berrangé wrote:
> This is already merged, but I have two comments - one improvement
> and one bug which we should probably fix before release.
>
> On Mon, Aug 05, 2024 at 10:31:26AM +1000, Richard Henderson wrote:
>> From: Clément Léger <cleger@rivosinc.com>
>>
>> In order to make it cleaner, split qemu_close_all_open_fd() logic into
>> multiple subfunctions (close with close_range(), with /proc/self/fd and
>> fallback).
>>
>> Signed-off-by: Clément Léger <cleger@rivosinc.com>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> Message-ID: <20240802145423.3232974-3-cleger@rivosinc.com>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>> util/oslib-posix.c | 50 ++++++++++++++++++++++++++++++++++------------
>> 1 file changed, 37 insertions(+), 13 deletions(-)
>>
>> diff --git a/util/oslib-posix.c b/util/oslib-posix.c
>> index 1e867efa47..9b79fc7cff 100644
>> --- a/util/oslib-posix.c
>> +++ b/util/oslib-posix.c
>> @@ -808,27 +808,16 @@ int qemu_msync(void *addr, size_t length, int fd)
>> return msync(addr, length, MS_SYNC);
>> }
>>
>> -/*
>> - * Close all open file descriptors.
>> - */
>> -void qemu_close_all_open_fd(void)
>> +static bool qemu_close_all_open_fd_proc(void)
>> {
>> struct dirent *de;
>> int fd, dfd;
>> DIR *dir;
>>
>> -#ifdef CONFIG_CLOSE_RANGE
>> - int r = close_range(0, ~0U, 0);
>> - if (!r) {
>> - /* Success, no need to try other ways. */
>> - return;
>> - }
>> -#endif
>> -
>> dir = opendir("/proc/self/fd");
>
> IIUC from previous threads this is valid on Linux and on Solaris.
>
> On FreeBSD & macOS, you need /dev/fd though.
Acked.
>
>> if (!dir) {
>> /* If /proc is not mounted, there is nothing that can be done. */
>> - return;
>> + return false;
>> }
>> /* Avoid closing the directory. */
>> dfd = dirfd(dir);
>> @@ -840,4 +829,39 @@ void qemu_close_all_open_fd(void)
>> }
>> }
>> closedir(dir);
>> +
>> + return true;
>> +}
>> +
>> +static bool qemu_close_all_open_fd_close_range(void)
>> +{
>> +#ifdef CONFIG_CLOSE_RANGE
>> + int r = close_range(0, ~0U, 0);
>> + if (!r) {
>> + /* Success, no need to try other ways. */
>> + return true;
>> + }
>> +#endif
>> + return false;
>> +}
>> +
>> +static void qemu_close_all_open_fd_fallback(void)
>> +{
>> + int open_max = sysconf(_SC_OPEN_MAX), i;
>> +
>> + /* Fallback */
>> + for (i = 0; i < open_max; i++) {
>> + close(i);
>> + }
>
> I'm told that sysconf(_SC_OPEN_MAX) returns -1 on some versions of
> macOS. "Luckily" since we assigned to 'int' rather than 'unsigned int'
> this will result in us not closing any FDs in this fallback path,
> rather than trying to close several billion FDs (an effective hang).
>
> If _SC_OPEN_MAX returns -1, we should fallback to the OPEN_MAX
> constant on macOS (see commit de448e0f26e710e9d2b7fc91393c40ac24b75847
> which tackled a similar issue wrt getrlimit), and fallback to perhaps
> a hardcoded 1024 on non-macOS.
Thanks for catching this, I can submit these fixes except if you already
prepared something though.
Clément
>
>
>> +}
>> +
>> +/*
>> + * Close all open file descriptors.
>> + */
>> +void qemu_close_all_open_fd(void)
>> +{
>> + if (!qemu_close_all_open_fd_close_range() &&
>> + !qemu_close_all_open_fd_proc()) {
>> + qemu_close_all_open_fd_fallback();
>> + }
>> }
>> --
>> 2.43.0
>>
>>
>
> With regards,
> Daniel
>
> [1] https://github.com/open-mpi/ompi/issues/10358
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback
2024-08-28 12:48 ` Daniel P. Berrangé
2024-08-28 13:09 ` Clément Léger
@ 2024-08-28 22:47 ` Richard Henderson
2024-08-29 7:14 ` Daniel P. Berrangé
1 sibling, 1 reply; 14+ messages in thread
From: Richard Henderson @ 2024-08-28 22:47 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: qemu-devel, Clément Léger
On 8/28/24 22:48, Daniel P. Berrangé wrote:
>> dir = opendir("/proc/self/fd");
>
> IIUC from previous threads this is valid on Linux and on Solaris.
>
> On FreeBSD & macOS, you need /dev/fd though.
Fair, but importantly, it doesn't do anything *incorrect* those systems: it merely skips
this method with ENOENT.
>> + int open_max = sysconf(_SC_OPEN_MAX), i;
>> +
>> + /* Fallback */
>> + for (i = 0; i < open_max; i++) {
>> + close(i);
>> + }
>
> I'm told that sysconf(_SC_OPEN_MAX) returns -1 on some versions of
> macOS. "Luckily" since we assigned to 'int' rather than 'unsigned int'
> this will result in us not closing any FDs in this fallback path,
> rather than trying to close several billion FDs (an effective hang).
Ouch.
>
> If _SC_OPEN_MAX returns -1, we should fallback to the OPEN_MAX
> constant on macOS (see commit de448e0f26e710e9d2b7fc91393c40ac24b75847
> which tackled a similar issue wrt getrlimit), and fallback to perhaps
> a hardcoded 1024 on non-macOS.
I wish the timing on this had been better -- 25 minutes earlier and I would have delayed rc4.
Since macOS simply doesn't close fds, I'm of a mind to release 9.1.0 without this, and fix
it for 9.1.1. Thoughts?
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback
2024-08-28 22:47 ` Richard Henderson
@ 2024-08-29 7:14 ` Daniel P. Berrangé
0 siblings, 0 replies; 14+ messages in thread
From: Daniel P. Berrangé @ 2024-08-29 7:14 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel, Clément Léger
On Thu, Aug 29, 2024 at 08:47:27AM +1000, Richard Henderson wrote:
> On 8/28/24 22:48, Daniel P. Berrangé wrote:
> > > dir = opendir("/proc/self/fd");
> >
> > IIUC from previous threads this is valid on Linux and on Solaris.
> >
> > On FreeBSD & macOS, you need /dev/fd though.
>
> Fair, but importantly, it doesn't do anything *incorrect* those systems: it
> merely skips this method with ENOENT.
>
> > > + int open_max = sysconf(_SC_OPEN_MAX), i;
> > > +
> > > + /* Fallback */
> > > + for (i = 0; i < open_max; i++) {
> > > + close(i);
> > > + }
> >
> > I'm told that sysconf(_SC_OPEN_MAX) returns -1 on some versions of
> > macOS. "Luckily" since we assigned to 'int' rather than 'unsigned int'
> > this will result in us not closing any FDs in this fallback path,
> > rather than trying to close several billion FDs (an effective hang).
>
> Ouch.
>
> >
> > If _SC_OPEN_MAX returns -1, we should fallback to the OPEN_MAX
> > constant on macOS (see commit de448e0f26e710e9d2b7fc91393c40ac24b75847
> > which tackled a similar issue wrt getrlimit), and fallback to perhaps
> > a hardcoded 1024 on non-macOS.
>
> I wish the timing on this had been better -- 25 minutes earlier and I would have delayed rc4.
>
> Since macOS simply doesn't close fds, I'm of a mind to release 9.1.0 without
> this, and fix it for 9.1.1. Thoughts?
The original net/tap.c code for closing FDs has the same bug, so in that
area we do NOT have a regression.
The original async teardown code would fail to close FDs as it is looking
for close_range or /proc/$PID/fd, and has no sysconf fallback, so again
no regression there.
IOW, I think this is acceptable to fix in 9.1 stable.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-08-29 7:16 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-05 0:31 [PULL 0/6] misc patch queue Richard Henderson
2024-08-05 0:31 ` [PULL 1/6] linux-user/elfload: Fix pr_pid values in core files Richard Henderson
2024-08-05 0:31 ` [PATCH for-9.1] target/i386: Fix VSIB decode Richard Henderson
2024-08-05 12:10 ` Paolo Bonzini
2024-08-05 0:31 ` [PULL 2/6] qemu/osdep: Move close_all_open_fds() to oslib-posix Richard Henderson
2024-08-05 0:31 ` [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback Richard Henderson
2024-08-28 12:48 ` Daniel P. Berrangé
2024-08-28 13:09 ` Clément Léger
2024-08-28 22:47 ` Richard Henderson
2024-08-29 7:14 ` Daniel P. Berrangé
2024-08-05 0:31 ` [PULL 4/6] net/tap: Factorize fd closing after forking Richard Henderson
2024-08-05 0:31 ` [PULL 5/6] qemu/osdep: Add excluded fd parameter to qemu_close_all_open_fd() Richard Henderson
2024-08-05 0:31 ` [PULL 6/6] net/tap: Use qemu_close_all_open_fd() Richard Henderson
2024-08-05 21:59 ` [PULL 0/6] misc patch queue Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).