diff mbox series

libelf: relax ELF_PADDR_OFFSET && !VIRT_BASE check for PVH

Message ID e58ac418-b044-eb26-308c-5ddaa021daa4@suse.com (mailing list archive)
State New, archived
Headers show
Series libelf: relax ELF_PADDR_OFFSET && !VIRT_BASE check for PVH | expand

Commit Message

Jan Beulich Feb. 15, 2023, 3:08 p.m. UTC
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>

Comments

Jason Andryuk Feb. 15, 2023, 8:26 p.m. UTC | #1
On Wed, Feb 15, 2023 at 10:09 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> 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>

Thanks,
Jason
diff mbox series

Patch

--- a/xen/common/libelf/libelf-dominfo.c
+++ b/xen/common/libelf/libelf-dominfo.c
@@ -419,7 +419,8 @@  static elf_errorstatus elf_xen_addr_calc
     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;