[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 0/2] spapr/nvram: Fix QEMU crash
From: |
Greg Kurz |
Subject: |
[PATCH v2 0/2] spapr/nvram: Fix QEMU crash |
Date: |
Wed, 12 Aug 2020 19:08:41 +0200 |
User-agent: |
StGit/0.21 |
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.
v2: - error out instead of increasing the partition size for the
sake of migration (Laurent)
- Cc'ing John Snow who reported the issue
---
Greg Kurz (2):
nvram: Add dry_run argument to chrp_nvram_create_system_partition()
spapr/nvram: Error out if NVRAM cannot contain all -prom-env data
hw/nvram/chrp_nvram.c | 34 +++++++++++++++++++++++-----------
hw/nvram/mac_nvram.c | 2 +-
hw/nvram/spapr_nvram.c | 18 +++++++++++++++++-
hw/sparc/sun4m.c | 2 +-
hw/sparc64/sun4u.c | 2 +-
include/hw/nvram/chrp_nvram.h | 3 ++-
6 files changed, 45 insertions(+), 16 deletions(-)
--
Greg
- [PATCH v2 0/2] spapr/nvram: Fix QEMU crash,
Greg Kurz <=