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

2016-10-06 Thread Jan Beulich
>>> On 05.10.16 at 18:17, wrote: > On Wed, Oct 05, 2016 at 09:51:06AM -0600, Jan Beulich wrote: >> >>> On 05.10.16 at 17:11, wrote: >> > +/* >> > + * Load the section headers. >> > + * >> > + * NB: this _must_ be done one by one, and

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

2016-10-05 Thread Roger Pau Monne
On Wed, Oct 05, 2016 at 09:51:06AM -0600, Jan Beulich wrote: > >>> On 05.10.16 at 17:11, wrote: > > --- a/xen/common/libelf/libelf-loader.c > > +++ b/xen/common/libelf/libelf-loader.c > > @@ -262,13 +262,14 @@ static void elf_load_bsdsyms(struct elf_binary *elf) > > }

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

2016-10-05 Thread Jan Beulich
>>> On 05.10.16 at 17:11, wrote: > --- a/xen/common/libelf/libelf-loader.c > +++ b/xen/common/libelf/libelf-loader.c > @@ -262,13 +262,14 @@ static void elf_load_bsdsyms(struct elf_binary *elf) > } __attribute__((packed)) header; > > ELF_HANDLE_DECL(elf_ehdr)

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

2016-10-05 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