x86/PVH: Dom0 "broken ELF" reporting adjustments
PATCH 1/1 x86/PVH: Dom0 "broken ELF" reporting adjustments
elf_load_binary() isn't the primary source of brokenness being indicated. Therefore make the respective 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).
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 ("Xen dom0 kernel broken ELF: %s\n" ,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 ("Xen dom0 kernel broken ELF: %s\n" ,elf_check_broken (&elf));return rc; }
Quoted 10 lines · Jan Beulich
elf_load_binary()isn't the primary source of brokenness being indicated. Therefore make the respective log message there conditional (much like PV has it), and add another instance whenelf_xen_parse()failed (again matching behavior in the PV case).Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/hvm/dom0_build.c static int __init pvh_load_kernel(struct · line 574
Quoted 5 lines
xen/arch/x86/hvm/dom0_build.c +2
-0@@ -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 ("Xen dom0 kernel broken ELF: %s\n" ,elf_check_broken (&elf));
I would rather use "%pd: kernel broken ELF: %s\n", in case this gets used for loading more than dom0 in the dom0less case. The 'Xen' prefix is IMO useless here (I know it was here before).
Thanks, Roger.
Quoted 8 lines · Roger Pau Monné
Quoted 7 lines · Jan Beulich
elf_load_binary()isn't the primary source of brokenness being indicated. Therefore make the respective log message there conditional (much like PV has it), and add another instance whenelf_xen_parse()failed (again matching behavior in the PV case).Signed-off-by Jan Beulich <[email protected]>
Quoted 12 lines
xen/arch/x86/hvm/dom0_build.c static int __init pvh_load_kernel(struct · line 574
Quoted 8 lines
xen/arch/x86/hvm/dom0_build.c +2
-0@@ -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 ("Xen dom0 kernel broken ELF: %s\n" ,elf_check_broken (&elf));I would rather use "%pd: kernel broken ELF: %s\n", in case this gets used for loading more than dom0 in the dom0less case. The 'Xen' prefix is IMO useless here (I know it was here before).
Can do. But if I do, I'd like to bring PV in sync with this as well, right in the same patch. I hope you don't mind that.
Jan
Quoted 20 lines · Jan Beulich
Quoted 8 lines · Roger Pau Monné
Quoted 7 lines · Jan Beulich
elf_load_binary()isn't the primary source of brokenness being indicated. Therefore make the respective log message there conditional (much like PV has it), and add another instance whenelf_xen_parse()failed (again matching behavior in the PV case).Signed-off-by Jan Beulich <[email protected]>Quoted 11 lines
xen/arch/x86/hvm/dom0_build.c static int __init pvh_load_kernel(struct · line 574
Quoted 8 lines
xen/arch/x86/hvm/dom0_build.c +2
-0@@ -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 ("Xen dom0 kernel broken ELF: %s\n" ,elf_check_broken (&elf));I would rather use "%pd: kernel broken ELF: %s\n", in case this gets used for loading more than dom0 in the dom0less case. The 'Xen' prefix is IMO useless here (I know it was here before).
Quoted 2 lines
Can do. But if I do, I'd like to bring PV in sync with this as well, right in the same patch. I hope you don't mind that.
Sounds good to me.
~Andrew
Quoted 22 lines · Jan Beulich
Quoted 8 lines · Roger Pau Monné
Quoted 7 lines · Jan Beulich
elf_load_binary()isn't the primary source of brokenness being indicated. Therefore make the respective log message there conditional (much like PV has it), and add another instance whenelf_xen_parse()failed (again matching behavior in the PV case).Signed-off-by Jan Beulich <[email protected]>Quoted 12 lines
xen/arch/x86/hvm/dom0_build.c static int __init pvh_load_kernel(struct · line 574
Quoted 8 lines
xen/arch/x86/hvm/dom0_build.c +2
-0@@ -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 ("Xen dom0 kernel broken ELF: %s\n" ,elf_check_broken (&elf));I would rather use "%pd: kernel broken ELF: %s\n", in case this gets used for loading more than dom0 in the dom0less case. The 'Xen' prefix is IMO useless here (I know it was here before).
Quoted 2 lines
Can do. But if I do, I'd like to bring PV in sync with this as well, right in the same patch. I hope you don't mind that.
Sure, please go ahead.
Thanks, Roger.