[PATCH 0/3] gdbstub: Protect gdb_handlesig() with EXCLUSIVE_GUARD()

Ilya Leoshkevich posted 3 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250113134658.68376-1-iii@linux.ibm.com
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Laurent Vivier <laurent@vivier.eu>
bsd-user/main.c       |  2 ++
gdbstub/user.c        |  2 ++
include/hw/core/cpu.h | 11 +++++++++++
linux-user/main.c     |  2 ++
linux-user/syscall.c  |  1 +
5 files changed, 18 insertions(+)
[PATCH 0/3] gdbstub: Protect gdb_handlesig() with EXCLUSIVE_GUARD()
Posted by Ilya Leoshkevich 1 year ago
Hi,

I ran into the issue with only one thread being stopped on a
breakpoint hit [1] again [2]. While a proper solution to this includes
kicking all threads using a reserved host signal and parking them, and
is partially in review and partially in the works, this small series
resolves most of the problems that occur during a typical debugging
session. Furthermore, it is a subset of the ultimate solution and
therefore would not have to be reverted.

Best regards,
Ilya

[1] https://gitlab.com/qemu-project/qemu/-/issues/2465
[2] https://lore.kernel.org/qemu-devel/6d1171d8debb462f468bb47ff875e0e9db253b4e.camel@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-user/main.c     |  2 ++
 linux-user/syscall.c  |  1 +
 5 files changed, 18 insertions(+)

-- 
2.47.1