Re: [PATCH v2] libelf: improve PVH elfnote parsing

2021-05-21 Thread Roger Pau Monné
On Fri, May 21, 2021 at 07:26:21AM +0200, Juergen Gross wrote: > On 20.05.21 11:28, Jan Beulich wrote: > > On 20.05.2021 11:27, Roger Pau Monné wrote: > > > On Wed, May 19, 2021 at 12:34:19PM +0200, Jan Beulich wrote: > > > > On 18.05.2021 16:47, Roger Pau Monne wrote: > > > > > @@ -425,8 +425,11 @

Re: [PATCH v2] libelf: improve PVH elfnote parsing

2021-05-20 Thread Juergen Gross
On 20.05.21 11:28, Jan Beulich wrote: On 20.05.2021 11:27, Roger Pau Monné wrote: On Wed, May 19, 2021 at 12:34:19PM +0200, Jan Beulich wrote: On 18.05.2021 16:47, Roger Pau Monne wrote: @@ -425,8 +425,11 @@ static elf_errorstatus elf_xen_addr_calc_check(struct elf_binary *elf, retu

Re: [PATCH v2] libelf: improve PVH elfnote parsing

2021-05-20 Thread Jan Beulich
On 20.05.2021 11:27, Roger Pau Monné wrote: > On Wed, May 19, 2021 at 12:34:19PM +0200, Jan Beulich wrote: >> On 18.05.2021 16:47, Roger Pau Monne wrote: >>> @@ -425,8 +425,11 @@ static elf_errorstatus elf_xen_addr_calc_check(struct >>> elf_binary *elf, >>> return -1; >>> } >>> >>>

Re: [PATCH v2] libelf: improve PVH elfnote parsing

2021-05-20 Thread Roger Pau Monné
On Wed, May 19, 2021 at 12:34:19PM +0200, Jan Beulich wrote: > On 18.05.2021 16:47, Roger Pau Monne wrote: > > @@ -425,8 +425,11 @@ static elf_errorstatus elf_xen_addr_calc_check(struct > > elf_binary *elf, > > return -1; > > } > > > > -/* Initial guess for virt_base is 0 if it

Re: [PATCH v2] libelf: improve PVH elfnote parsing

2021-05-19 Thread Jan Beulich
On 18.05.2021 16:47, Roger Pau Monne wrote: > @@ -425,8 +425,11 @@ static elf_errorstatus elf_xen_addr_calc_check(struct > elf_binary *elf, > return -1; > } > > -/* Initial guess for virt_base is 0 if it is not explicitly defined. */ > -if ( parms->virt_base == UNSET_ADDR )

[PATCH v2] libelf: improve PVH elfnote parsing

2021-05-18 Thread 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_check shouldn't return early unless PHYS32_ENTRY is set and the container is of type HVM, or else the loader and version ch