Skip to content

hmp: Fix arg evaluation crash (regression)

Kevin Wolf qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hmp: Pass monitor to mon_get_cpu()include/monitor/hmp-target.h monitor/hmp.c monitor/misc.c +2 more+13 -130 replies
2/3hmp: Pass monitor to MonitorDef.get_value()include/monitor/hmp-target.h monitor/misc.c target/i386/monitor.c +2 more+17 -90 replies
3/3hmp: Pass monitor to mon_get_cpu_env()include/monitor/hmp-target.h monitor/misc.c target/i386/monitor.c +7 more+20 -200 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDr. David Alan Gilbert
SeriesR-b
1/3
2/3
3/3

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

Read the v1 thread

Cover letter [PATCH for-5.2 0/3] hmp: Fix arg evaluation crash (regression)

When I restricted the section where the current monitor is set to only the command handler, I missed that monitor_parse_arguments() can use it indirectly, too, when evaluating register variables. These cases get NULL now and crash (easy to reproduce with "x $pc").

This series passes the right monitor object down instead of using monitor_cur(), which fixes the crash.

Kevin Wolf (3):
hmp: Pass monitor to mon_get_cpu()
hmp: Pass monitor to MonitorDef.get_value()
hmp: Pass monitor to mon_get_cpu_env()

 include/monitor/hmp-target.h |  7 ++++---
 monitor/monitor-internal.h   |  2 +-
 monitor/hmp.c                |  2 +-
 monitor/misc.c               | 24 ++++++++++++------------
 target/i386/monitor.c        | 11 ++++++-----
 target/m68k/monitor.c        |  2 +-
 target/nios2/monitor.c       |  2 +-
 target/ppc/monitor.c         | 22 +++++++++++++---------
 target/riscv/monitor.c       |  2 +-
 target/sh4/monitor.c         |  2 +-
 target/sparc/monitor.c       | 12 +++++++-----
 target/xtensa/monitor.c      |  2 +-
 12 files changed, 49 insertions(+), 41 deletions(-)
Signature · 1 line
2.28.0