x86: Dom0 "broken ELF" reporting adjustments
PATCH v2 1/1 x86: Dom0 "broken ELF" reporting adjustments
elf_load_binary() isn't the primary source of brokenness being indicated. Therefore make the respective PVH log message there conditional (much like PV has it), and add another instance when elf_xen_parse() failed (again matching behavior in the PV case).
Make the PV side match the (new) use of %pd here.
Signed-off-by Jan Beulich <[email protected]>
---
v2: Use %pd and bring PV in line with that as well.
xen/arch/x86/hvm/dom0_build.c +4 -1
@@ -570,6 +570,8 @@ static int __init pvh_load_kernel(structif ( (rc =elf_xen_parse (&elf, &parms, true)) !=0 ) {printk ("Unable to parse kernel for ELFNOTES\n" ); +if (elf_check_broken (&elf) ) +printk ("%pd kernel: broken ELF: %s\n" , d,elf_check_broken (&elf));return rc; }
@@ -588,7 +590,8 @@ static int __init pvh_load_kernel(structif ( rc <0 ) {printk ("Failed to load kernel: %d\n" , rc); -printk ("Xen dom0 kernel broken ELF: %s\n" ,elf_check_broken (&elf)); +if (elf_check_broken (&elf) ) +printk ("%pd kernel: broken ELF: %s\n" , d,elf_check_broken (&elf));return rc; }
xen/arch/x86/pv/dom0_build.c +1 -2
@@ -1041,8 +1041,7 @@ int __init dom0_construct_pv(struct doma out:if (elf_check_broken (&elf) ) -printk (XENLOG_WARNING "Dom0 kernel broken ELF: %s\n" , -elf_check_broken (&elf)); +printk ("%pd kernel: broken ELF: %s\n" , d,elf_check_broken (&elf));return rc; }
Quoted 8 lines · Jan Beulich
elf_load_binary()isn't the primary source of brokenness being indicated. Therefore make the respective PVH log message there conditional (much like PV has it), and add another instance whenelf_xen_parse()failed (again matching behavior in the PV case).Make the PV side match the (new) use of %pd here.
Signed-off-by Jan Beulich <[email protected]>
Acked-by Andrew Cooper <[email protected]>