]> xenbits.xensource.com Git - xen.git/commitdiff
libelf: relax ELF_PADDR_OFFSET && !VIRT_BASE check for PVH
authorJan Beulich <jbeulich@suse.com>
Wed, 22 Feb 2023 12:49:26 +0000 (13:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 22 Feb 2023 12:49:26 +0000 (13:49 +0100)
Both values are unconditionally overridden (to 0) in the "hvm" (i.e.
PVH) case. There's therefore no reason to punish a PVH kernel for
setting the former but not the latter.

Fixes: 632cbaf1243e ("libelf: improve PVH elfnote parsing")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Jason Andryuk <jandryuk@gmail.com>
xen/common/libelf/libelf-dominfo.c

index 24d1371dd7a95d8d8f199ddd24f7d3fd0df398ea..e5644f6c7fa62867cdc839d638ea1c2e33742446 100644 (file)
@@ -419,7 +419,8 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf,
     uint64_t virt_offset;
 
     if ( (parms->elf_paddr_offset != UNSET_ADDR) &&
-         (parms->virt_base == UNSET_ADDR) )
+         (parms->virt_base == UNSET_ADDR) &&
+         !hvm )
     {
         elf_err(elf, "ERROR: ELF_PADDR_OFFSET set, VIRT_BASE unset\n");
         return -1;