qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] spapr/nvram: Fix QEMU crash
@ 2020-08-11 15:29 Greg Kurz
  2020-08-11 15:30 ` [PATCH 1/2] nvram: Add dry_run argument to chrp_nvram_create_system_partition() Greg Kurz
  2020-08-11 15:30 ` [PATCH 2/2] spapr/nvram: Allocate enough space for all -prom-env options Greg Kurz
  0 siblings, 2 replies; 7+ messages in thread
From: Greg Kurz @ 2020-08-11 15:29 UTC (permalink / raw)
  To: Thomas Huth
  Cc: qemu-devel, qemu-ppc, Mark Cave-Ayland, Laurent Vivier,
	David Gibson

This series fixes the following crash:

$ qemu-system-ppc64 -M pseries $(for ((x=0;x<128;x++)); do \
  echo -n " -prom-env "$(for ((y=0;y<1024;y++)); do echo -n x ; done) ; \
  done) # this requires ~128 Kib
malloc(): corrupted top size
Aborted (core dumped)

This also affects g3beige and mac99 machine types, and probably some
sparc/sparc64 machine types as well, but I prefer to leave the fixing
to knowledgeable people.

---

Greg Kurz (2):
      nvram: Add dry_run argument to chrp_nvram_create_system_partition()
      spapr/nvram: Allocate enough space for all -prom-env options


 hw/nvram/chrp_nvram.c         |   35 +++++++++++++++++++++++------------
 hw/nvram/mac_nvram.c          |    2 +-
 hw/nvram/spapr_nvram.c        |    7 ++++++-
 hw/sparc/sun4m.c              |    2 +-
 hw/sparc64/sun4u.c            |    2 +-
 include/hw/nvram/chrp_nvram.h |    3 ++-
 6 files changed, 34 insertions(+), 17 deletions(-)

--
Greg



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-11 17:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-11 15:29 [PATCH 0/2] spapr/nvram: Fix QEMU crash Greg Kurz
2020-08-11 15:30 ` [PATCH 1/2] nvram: Add dry_run argument to chrp_nvram_create_system_partition() Greg Kurz
2020-08-11 15:30 ` [PATCH 2/2] spapr/nvram: Allocate enough space for all -prom-env options Greg Kurz
2020-08-11 16:05   ` Laurent Vivier
2020-08-11 16:36     ` Greg Kurz
2020-08-11 17:27       ` Laurent Vivier
2020-08-11 17:47         ` Greg Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).