libelf: improve PVH elfnote parsing
PATCH 1/1 libelf: improve PVH elfnote parsing
Pass an hvm boolean parameter to the elf note parsing and checking routines, so that better checking can be done in case libelf is dealing with an hvm container.
elf_xen_note_check shouldn't return early unless PHYS32_ENTRY is set and the container is of type HVM, or else the loader and version checks would be avoided for kernels intended to be booted as PV but that also have PHYS32_ENTRY set.
Adjust elf_xen_addr_calc_check so that the virtual addresses are actually physical ones (by setting virt_base and elf_paddr_offset to zero) when the container is of type HVM, as that container is always started with paging disabled.
--- tools/fuzz/libelf/libelf-fuzzer.c | 3 ++- tools/libs/guest/xg_dom_elfloader.c | 6 ++++-- tools/libs/guest/xg_dom_hvmloader.c | 2 +- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86/pv/dom0_build.c | 2 +- xen/common/libelf/libelf-dominfo.c | 25 +++++++++++++++---------- xen/include/xen/libelf.h | 2 +- 7 files changed, 25 insertions(+), 17 deletions(-)
tools/fuzz/libelf/libelf-fuzzer.c +2 -1
@@ -17,7 +17,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)return -1 ;elf_parse_binary (elf); -elf_xen_parse (elf, &parms); +elf_xen_parse (elf, &parms, false); +elf_xen_parse (elf, &parms, true);return 0 ; }
tools/libs/guest/xg_dom_elfloader.c +4 -2
@@ -135,7 +135,8 @@ static elf_negerrnoval xc_dom_probe_elf_kernel(struct xc_dom_image *dom)* or else we might be trying to load a plain ELF. */ elf_parse_binary (&elf); - rc =elf_xen_parse (&elf, dom->parms); + rc =elf_xen_parse (&elf, dom->parms, + dom->container_type ==XC_DOM_HVM_CONTAINER );if ( rc !=0 )return rc;
@@ -166,7 +167,8 @@ static elf_negerrnoval xc_dom_parse_elf_kernel(struct xc_dom_image *dom)/* parse binary and get xen meta info */ elf_parse_binary (elf); -if (elf_xen_parse (elf, dom->parms) !=0 ) +if (elf_xen_parse (elf, dom->parms, + dom->container_type ==XC_DOM_HVM_CONTAINER ) !=0 ) { rc = -EINVAL ; goto out;
tools/libs/guest/xg_dom_hvmloader.c +1 -1
@@ -73,7 +73,7 @@ static elf_negerrnoval xc_dom_probe_hvm_kernel(struct xc_dom_image *dom)* else we might be trying to load a PV kernel. */ elf_parse_binary (&elf); - rc =elf_xen_parse (&elf, dom->parms); + rc =elf_xen_parse (&elf, dom->parms, true);if ( rc ==0 )return -EINVAL ;
xen/arch/x86/hvm/dom0_build.c +1 -1
@@ -561,7 +561,7 @@ static int __init pvh_load_kernel(struct domain *d, const module_t *image,elf_set_verbose (&elf);#endif elf_parse_binary (&elf); -if ( (rc =elf_xen_parse (&elf, &parms)) !=0 ) +if ( (rc =elf_xen_parse (&elf, &parms, true)) !=0 ) {printk ("Unable to parse kernel for ELFNOTES\n" );return rc;
xen/arch/x86/pv/dom0_build.c +1 -1
@@ -353,7 +353,7 @@ int __init dom0_construct_pv(struct domain *d,elf_set_verbose (&elf);elf_parse_binary (&elf); -if ( (rc =elf_xen_parse (&elf, &parms)) !=0 ) +if ( (rc =elf_xen_parse (&elf, &parms, false)) !=0 ) goto out;/* compatibility check */
xen/common/libelf/libelf-dominfo.c +15 -10
@@ -360,7 +360,7 @@ elf_errorstatus elf_xen_parse_guest_info(struct elf_binary *elf,/* sanity checks */ static elf_errorstatus elf_xen_note_check (struct elf_binary *elf, -struct elf_dom_parms *parms) +struct elf_dom_parms *parms,bool hvm) {if ( (ELF_PTRVAL_INVALID (parms->elf_note_start)) && (ELF_PTRVAL_INVALID (parms->guest_info)) )
@@ -382,7 +382,7 @@ static elf_errorstatus elf_xen_note_check(struct elf_binary *elf, }/* PVH only requires one ELF note to be set */ -if ( parms->phys_entry !=UNSET_ADDR32 ) +if ( parms->phys_entry !=UNSET_ADDR32 && hvm ) {elf_msg (elf,"ELF: Found PVH image\n" );return 0 ;
@@ -414,7 +414,7 @@ static elf_errorstatus elf_xen_note_check(struct elf_binary *elf, }static elf_errorstatus elf_xen_addr_calc_check (struct elf_binary *elf, -struct elf_dom_parms *parms) +struct elf_dom_parms *parms,bool hvm) {uint64_t virt_offset;
@@ -426,7 +426,7 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, }/* Initial guess for virt_base is 0 if it is not explicitly defined. */ -if ( parms->virt_base ==UNSET_ADDR ) +if ( parms->virt_base ==UNSET_ADDR || hvm ) { parms->virt_base =0 ; elf_msg(elf, "ELF: VIRT_BASE unset, using %#" PRIx64 "\n",
@@ -442,7 +442,7 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf,* If we are using the modern ELF notes interface then the default * is 0. */ -if ( parms->elf_paddr_offset ==UNSET_ADDR ) +if ( parms->elf_paddr_offset ==UNSET_ADDR || hvm ) {if ( parms->elf_note_start ) parms->elf_paddr_offset =0 ;
@@ -456,8 +456,13 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, parms->virt_kstart = elf->pstart + virt_offset; parms->virt_kend = elf->pend + virt_offset; -if ( parms->virt_entry ==UNSET_ADDR ) - parms->virt_entry =elf_uval (elf, elf->ehdr, e_entry); +if ( parms->virt_entry ==UNSET_ADDR || hvm ) + { +if ( parms->phys_entry !=UNSET_ADDR32 ) + parms->virt_entry = parms->phys_entry; +else + parms->virt_entry =elf_uval (elf, elf->ehdr, e_entry); + }if ( parms->bsd_symtab ) {
@@ -499,7 +504,7 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf,/* glue it all together ... */ elf_errorstatus elf_xen_parse (struct elf_binary *elf, -struct elf_dom_parms *parms) +struct elf_dom_parms *parms,bool hvm) {ELF_HANDLE_DECL (elf_shdr) shdr;ELF_HANDLE_DECL (elf_phdr) phdr;
@@ -594,9 +599,9 @@ elf_errorstatus elf_xen_parse(struct elf_binary *elf, } } -if (elf_xen_note_check (elf, parms) !=0 ) +if (elf_xen_note_check (elf, parms, hvm) !=0 )return -1 ; -if (elf_xen_addr_calc_check (elf, parms) !=0 ) +if (elf_xen_addr_calc_check (elf, parms, hvm) !=0 )return -1 ;return 0 ; }
xen/include/xen/libelf.h +1 -1
@@ -454,7 +454,7 @@ int elf_xen_parse_note(struct elf_binary *elf,int elf_xen_parse_guest_info (struct elf_binary *elf,struct elf_dom_parms *parms);int elf_xen_parse (struct elf_binary *elf, -struct elf_dom_parms *parms); +struct elf_dom_parms *parms,bool hvm);static inline void *elf_memcpy_unchecked (void *dest,const void *src,size_t n) {return memcpy (dest, src, n); }
Signature · 1 line
2.31.1
Quoted 10 lines · Roger Pau Monne
Pass an hvm boolean parameter to the elf note parsing and checking routines, so that better checking can be done in case libelf is dealing with an hvm container.
elf_xen_note_checkshouldn't return early unlessPHYS32_ENTRYis set and the container is of type HVM, or else the loader and version checks would be avoided for kernels intended to be booted as PV but that also havePHYS32_ENTRYset.
Quoted 4 lines
Adjust
elf_xen_addr_calc_checkso that the virtual addresses are actually physical ones (by settingvirt_baseandelf_paddr_offsetto zero) when the container is of type HVM, as that container is always started with paging disabled.
Should elf_xen_addr_calc_check be changed so that PV operates on virtual addresses and HVM operates on physical addresses?
I worked on some patches for this a while back, but lost track when other work pulled me away. I'll send out what I had, but I think I had not tested many of the cases. Also, I had other questions about the approach. Fundamentally, what notes and limits need to be checked for PVH vs. PV?
Regards,
Jason
RFC PATCH 1/3 libelf: Introduce phys_kstart/end
The physical start and end matter for PVH. These are only used by a PVH dom0, but will help when separating the PV and PVH ELF checking in the next patch.
--- xen/arch/x86/hvm/dom0_build.c | 4 ++-- xen/common/libelf/libelf-dominfo.c | 3 +++ xen/include/xen/libelf.h | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-)
xen/arch/x86/hvm/dom0_build.c +2 -2
@@ -574,8 +574,8 @@ static int __init pvh_load_kernel(struct domain *d, const module_t *image, }/* Copy the OS image and free temporary buffer. */ - elf.dest_base = (void *)(parms.virt_kstart - parms.virt_base); - elf.dest_size = parms.virt_kend - parms.virt_kstart; + elf.dest_base = (void *)parms.phys_kstart - parms.elf_paddr_offset; + elf.dest_size = parms.phys_kend - parms.phys_kstart;elf_set_vcpu (&elf, v); rc =elf_load_binary (&elf);
xen/common/libelf/libelf-dominfo.c +3 -0
@@ -453,6 +453,8 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, } virt_offset = parms->virt_base - parms->elf_paddr_offset; + parms->phys_kstart = elf->pstart; + parms->phys_kend = elf->pend; parms->virt_kstart = elf->pstart + virt_offset; parms->virt_kend = elf->pend + virt_offset;
@@ -464,6 +466,7 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf,elf_parse_bsdsyms (elf, elf->pend);if ( elf->bsd_symtab_pend ) parms->virt_kend = elf->bsd_symtab_pend + virt_offset; + parms->phys_kend = elf->bsd_symtab_pend; }elf_msg (elf,"ELF: addresses:\n" );
xen/include/xen/libelf.h +2 -0
@@ -434,6 +434,8 @@ struct elf_dom_parms {/* calculated */ uint64_t virt_kstart;uint64_t virt_kend; +uint64_t phys_kstart; +uint64_t phys_kend; };static inline void elf_xen_feature_set (int nr,uint32_t * addr)
Signature · 1 line
2.31.1
RFC PATCH 2/3 libelf: Use flags to check pv or pvh in elf_xen_parse
Certain checks are only applicable to PV vs. PVH, so split them and run only the appropriate checks for each.
This fixes loading a PVH kernel that has a PHYS32_ENTRY but not an ENTRY ELF note. Such a kernel would fail the virt_entry check which is not applicable for PVH.
This re-instatates loader and xen version checks for the PV case that were omited for kernels passing the PHYS32_ENTRY check.
--- tools/fuzz/libelf/libelf-fuzzer.c | 2 +- tools/libs/guest/xg_dom_elfloader.c | 11 +++- tools/libs/guest/xg_dom_hvmloader.c | 2 +- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86/pv/dom0_build.c | 2 +- xen/common/libelf/libelf-dominfo.c | 91 +++++++++++++++++++++++------ xen/include/xen/libelf.h | 7 ++- 7 files changed, 93 insertions(+), 24 deletions(-)
tools/fuzz/libelf/libelf-fuzzer.c +1 -1
@@ -17,7 +17,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)return -1 ;elf_parse_binary (elf); -elf_xen_parse (elf, &parms); +elf_xen_parse (elf, &parms,ELF_XEN_CHECK_PV |ELF_XEN_CHECK_PVH );return 0 ; }
tools/libs/guest/xg_dom_elfloader.c +9 -2
@@ -120,6 +120,7 @@ static elf_negerrnoval check_elf_kernel(struct xc_dom_image *dom, bool verbose)static elf_negerrnoval xc_dom_probe_elf_kernel (struct xc_dom_image *dom) {struct elf_binary elf; +unsigned int flags;int rc; rc =check_elf_kernel (dom,0 );
@@ -135,7 +136,9 @@ static elf_negerrnoval xc_dom_probe_elf_kernel(struct xc_dom_image *dom)* or else we might be trying to load a plain ELF. */ elf_parse_binary (&elf); - rc =elf_xen_parse (&elf, dom->parms); + flags = dom->container_type ==XC_DOM_PV_CONTAINER ?ELF_XEN_CHECK_PV : +ELF_XEN_CHECK_PVH ; + rc =elf_xen_parse (&elf, dom->parms, flags);if ( rc !=0 )return rc;
@@ -146,6 +149,7 @@ static elf_negerrnoval xc_dom_parse_elf_kernel(struct xc_dom_image *dom) {struct elf_binary *elf;elf_negerrnoval rc; +unsigned int flags; rc =check_elf_kernel (dom,1 );if ( rc !=0 )
@@ -166,7 +170,10 @@ static elf_negerrnoval xc_dom_parse_elf_kernel(struct xc_dom_image *dom)/* parse binary and get xen meta info */ elf_parse_binary (elf); -if (elf_xen_parse (elf, dom->parms) !=0 ) + flags = dom->container_type ==XC_DOM_PV_CONTAINER ?ELF_XEN_CHECK_PV : +ELF_XEN_CHECK_PVH ; + rc =elf_xen_parse (elf, dom->parms, flags); +if ( rc !=0 ) { rc = -EINVAL ; goto out;
tools/libs/guest/xg_dom_hvmloader.c +1 -1
@@ -73,7 +73,7 @@ static elf_negerrnoval xc_dom_probe_hvm_kernel(struct xc_dom_image *dom)* else we might be trying to load a PV kernel. */ elf_parse_binary (&elf); - rc =elf_xen_parse (&elf, dom->parms); + rc =elf_xen_parse (&elf, dom->parms,ELF_XEN_CHECK_PV |ELF_XEN_CHECK_PVH );if ( rc ==0 )return -EINVAL ;
xen/arch/x86/hvm/dom0_build.c +1 -1
@@ -561,7 +561,7 @@ static int __init pvh_load_kernel(struct domain *d, const module_t *image,elf_set_verbose (&elf);#endif elf_parse_binary (&elf); -if ( (rc =elf_xen_parse (&elf, &parms)) !=0 ) +if ( (rc =elf_xen_parse (&elf, &parms,ELF_XEN_CHECK_PVH )) !=0 ) {printk ("Unable to parse kernel for ELFNOTES\n" );return rc;
xen/arch/x86/pv/dom0_build.c +1 -1
@@ -353,7 +353,7 @@ int __init dom0_construct_pv(struct domain *d,elf_set_verbose (&elf);elf_parse_binary (&elf); -if ( (rc =elf_xen_parse (&elf, &parms)) !=0 ) +if ( (rc =elf_xen_parse (&elf, &parms,ELF_XEN_CHECK_PV )) !=0 ) goto out;/* compatibility check */
xen/common/libelf/libelf-dominfo.c +74 -17
135 lines not on this page · raw message
xen/include/xen/libelf.h +6 -1
@@ -455,8 +455,13 @@ int elf_xen_parse_note(struct elf_binary *elf, ELF_HANDLE_DECL(elf_note) note);int elf_xen_parse_guest_info (struct elf_binary *elf,struct elf_dom_parms *parms); + +#define ELF_XEN_CHECK_PV (1 << 0) +#define ELF_XEN_CHECK_PVH (1 << 1) +int elf_xen_parse (struct elf_binary *elf, -struct elf_dom_parms *parms); +struct elf_dom_parms *parms, +unsigned int flags);static inline void *elf_memcpy_unchecked (void *dest,const void *src,size_t n) {return memcpy (dest, src, n); }
Signature · 1 line
2.31.1
RFC PATCH 3/3 libelf: PVH: only allow elf_paddr_offset of 0
In reply to Jason AndryukModern Linux and FreeBSD hardcode it to 0. Just drop its use for PVH.
--- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/common/libelf/libelf-dominfo.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
xen/arch/x86/hvm/dom0_build.c +1 -1
@@ -574,7 +574,7 @@ static int __init pvh_load_kernel(struct domain *d, const module_t *image, }/* Copy the OS image and free temporary buffer. */ - elf.dest_base = (void *)parms.phys_kstart - parms.elf_paddr_offset; + elf.dest_base = (void *)parms.phys_kstart; elf.dest_size = parms.phys_kend - parms.phys_kstart;elf_set_vcpu (&elf, v);
xen/common/libelf/libelf-dominfo.c +6 -0
@@ -433,6 +433,12 @@ static elf_errorstatus elf_xen_addr_calc_check_pvh(struct elf_binary *elf, parms->phys_kend = elf->bsd_symtab_pend; } +if ( parms->elf_paddr_offset !=0 ) { +elf_err (elf,"ERROR: ELF elf_paddr_offset (0x" PRIx64") is non-zero\n" , + parms->elf_paddr_offset); +return -1 ; + } +elf_msg (elf,"ELF: addresses:\n" );elf_msg (elf," phys_kstart = 0x%" PRIx64"\n" , parms->phys_kstart);elf_msg (elf," phys_kend = 0x%" PRIx64"\n" , parms->phys_kend);
Signature · 1 line
2.31.1
Quoted 11 lines · Jason Andryuk
Quoted 10 lines · Roger Pau Monne
Pass an hvm boolean parameter to the elf note parsing and checking routines, so that better checking can be done in case libelf is dealing with an hvm container.
elf_xen_note_checkshouldn't return early unlessPHYS32_ENTRYis set and the container is of type HVM, or else the loader and version checks would be avoided for kernels intended to be booted as PV but that also havePHYS32_ENTRYset.
Quoted 7 lines
Quoted 4 lines
Adjust
elf_xen_addr_calc_checkso that the virtual addresses are actually physical ones (by settingvirt_baseandelf_paddr_offsetto zero) when the container is of type HVM, as that container is always started with paging disabled.Should
elf_xen_addr_calc_checkbe changed so that PV operates on virtual addresses and HVM operates on physical addresses?
Right... I was aiming with getting away with something simpler and just assume phys == virt on HVM in order to avoid more complicated changes and the need to introduce new fields on the structure.
Quoted 5 lines
I worked on some patches for this a while back, but lost track when other work pulled me away. I'll send out what I had, but I think I had not tested many of the cases. Also, I had other questions about the approach. Fundamentally, what notes and limits need to be checked for PVH vs. PV?
Those are only sanity checks to assert that the image is kind of fine, libelf also has checks when loading stuff to make sure a malicious elf payload cannot fool the loader.
I'm unlikely to be able to do much work on this aside from this current patch.
Thanks, Roger.
Quoted 10 lines · Roger Pau Monne
xen/common/libelf/libelf-dominfo.c +1
-1@@ -426,7 +426,7 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, }/* Initial guess for virt_base is 0 if it is not explicitly defined. */ -if ( parms->virt_base ==UNSET_ADDR ) +if ( parms->virt_base ==UNSET_ADDR || hvm ) { parms->virt_base =0 ; elf_msg(elf, "ELF: VIRT_BASE unset, using %#" PRIx64 "\n",
xen/common/libelf/libelf-dominfo.c static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, · line 448
Quoted 8 lines
xen/common/libelf/libelf-dominfo.c +1
-1@@ -442,7 +442,7 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf,* If we are using the modern ELF notes interface then the default * is 0. */ -if ( parms->elf_paddr_offset ==UNSET_ADDR ) +if ( parms->elf_paddr_offset ==UNSET_ADDR || hvm ) {if ( parms->elf_note_start ) parms->elf_paddr_offset =0 ;
Both of these would want their respective comments also updated, I
think: There's no defaulting or guessing really in PVH mode, is there?
xen/common/libelf/libelf-dominfo.c static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, · line 461
Quoted 9 lines
xen/common/libelf/libelf-dominfo.c +3
-2@@ -456,8 +456,13 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, parms->virt_kstart = elf->pstart + virt_offset; parms->virt_kend = elf->pend + virt_offset; -if ( parms->virt_entry ==UNSET_ADDR ) - parms->virt_entry =elf_uval (elf, elf->ehdr, e_entry); +if ( parms->virt_entry ==UNSET_ADDR || hvm ) + { +if ( parms->phys_entry !=UNSET_ADDR32 )
Don't you need "&& hvm" here to prevent ...
xen/common/libelf/libelf-dominfo.c static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, · line 462
Quoted 1 line
xen/common/libelf/libelf-dominfo.c +1
-0+ parms->virt_entry = parms->phys_entry;
... this taking effect for a kernel capable of running in both PV and PVH modes, instead of ...
xen/common/libelf/libelf-dominfo.c static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, · line 464
Quoted 2 lines
xen/common/libelf/libelf-dominfo.c +2
-0+else + parms->virt_entry =elf_uval (elf, elf->ehdr, e_entry);
... this (when actually in PV mode)?
Jan
Quoted 38 lines · Jan Beulich
Quoted 10 lines · Roger Pau Monne
xen/common/libelf/libelf-dominfo.c +1
-1@@ -426,7 +426,7 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, }/* Initial guess for virt_base is 0 if it is not explicitly defined. */ -if ( parms->virt_base ==UNSET_ADDR ) +if ( parms->virt_base ==UNSET_ADDR || hvm ) { parms->virt_base =0 ; elf_msg(elf, "ELF: VIRT_BASE unset, using %#" PRIx64 "\n",xen/common/libelf/libelf-dominfo.c static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, · line 448
Quoted 8 lines
xen/common/libelf/libelf-dominfo.c +1
-1@@ -442,7 +442,7 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf,* If we are using the modern ELF notes interface then the default * is 0. */ -if ( parms->elf_paddr_offset ==UNSET_ADDR ) +if ( parms->elf_paddr_offset ==UNSET_ADDR || hvm ) {if ( parms->elf_note_start ) parms->elf_paddr_offset =0 ;Both of these would want their respective comments also updated, I
think: There's no defaulting or guessing really in PVH mode, is there?xen/common/libelf/libelf-dominfo.c static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, · line 461
Quoted 9 lines
xen/common/libelf/libelf-dominfo.c +3
-2@@ -456,8 +456,13 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, parms->virt_kstart = elf->pstart + virt_offset; parms->virt_kend = elf->pend + virt_offset; -if ( parms->virt_entry ==UNSET_ADDR ) - parms->virt_entry =elf_uval (elf, elf->ehdr, e_entry); +if ( parms->virt_entry ==UNSET_ADDR || hvm ) + { +if ( parms->phys_entry !=UNSET_ADDR32 )Don't you need "&& hvm" here to prevent ...
xen/common/libelf/libelf-dominfo.c static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, · line 462
Quoted 1 line
xen/common/libelf/libelf-dominfo.c +1
-0+ parms->virt_entry = parms->phys_entry;
Quoted 7 lines
... this taking effect for a kernel capable of running in both PV and PVH modes, instead of ...
xen/common/libelf/libelf-dominfo.c static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, · line 464
Quoted 2 lines
xen/common/libelf/libelf-dominfo.c +2
-0+else + parms->virt_entry =elf_uval (elf, elf->ehdr, e_entry);... this (when actually in PV mode)?
Oh, I somehow assumed that PV guests _must_ provide the entry point in XEN_ELFNOTE_ENTRY, but I don't think that's the case. Will update and send a new version.
Thanks, Roger.