On Thu, 2025-07-10 at 16:50 -0600, Richard Henderson wrote:
> Avoid ubsan failure with clang-20,
> tcg.h:715:19: runtime error: applying non-zero offset 64 to null
> pointer
> by not using pointers.
>
> Cc: Ilya Leoshkevich
> Signed-off-by: Richard Henderson
l as subtracting NULL from NULL.
Signed-off-by: Ilya Leoshkevich
---
v1: https://lore.kernel.org/qemu-devel/20250618103555.2020-1-...@linux.ibm.com/
v1 -> v2: Also change the allocation check.
include/tcg/tcg.h | 9 -
tcg/tcg.c | 3 ++-
2 files changed, 6 insertions(+), 6 deletio
On Wed, 2025-06-18 at 12:35 +0200, Ilya Leoshkevich wrote:
> Clang 20.1.6 (Fedora 20.1.6-1.fc42)'s UBSAN complains:
>
> qemu/include/tcg/tcg.h:715:19: runtime error: applying non-zero
> offset 64 to null pointer
>
> The code uses NULL as pool's initial start a
he allocation.
Unfortunately C prohibits adding non-zero to NULL, even if the result
is not dereferenced.
Fix by using a dummy pool.
Signed-off-by: Ilya Leoshkevich
---
tcg/tcg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index d714ae2889c..afcc7ec8849 100
-sockets.c
@@ -1,5 +1,5 @@
/*
- * inet and unix socket functions for qemu
+ * inet socket functions for qemu
*
* (c) 2008 Gerd Hoffmann
*
Should we mention that static linking of this file is not supported?
With or without this:
Acked-by: Ilya Leoshkevich
On 2025-05-20 15:50, Michael Tokarev wrote:
07.02.2025 18:31, Alex Bennée wrote:
From: Ilya Leoshkevich
In case an emulated process execve()s another emulated process, bind()
will fail, because the socket already exists. So try deleting it. Use
the existing unix_listen() function which does
o make the build work:
* -Wno-parentheses-equality
* -Wno-unused-value
* -Wno-tautological-unsigned-enum-zero-compare
* -Wno-tautological-compare
Reported-by: Peter Maydell
Closes: https://gitlab.com/qemu-project/qemu/-/issues/2970
Reviewed-by: Peter Maydell
Signed-off-by: Ilya Leoshkevich
---
k:
* -Wno-parentheses-equality
* -Wno-unused-value
* -Wno-tautological-unsigned-enum-zero-compare
* -Wno-tautological-compare
Reported-by: Peter Maydell
Closes: https://gitlab.com/qemu-project/qemu/-/issues/2970
Signed-off-by: Ilya Leoshkevich
---
tcg/perf.c | 2 +-
1 file changed, 1 insertion(+),
On 2025-04-15 10:12, Jim Shu wrote:
'CPUTLBEntryFull.xlat_section' stores section_index in last 12 bits to
find the correct section when CPU access the IO region over the IOTLB
(iotlb_to_section()).
However, section_index is only unique inside single AddressSpace. If
address space translation is
: fccb744f41c6 ("gdbstub: Try unlinking the unix socket before binding")
Signed-off-by: Ilya Leoshkevich
---
stubs/meson.build | 2 +-
stubs/monitor-fd.c | 9 -
2 files changed, 1 insertion(+), 10 deletions(-)
delete mode 100644 stubs/monitor-fd.c
diff --git a/stubs/meson.build b/stubs/m
On Mon, 2024-08-19 at 16:22 +0100, Peter Maydell wrote:
> On Tue, 23 Jul 2024 at 11:59, Michael S. Tsirkin
> wrote:
> >
> > From: Salil Mehta
> >
> > Virtual CPU Hot-unplug leads to unrealization of a CPU object. This
> > also
> > involves destruction of the CPU AddressSpace. Add common functio
On Tue, 2025-01-28 at 10:56 +0100, David Hildenbrand wrote:
> On 28.01.25 01:12, Ilya Leoshkevich wrote:
> > Node.js crashes in qemu-system-s390x with random SIGSEGVs /
> > SIGILLs.
> >
> > The v8 JIT used by Node.js can garbage collect and overwrite unused
> >
new code. This
quickly leads to either a SIGSEGV or a SIGILL in case the old code
ends in the middle of a new instruction.
Fix by passing the true size.
Reported-by: Berthold Gunreben
Cc: Sarah Kriesch
Cc: qemu-sta...@nongnu.org
Closes: https://bugzilla.opensuse.org/show_bug.cgi?id=1235709
Sign
Add a small test to prevent regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.softmmu-target | 1 +
tests/tcg/s390x/mvc-smc.c | 82 +
2 files changed, 83 insertions(+)
create mode 100644 tests/tcg/s390x/mvc-smc.c
diff --git a
/replay mutex, like it's done in
pause_all_vcpus().
Signed-off-by: Ilya Leoshkevich
---
hw/s390x/s390-virtio-ccw.c | 24 +++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 38aeba14eeb..e2386910f78 1
lved by calling
translator_io_start(). On s390x one uses IF_IO in order to make this
call happen automatically.
Signed-off-by: Ilya Leoshkevich
---
target/s390x/tcg/insn-data.h.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-d
gdbstub needs target_to_host_signal(), so move its declaration to a
public header.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal-common.h | 1 -
bsd-user/signal.c | 1 +
include/user/signal.h | 23
ly
compile-tested on the BSDs.
If this series is accepted, I will rebase the all-stop series on top
of it.
Best regards,
Ilya
Ilya Leoshkevich (8):
gdbstub: Allow the %d placeholder in the socket path
gdbstub: Try unlinking the unix socket before binding
user: Introduce user/signal.h
Reviewed-by: Alex Bennée
Signed-off-by: Ilya Leoshkevich
---
docs/user/main.rst | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/docs/user/main.rst b/docs/user/main.rst
index 80a77f0a0c9..9a1c60448c5 100644
--- a/docs/user/main.rst
+++ b/docs/user/main.rst
ding
disturbing poorly written guests.
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal.c | 12
include/user/signal.h | 2 ++
linux-user/signal.c | 25 -
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/bsd-user
Add a function for sending signals to individual threads. It does not make
sense on Windows, so do not provide an implementation, so that if someone
uses it by accident, they will get a linker error.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
() the GDB socket.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/gdbstub/user.c b/gdbstub/user.c
index c2bdfc3d491..fd29d595f40 100644
--- a/gdbstub/user.c
+++ b/gdbstub
handle this in do_execv(): deleting
gdbserver_user_state.socket_path before safe_execve() is not correct,
because the latter may fail, and afterwards we may lose control.
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 29 +++--
stubs/meson.build | 2 ++
stubs
result of this gdb_handlesig() invocation is handled, as opposed to
many other existing call sites. These other call sites probably need to
be fixed separately.
Signed-off-by: Ilya Leoshkevich
---
bsd-user/main.c | 1 -
gdbstub/user.c| 115
Add a small test to prevent regressions.
Make sure that host_interrupt_signal is not visible to the guest.
Reviewed-by: Alex Bennée
Signed-off-by: Ilya Leoshkevich
---
tests/guest-debug/run-test.py | 15 ++--
tests/tcg/multiarch/Makefile.target| 9 -
tests/tcg
These similarly named functions serve different purposes; add
docstrings to highlight them.
Suggested-by: Alex Bennée
Signed-off-by: Ilya Leoshkevich
---
accel/tcg/cpu-exec.c | 15 ++-
include/tcg/tcg.h| 41 +
2 files changed, 55
y: Richard Henderson
Signed-off-by: Ilya Leoshkevich
---
accel/tcg/translate-all.c | 27 ++-
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 453eb20ec95..7ec1c53f240 100644
--- a/accel/tcg/transla
On Thu, 2025-01-16 at 15:41 +, Peter Maydell wrote:
> On Thu, 16 Jan 2025 at 15:40, Alex Bennée
> wrote:
> >
> > Richard Henderson writes:
> >
> > > On 1/16/25 07:06, Ilya Leoshkevich wrote:
> > > > On Thu, 2025-01-16 at 06:54 -0800, Richar
On Thu, 2025-01-16 at 06:54 -0800, Richard Henderson wrote:
> On 1/15/25 15:20, Ilya Leoshkevich wrote:
> > Currently single-insn TBs created from I/O memory are not added to
> > region_trees. Therefore, when they generate exceptions, they are
> > not
> > handled b
On Thu, 2025-01-16 at 11:06 +, Peter Maydell wrote:
> On Thu, 16 Jan 2025 at 10:52, Alex Bennée
> wrote:
> >
> > Ilya Leoshkevich writes:
> >
> > > On Wed, 2025-01-15 at 16:08 -0800, Richard Henderson wrote:
> > > > On 1/15/25 15:20, Ilya Leosh
On Wed, 2025-01-15 at 16:08 -0800, Richard Henderson wrote:
> On 1/15/25 15:20, Ilya Leoshkevich wrote:
> > Currently single-insn TBs created from I/O memory are not added to
> > region_trees. Therefore, when they generate exceptions, they are
> > not
> > handled b
On Wed, 2025-01-15 at 15:36 +0100, Arusekk via wrote:
> This commit adds support for the `prctl(PR_SET_SYSCALL_DISPATCH)`
> function in the Linux userspace emulator.
Typo: this should be PR_SET_SYSCALL_USER_DISPATCH.
> It is implemented as a fully host-independent function, by forcing a
> SIGSYS
uncontrollably.
Co-developed-by: Nina Schoetterl-Glausch
Signed-off-by: Ilya Leoshkevich
---
accel/tcg/translate-all.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 453eb20ec95..602813e 100644
aro.org>
> Reviewed-by: Pierrick Bouvier
> Signed-off-by: Alex Bennée
> Acked-by: Ilya Leoshkevich
Apparently the BSD code needs to be adjusted:
../qemu/bsd-user/main.c:631:32: error: too few arguments to function
call, expected 2, have 1
631 | gdbserver_start(gdbstub);
On Fri, 2025-01-10 at 00:43 +0100, Ilya Leoshkevich wrote:
> On Thu, 2025-01-02 at 19:25 +0100, Philippe Mathieu-Daudé wrote:
> > Commit bb6cf6f0168 ("accel/tcg: Factor tcg_cpu_reset_hold()
> > out") wanted to restrict tlb_flush() to system emulation,
> > bu
/6d1171d8debb462f468bb47ff875e0e9db253b4e.ca...@linux.ibm.com/
Ilya Leoshkevich (3):
cpu: Set current_cpu early in qemu-user
cpu: Introduce EXCLUSIVE_GUARD()
gdbstub: Protect gdb_handlesig() with EXCLUSIVE_GUARD()
bsd-user/main.c | 2 ++
gdbstub/user.c| 2 ++
include/hw/core/cpu.h | 11 +++
linux
If multiple threads hit a breakpoint at the same time, GDB gets
confused [1]. Prevent this situation by stopping the other threads once
a thread hits a breakpoint.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=32023
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 2 ++
1 file
gdb_handlesig() uses current_cpu.
Signed-off-by: Ilya Leoshkevich
---
bsd-user/main.c | 2 ++
linux-user/main.c| 2 ++
linux-user/syscall.c | 1 +
3 files changed, 5 insertions(+)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 0a5bc578365..aa052e515c9 100644
--- a/bsd-user
Add a macro that produces a start_exclusive() / end_exclusive() pair.
Useful to guarantee an exit from an exclusive section in large
functions.
Signed-off-by: Ilya Leoshkevich
---
include/hw/core/cpu.h | 11 +++
1 file changed, 11 insertions(+)
diff --git a/include/hw/core/cpu.h b
handle this in do_execv(): deleting
gdbserver_user_state.socket_path before safe_execve() is not correct,
because the latter may fail, and afterwards we may lose control.
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 24 +---
stubs/meson.build | 2 ++
stubs/monitor
result of this gdb_handlesig() invocation is handled, as opposed to
many other existing call sites. These other call sites probably need to
be fixed separately.
Signed-off-by: Ilya Leoshkevich
---
bsd-user/main.c | 1 -
gdbstub/user.c| 122
pted, I will rebase the all-stop series on top
of it.
Patch 6 is the implementation, patch 7 is a documentation update,
patch 8 is a test. I tested this series on Linux and only
compile-tested on the BSDs.
Best regards,
Ilya
Ilya Leoshkevich (8):
gdbstub: Allow the %d placeholder in the socket p
Reviewed-by: Alex Bennée
Signed-off-by: Ilya Leoshkevich
---
docs/user/main.rst | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/docs/user/main.rst b/docs/user/main.rst
index 7a126ee8093..8dcb1d90a8b 100644
--- a/docs/user/main.rst
+++ b/docs/user/main.rst
Add a small test to prevent regressions.
Make sure that host_interrupt_signal is not visible to the guest.
Reviewed-by: Alex Bennée
Signed-off-by: Ilya Leoshkevich
---
tests/guest-debug/run-test.py | 15 ++--
tests/tcg/multiarch/Makefile.target| 9 -
tests/tcg
Add a function for sending signals to individual threads. It does not make
sense on Windows, so do not provide an implementation, so that if someone
uses it by accident, they will get a linker error.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
() the GDB socket.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/gdbstub/user.c b/gdbstub/user.c
index 0b4bfa9c488..ef52f249ce9 100644
--- a/gdbstub/user.c
+++ b/gdbstub
ding
disturbing poorly written guests.
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal.c | 12
include/user/signal.h | 2 ++
linux-user/signal.c | 25 -
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/bsd-user
gdbstub needs target_to_host_signal(), so move its declaration to a
public header.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal-common.h | 1 -
bsd-user/signal.c | 1 +
include/user/signal.h | 23
On Fri, 2025-01-10 at 11:33 +, Daniel P. Berrangé wrote:
> On Wed, Jan 08, 2025 at 09:04:56PM +0100, Ilya Leoshkevich wrote:
> > Use g_strcmp0(), so that NULL is considered an invalid parameter
> > value.
>
> Why are we calling qapi_bool_parse with a NULL value in the
On Fri, 2024-12-27 at 18:04 +0100, Dominik 'Disconnect3d' Czarnota
wrote:
> From: disconnect3d
>
> This commit fixes an incorrect format string for formatting integers
> provided to GDB when debugging a target run in QEMU user mode.
>
> The correct format is hexadecimal for both success and errn
On Thu, 2025-01-02 at 19:25 +0100, Philippe Mathieu-Daudé wrote:
> Commit bb6cf6f0168 ("accel/tcg: Factor tcg_cpu_reset_hold()
> out") wanted to restrict tlb_flush() to system emulation,
> but inadvertently also restricted tcg_flush_jmp_cache(),
> which was before called on user emulation via:
>
>
e Mathieu-Daudé
> ---
> accel/tcg/internal-common.h | 1 +
> accel/tcg/cpu-exec-common.c | 6 ++
> accel/tcg/tcg-accel-ops.c | 4 ++--
> 3 files changed, 9 insertions(+), 2 deletions(-)
Reviewed-by: Ilya Leoshkevich
gned-off-by: Philippe Mathieu-Daudé
> ---
> linux-user/user-internals.h | 1 -
> linux-user/mmap.c | 1 +
> linux-user/syscall.c | 1 +
> 3 files changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Ilya Leoshkevich
result of this gdb_handlesig() invocation is handled, as opposed to
many other existing call sites. These other call sites probably need to
be fixed separately.
Signed-off-by: Ilya Leoshkevich
---
bsd-user/main.c | 1 -
gdbstub/user.c| 118
Add a small test to prevent regressions.
Make sure that host_interrupt_signal is not visible to the guest.
Reviewed-by: Alex Bennée
Signed-off-by: Ilya Leoshkevich
---
tests/guest-debug/run-test.py | 15 ++--
tests/tcg/multiarch/Makefile.target| 9 -
tests/tcg
gdbstub needs target_to_host_signal(), so move its declaration to a
public header.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal-common.h | 1 -
bsd-user/signal.c | 1 +
include/user/signal.h | 23
before safe_execve() is not correct,
because the latter may fail, and afterwards we may lose control.
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 24 +---
1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/gdbstub/user.c b/gdbstub/user.c
index ef52f249ce9
Add a function for sending signals to individual threads. It does not make
sense on Windows, so do not provide an implementation, so that if someone
uses it by accident, they will get a linker error.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
() the GDB socket.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/gdbstub/user.c b/gdbstub/user.c
index 0b4bfa9c488..ef52f249ce9 100644
--- a/gdbstub/user.c
+++ b/gdbstub
e safe_syscall infrastructure, so the
changes are fairly simple.
If this series is accepted, I will rebase the all-stop series on top
of it.
Patch 6 is the implementation, patch 7 is a documentation update,
patch 8 is a test. I tested this series on Linux and only
compile-tested on the BSDs.
Best re
Reviewed-by: Alex Bennée
Signed-off-by: Ilya Leoshkevich
---
docs/user/main.rst | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/docs/user/main.rst b/docs/user/main.rst
index 7a126ee8093..8dcb1d90a8b 100644
--- a/docs/user/main.rst
+++ b/docs/user/main.rst
Use g_strcmp0(), so that NULL is considered an invalid parameter value.
Suggested-by: Alex Bennée
Signed-off-by: Ilya Leoshkevich
---
qapi/qapi-util.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c
index 65a7d184372
ding
disturbing poorly written guests.
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal.c | 12
include/user/signal.h | 2 ++
linux-user/signal.c | 25 -
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/bsd-user
/* failure will exit
via error_fatal */ everywhere is not optimal.
> Signed-off-by: Alex Bennée
> Cc: Ilya Leoshkevich
> ---
> include/exec/gdbstub.h | 8 +++-
> gdbstub/system.c | 22 +-
> gdbstub/user.c | 20 +
> linux-user/main.c
On Wed, 2025-01-08 at 17:20 +, Alex Bennée wrote:
> Ilya Leoshkevich writes:
>
> > Allow debugging individual processes in multi-process applications
> > by
> > starting them with export QEMU_GDB=/tmp/qemu-%d.sock,suspend=n.
> > Currently one would have to att
On Wed, 2025-01-08 at 15:56 +, Alex Bennée wrote:
> Ilya Leoshkevich writes:
>
> > Hi,
> >
> > On reporting a breakpoint in a non-non-stop mode, GDB remotes must
> > stop
> > all threads. Currently qemu-user doesn't do that, breaking the
>
On Wed, 2025-01-08 at 16:10 +, Alex Bennée wrote:
> Ilya Leoshkevich writes:
>
> > In case an emulated process execve()s another emulated process,
> > bind()
> > will fail, because the socket already exists. So try deleting it.
> >
> > Note that it is not
gt;
> Regards,
>
> Phil.
>
> Philippe Mathieu-Daudé (2):
> exec/translation-block: Include missing 'qemu/atomic.h' header
> qemu/coroutine: Include missing 'qemu/atomic.h' header
>
> include/exec/translation-block.h | 1 +
> include/qemu/coroutine.h | 1 +
> 2 files changed, 2 insertions(+)
Acked-by: Ilya Leoshkevich
is because Fedora does not have a cross-libc. Since console.c
already uses the SLOF libc implementation, add the respective headers
to the include path.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/s390x/Makefile.softmmu-target | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
Add a function for sending signals to individual threads. It does not make
sense on Windows, so do not provide an implementation, so that if someone
uses it by accident, they will get a linker error.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
() the GDB socket.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/gdbstub/user.c b/gdbstub/user.c
index 0b4bfa9c488..ef52f249ce9 100644
--- a/gdbstub/user.c
+++ b/gdbstub
gdbstub needs target_to_host_signal(), so move its declaration to a
public header.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal-common.h | 1 -
bsd-user/signal.c | 1 +
include/user/signal.h | 23
accepted, I will rebase the all-stop series on top
of it.
Patch 6 is the implementation, patch 7 is a documentation update,
patch 8 is a test. I tested this series on Linux and only
compile-tested on the BSDs.
Best regards,
Ilya
Ilya Leoshkevich (8):
gdbstub: Allow the %d placeholder in the socke
Signed-off-by: Ilya Leoshkevich
---
docs/user/main.rst | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/docs/user/main.rst b/docs/user/main.rst
index 7a126ee8093..8dcb1d90a8b 100644
--- a/docs/user/main.rst
+++ b/docs/user/main.rst
@@ -50,7 +50,7 @@ Command
ding
disturbing poorly written guests.
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal.c | 12
include/user/signal.h | 2 ++
linux-user/signal.c | 25 -
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/bsd-user
result of this gdb_handlesig() invocation is handled, as opposed to
many other existing call sites. These other call sites probably need to
be fixed separately.
Signed-off-by: Ilya Leoshkevich
---
bsd-user/main.c | 1 -
gdbstub/user.c| 120
Add a small test to prevent regressions.
Make sure that host_interrupt_signal is not visible to the guest.
Signed-off-by: Ilya Leoshkevich
---
tests/guest-debug/run-test.py | 15 ++--
tests/tcg/multiarch/Makefile.target| 9 -
tests/tcg/multiarch/gdbstub/late
fail, and afterwards we may lose control.
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdbstub/user.c b/gdbstub/user.c
index ef52f249ce9..c900d0a52fe 100644
--- a/gdbstub/user.c
+++ b/gdbstub/user.c
@@ -337,6 +337,7 @@ static int
On Mon, 2024-11-04 at 11:34 +, Richard Henderson wrote:
> On 10/29/24 23:29, Ilya Leoshkevich wrote:
> > On Thu, 2024-10-10 at 11:20 +0200, Paolo Bonzini wrote:
> > > On 10/10/24 10:58, Ilya Leoshkevich wrote:
> > > > make check-tcg fails on Fedora with the f
cutables are usually linked at offset 0 and are
> relocated somewhere during load. The hiaddr needs to
> be adjusted to keep the brk next to the executable.
>
> Cc: qemu-sta...@nongnu.org
> Fixes: 1f356e8c013 ("linux-user: Adjust initial brk when
> interpr
...@nongnu.org
Fixes: d971040c2d16 ("linux-user: Fix strace output for old_mmap")
Suggested-by: Richard Henderson
Signed-off-by: Ilya Leoshkevich
---
v1:
https://lore.kernel.org/qemu-devel/20241119211138.148806-1-...@linux.ibm.com/
v1 -> v2: Share the detection logic between syscall.c
("linux-user: Fix strace output for old_mmap")
Signed-off-by: Ilya Leoshkevich
---
linux-user/strace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index b70eadc19ef..50f41e746ec 100644
--- a/linux-user/strace.c
+++ b/linux-use
On Tue, 2024-10-22 at 13:37 +0200, Ilya Leoshkevich wrote:
> GDB 15 does not like exit() anymore:
>
> (gdb) python exit(0)
> Python Exception : 0
> Error occurred in Python: 0
>
> Use the GDB's own exit command, like it's already done in a couple
&g
Add a small test to prevent regressions.
Signed-off-by: Ilya Leoshkevich
---
tests/tcg/multiarch/Makefile.target | 3 ++
tests/tcg/multiarch/sigreturn-sigmask.c | 51 +
2 files changed, 54 insertions(+)
create mode 100644 tests/tcg/multiarch/sigreturn-sigmask.c
ssing, so I'm resending the test
with this issue fixed.
Best regards,
Ilya
Ilya Leoshkevich (1):
tests/tcg: Test that sigreturn() does not corrupt the signal mask
tests/tcg/multiarch/Makefile.target | 3 ++
tests/tcg/multiarch/sigreturn-sigmask.c | 51 +
2
Add a small test to prevent regressions.
Make sure that host_interrupt_signal is not visible to the guest.
Signed-off-by: Ilya Leoshkevich
---
tests/guest-debug/run-test.py | 15 ++--
tests/tcg/multiarch/Makefile.target| 9 -
tests/tcg/multiarch/gdbstub/late
gdbstub needs target_to_host_signal(), so move its declaration to a
public header.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal-common.h | 1 -
bsd-user/signal.c | 1 +
include/user/signal.h | 23
Add a function for sending signals to individual threads. It does not make
sense on Windows, so do not provide an implementation, so that if someone
uses it by accident, they will get a linker error.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
result of this gdb_handlesig() invocation is handled, as opposed to
many other existing call sites. These other call sites probably need to
be fixed separately.
Signed-off-by: Ilya Leoshkevich
---
bsd-user/main.c | 1 -
gdbstub/user.c| 120
Signed-off-by: Ilya Leoshkevich
---
docs/user/main.rst | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/docs/user/main.rst b/docs/user/main.rst
index 7a126ee8093..8dcb1d90a8b 100644
--- a/docs/user/main.rst
+++ b/docs/user/main.rst
@@ -50,7 +50,7 @@ Command
() the GDB socket.
Reviewed-by: Richard Henderson
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/gdbstub/user.c b/gdbstub/user.c
index 0b4bfa9c488..ef52f249ce9 100644
--- a/gdbstub/user.c
+++ b/gdbstub
fail, and afterwards we may lose control.
Signed-off-by: Ilya Leoshkevich
---
gdbstub/user.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdbstub/user.c b/gdbstub/user.c
index ef52f249ce9..c900d0a52fe 100644
--- a/gdbstub/user.c
+++ b/gdbstub/user.c
@@ -337,6 +337,7 @@ static int
documentation update,
patch 8 is a test. I tested this series on Linux and only
compile-tested on the BSDs.
Best regards,
Ilya
[1]
https://lore.kernel.org/qemu-devel/94ebebf2-e775-4fd2-8fcf-921610261...@linaro.org/
Ilya Leoshkevich (8):
gdbstub: Allow the %d placeholder in the socket path
ding
disturbing poorly written guests.
Reviewed-by: Warner Losh
Signed-off-by: Ilya Leoshkevich
---
bsd-user/signal.c | 12
include/user/signal.h | 2 ++
linux-user/signal.c | 25 -
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/bsd-user
On Tue, 2024-11-05 at 22:30 +, Richard Henderson wrote:
> On 11/5/24 15:50, Ilya Leoshkevich wrote:
> > On Tue, 2024-11-05 at 08:39 -0700, Warner Losh wrote:
> > > On Thu, Oct 24, 2024 at 2:00 PM Ilya Leoshkevich
> > >
> > > wrote:
> > > &g
On Tue, 2024-11-05 at 18:33 +0300, Michael Tokarev wrote:
> 04.11.2024 03:17, Nicholas Piggin wrote:
> > From: Ilya Leoshkevich
> >
> > This is like commit 86e6202a57b1 ("target/ppc: Make divw[u] handler
> > method decodetree compatible."), but for gen_
ons.
>
> Add and use the corresponding wrappers for setreuid and setregid
> which
> were missed in that commit.
>
> This fixes the build of the debian package of the uid_wrapper library
> (https://cwrap.org/uid_wrapper.html) when running linux-user.
>
> Signed-off-
On Tue, 2024-11-05 at 08:39 -0700, Warner Losh wrote:
> On Thu, Oct 24, 2024 at 2:00 PM Ilya Leoshkevich
> wrote:
> > Attaching to the gdbstub of a running process requires stopping its
> > threads. For threads that run on a CPU, cpu_exit() is enough, but
> > the
> >
On Thu, 2024-10-10 at 11:20 +0200, Paolo Bonzini wrote:
> On 10/10/24 10:58, Ilya Leoshkevich wrote:
> > make check-tcg fails on Fedora with the following error message:
> >
> > alpha-linux-gnu-gcc [...]
> > qemu/tests/tcg/multiarch/system/memory.c -o memory [.
tsig hsig count[,...]" syntax.
Target realtime signals [tsig,tsig+count) are mapped to host realtime
signals [hsig,hsig+count). Care is taken to avoid double and
out-of-range mappings.
Signed-off-by: Ilya Leoshkevich
---
linux-user/main.c | 12 +++-
linux-user/signal-common.h
1 - 100 of 1184 matches
Mail list logo