Re: [Xen-devel] [PATCH v3 for-4.8] libelf: fix symtab/strtab loading for 32bit domains

2016-10-13 Thread Jan Beulich
>>> On 13.10.16 at 15:25, wrote: > On 13/10/16 13:48, Roger Pau Monne wrote: >> diff --git a/xen/include/xen/libelf.h b/xen/include/xen/libelf.h >> index 90bd8cb..70abbaf 100644 >> --- a/xen/include/xen/libelf.h >> +++ b/xen/include/xen/libelf.h >> @@ -432,6 +432,16 @@ struct elf_dom_parms { >>

Re: [Xen-devel] [PATCH v3 for-4.8] libelf: fix symtab/strtab loading for 32bit domains

2016-10-13 Thread Andrew Cooper
On 13/10/16 13:48, Roger Pau Monne wrote: > diff --git a/xen/include/xen/libelf.h b/xen/include/xen/libelf.h > index 90bd8cb..70abbaf 100644 > --- a/xen/include/xen/libelf.h > +++ b/xen/include/xen/libelf.h > @@ -432,6 +432,16 @@ struct elf_dom_parms { > uint64_t virt_kend; > }; > > +/* Num

Re: [Xen-devel] [PATCH v3 for-4.8] libelf: fix symtab/strtab loading for 32bit domains

2016-10-13 Thread Jan Beulich
>>> On 13.10.16 at 14:48, wrote: > @@ -174,8 +171,8 @@ void elf_parse_bsdsyms(struct elf_binary *elf, uint64_t > pstart) > /* Space to store the size of the elf image */ > sz = sizeof(uint32_t); > > -/* Space for the elf and elf section headers */ > -sz += elf_uval(elf, elf->e

[Xen-devel] [PATCH v3 for-4.8] libelf: fix symtab/strtab loading for 32bit domains

2016-10-13 Thread Roger Pau Monne
Commit ed04ca introduced a bug in the symtab/strtab loading for 32bit guests, that corrupted the section headers array due to the padding introduced by the elf_shdr union. The Elf section header array on 32bit should be accessible as an array of Elf32_Shdr elements, and the union with Elf64_Shdr d