libelf: don't attempt to parse __xen_guest for PVH
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 28 May 2021 07:13:32 +0000 (09:13 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 28 May 2021 07:13:32 +0000 (09:13 +0200)
commitdec25a2cd1c8089a39900ed978c8e7ab62d2a4d4
tree0e623ccc75dfcc489443d1308ae5d97fb972bbea
parent8c90dbb99907f3b471d558775777a84daec7c3f6
libelf: don't attempt to parse __xen_guest for PVH

The legacy __xen_guest section doesn't support the PHYS32_ENTRY
elfnote, so it's pointless to attempt to parse the elfnotes from that
section when called from an hvm container.

Pass an hvm boolean parameter to the elf note parsing routine, so that
the respective parsing can be suppressed in case libelf is dealing with
an hvm container.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/fuzz/libelf/libelf-fuzzer.c
tools/libs/guest/xg_dom_elfloader.c
tools/libs/guest/xg_dom_hvmloader.c
xen/arch/x86/hvm/dom0_build.c
xen/arch/x86/pv/dom0_build.c
xen/common/libelf/libelf-dominfo.c
xen/include/xen/libelf.h