Re: [PATCH for-5.0] hw/ppc/e500.c: Handle qemu_find_file() failure

2020-03-25 Thread David Gibson
On Tue, Mar 24, 2020 at 12:12:16PM +, Peter Maydell wrote: > If qemu_find_file() doesn't find the BIOS it returns NULL; we were > passing that unchecked through to load_elf(), which assumes a non-NULL > pointer and may misbehave. In practice it fails with a weird message: > > $ qemu-system-p

Re: [PATCH for-5.0] hw/ppc/e500.c: Handle qemu_find_file() failure

2020-03-24 Thread Philippe Mathieu-Daudé
On 3/24/20 1:12 PM, Peter Maydell wrote: If qemu_find_file() doesn't find the BIOS it returns NULL; we were passing that unchecked through to load_elf(), which assumes a non-NULL pointer and may misbehave. In practice it fails with a weird message: $ qemu-system-ppc -M ppce500 -display none -

[PATCH for-5.0] hw/ppc/e500.c: Handle qemu_find_file() failure

2020-03-24 Thread Peter Maydell
If qemu_find_file() doesn't find the BIOS it returns NULL; we were passing that unchecked through to load_elf(), which assumes a non-NULL pointer and may misbehave. In practice it fails with a weird message: $ qemu-system-ppc -M ppce500 -display none -kernel nonesuch Bad address qemu-system-