Skip to content

linux-user: Allow gdbstub to ignore page protection

Ilya Leoshkevich qemu-arm qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 2 repliesIn review
  2. v43 patches 3 repliesSuperseded
  3. v33 patches 7 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches2 repliesApplied
v13 patches3 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3linux-user: Allow gdbstub to ignore page protectioncpu-target.c+63 -150 replies
2/3tests/tcg: Factor out gdbstub test functionstests/guest-debug/run-test.py tests/guest-debug/test_gdbstub.py tests/tcg/aarch64/gdbstub/test-sve-ioctl.py +10 more+100 -3970 replies
3/3tests/tcg: Add the PROT_NONE gdbstub testtests/tcg/multiarch/Makefile.target tests/tcg/multiarch/gdbstub/prot-none.py tests/tcg/multiarch/prot-none.c+84 -10 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonAlex Bennée
1/3R-b
2/3R-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/3] linux-user: Allow gdbstub to ignore page protection

v4: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg05857.html
v4 -> v5: Fix the probe_proc_self_mem vs probe_proc_self_mem() typo.
Add Alex's R-b and A-b.

v3: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg02907.html
v3 -> v4: Hide InteractiveConsole behind QEMU_TEST_INTERACTIVE (Alex).
Probe /proc/self/mem in the PROT_NONE test.

v2: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg01592.html
v2 -> v3: Add Richard's R-b on [1/3].
Fix printing the architecture name and the number of failures in test_gdbstub.py.
Patches that need review: [2/3] and [3/3].

v1: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg01314.html
v1 -> v2: Use /proc/self/mem as a fallback. Handle TB invalidation
(Richard).
Test cross-page accesses.

RFC: https://lists.gnu.org/archive/html/qemu-devel/2023-12/msg02044.html
RFC -> v1: Use /proc/self/mem and accept that this will not work
without /proc.
Factor out a couple functions for gdbstub testing. Add a test.

Hi,

I've noticed that gdbstub behaves differently from gdbserver in that it doesn't allow reading non-readable pages. This series improves the situation by using the same mechanism as gdbserver: /proc/self/mem.

Best regards,
Ilya

Ilya Leoshkevich (3):
linux-user: Allow gdbstub to ignore page protection tests/tcg: Factor out gdbstub test functions tests/tcg: Add the PROT_NONE gdbstub test

 cpu-target.c                                  | 78 +++++++++++++++----
 tests/guest-debug/run-test.py                 |  7 +-
 tests/guest-debug/test_gdbstub.py             | 60 ++++++++++++++
 tests/tcg/aarch64/gdbstub/test-sve-ioctl.py   | 34 +-------
 tests/tcg/aarch64/gdbstub/test-sve.py         | 33 +-------
 tests/tcg/multiarch/Makefile.target           |  9 ++-
 tests/tcg/multiarch/gdbstub/interrupt.py      | 47 ++---------
 tests/tcg/multiarch/gdbstub/memory.py         | 41 +---------
 tests/tcg/multiarch/gdbstub/prot-none.py      | 36 +++++++++
 tests/tcg/multiarch/gdbstub/registers.py      | 41 ++--------
 tests/tcg/multiarch/gdbstub/sha1.py           | 40 ++--------
 .../multiarch/gdbstub/test-proc-mappings.py   | 39 +---------
 .../multiarch/gdbstub/test-qxfer-auxv-read.py | 37 +--------
 .../gdbstub/test-thread-breakpoint.py         | 37 +--------
 tests/tcg/multiarch/prot-none.c               | 40 ++++++++++
 tests/tcg/s390x/gdbstub/test-signals-s390x.py | 42 +---------
 tests/tcg/s390x/gdbstub/test-svc.py           | 39 +---------
 17 files changed, 247 insertions(+), 413 deletions(-)
 create mode 100644 tests/guest-debug/test_gdbstub.py
 create mode 100644 tests/tcg/multiarch/gdbstub/prot-none.py
 create mode 100644 tests/tcg/multiarch/prot-none.c
Signature · 1 line
2.43.0