gdbstub/user.c | 30 +++++++++++++++++++++++++++--- stubs/meson.build | 2 -- util/meson.build | 2 -- 3 files changed, 27 insertions(+), 7 deletions(-)
Prior discussion is at https://lore.kernel.org/qemu-devel/ee091002-a552-49fe-ae5e-8916937dba15@tls.msk.ru/ In short: when adding unlink() before bind() for unix socket in gdbstub/user.c, a previous patch introduced dependency of linux-user binaries on qemu-sockets.c, which is more problematic for usually-static binaries. The monitor_get_fd stub which were also needed is another example why this might not be the right approach. This patchset reverts the previous commit (with fixes for current code), and adds just a single unlink() to the original code which handled unix sockets directly. Michael Tokarev (2): Revert "gdbstub: Try unlinking the unix socket before binding" gdbstub: unlink the unix socket before bind() gdbstub/user.c | 30 +++++++++++++++++++++++++++--- stubs/meson.build | 2 -- util/meson.build | 2 -- 3 files changed, 27 insertions(+), 7 deletions(-) -- 2.47.3
Michael Tokarev <mjt@tls.msk.ru> writes: > Prior discussion is at > https://lore.kernel.org/qemu-devel/ee091002-a552-49fe-ae5e-8916937dba15@tls.msk.ru/ > > In short: when adding unlink() before bind() for unix socket > in gdbstub/user.c, a previous patch introduced dependency of > linux-user binaries on qemu-sockets.c, which is more problematic > for usually-static binaries. The monitor_get_fd stub which were > also needed is another example why this might not be the right > approach. > > This patchset reverts the previous commit (with fixes for current > code), and adds just a single unlink() to the original code which > handled unix sockets directly. This isn't applying cleanly for me. Could you re-base please? > > Michael Tokarev (2): > Revert "gdbstub: Try unlinking the unix socket before binding" > gdbstub: unlink the unix socket before bind() > > gdbstub/user.c | 30 +++++++++++++++++++++++++++--- > stubs/meson.build | 2 -- > util/meson.build | 2 -- > 3 files changed, 27 insertions(+), 7 deletions(-) -- Alex Bennée Virtualisation Tech Lead @ Linaro
On 1/28/26 18:34, Alex Bennée wrote: > Michael Tokarev <mjt@tls.msk.ru> writes: > >> Prior discussion is at >> https://lore.kernel.org/qemu-devel/ee091002-a552-49fe-ae5e-8916937dba15@tls.msk.ru/ >> >> In short: when adding unlink() before bind() for unix socket >> in gdbstub/user.c, a previous patch introduced dependency of >> linux-user binaries on qemu-sockets.c, which is more problematic >> for usually-static binaries. The monitor_get_fd stub which were >> also needed is another example why this might not be the right >> approach. >> >> This patchset reverts the previous commit (with fixes for current >> code), and adds just a single unlink() to the original code which >> handled unix sockets directly. > > This isn't applying cleanly for me. Could you re-base please? It isn't applying cleanly because this patchset has been applied to the master branch already -- a2b429b114e1812e0b3f222818a2755b6d87fb8a and e916f8b3b68bd9da45245927e2a428c3a0eaea54 . HTH, /mjt
Michael Tokarev <mjt@tls.msk.ru> writes: > On 1/28/26 18:34, Alex Bennée wrote: >> Michael Tokarev <mjt@tls.msk.ru> writes: >> >>> Prior discussion is at >>> https://lore.kernel.org/qemu-devel/ee091002-a552-49fe-ae5e-8916937dba15@tls.msk.ru/ >>> >>> In short: when adding unlink() before bind() for unix socket >>> in gdbstub/user.c, a previous patch introduced dependency of >>> linux-user binaries on qemu-sockets.c, which is more problematic >>> for usually-static binaries. The monitor_get_fd stub which were >>> also needed is another example why this might not be the right >>> approach. >>> >>> This patchset reverts the previous commit (with fixes for current >>> code), and adds just a single unlink() to the original code which >>> handled unix sockets directly. >> This isn't applying cleanly for me. Could you re-base please? > > It isn't applying cleanly because this patchset has been applied > to the master branch already -- a2b429b114e1812e0b3f222818a2755b6d87fb8a > and e916f8b3b68bd9da45245927e2a428c3a0eaea54 . Ahh - I was confused as I had it on my list to get to. Sorry for the noise and thanks. > > HTH, > > /mjt -- Alex Bennée Virtualisation Tech Lead @ Linaro
On 12/25/25 07:29, Michael Tokarev wrote: > Prior discussion is at > https://lore.kernel.org/qemu-devel/ee091002-a552-49fe-ae5e-8916937dba15@tls.msk.ru/ > > In short: when adding unlink() before bind() for unix socket > in gdbstub/user.c, a previous patch introduced dependency of > linux-user binaries on qemu-sockets.c, which is more problematic > for usually-static binaries. The monitor_get_fd stub which were > also needed is another example why this might not be the right > approach. > > This patchset reverts the previous commit (with fixes for current > code), and adds just a single unlink() to the original code which > handled unix sockets directly. > > Michael Tokarev (2): > Revert "gdbstub: Try unlinking the unix socket before binding" > gdbstub: unlink the unix socket before bind() > > gdbstub/user.c | 30 +++++++++++++++++++++++++++--- > stubs/meson.build | 2 -- > util/meson.build | 2 -- > 3 files changed, 27 insertions(+), 7 deletions(-) Thanks! Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
© 2016 - 2026 Red Hat, Inc.