Re: [Xen-devel] [PATCH v5] libelf: rewrite symtab/strtab loading

2016-03-02 Thread Jan Beulich
>>> On 01.03.16 at 12:59, wrote: > Changes since v4: > - Add a define that contains the number of sections. > - Improve the comment to describe the memory layout. > - Check that the sh_link field is 0 < sh_link < e_shnum. > - Simplify some of the logic, since the SYMTAB

Re: [Xen-devel] [PATCH v5] libelf: rewrite symtab/strtab loading

2016-03-02 Thread Jan Beulich
>>> On 01.03.16 at 19:25, wrote: > Roger Pau Monne writes ("[PATCH v5] libelf: rewrite symtab/strtab loading"): >> Current implementation of elf_load_bsdsyms is broken when loading inside of >> a HVM guest, because it assumes elf_memcpy_safe is able to write into guest

Re: [Xen-devel] [PATCH v5] libelf: rewrite symtab/strtab loading

2016-03-01 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH v5] libelf: rewrite symtab/strtab loading"): > Current implementation of elf_load_bsdsyms is broken when loading inside of > a HVM guest, because it assumes elf_memcpy_safe is able to write into guest > memory space, which it is not. > > Take the oportunity to do

Re: [Xen-devel] [PATCH v5] libelf: rewrite symtab/strtab loading

2016-03-01 Thread Wei Liu
On Tue, Mar 01, 2016 at 12:59:50PM +0100, Roger Pau Monne wrote: > Current implementation of elf_load_bsdsyms is broken when loading inside of > a HVM guest, because it assumes elf_memcpy_safe is able to write into guest > memory space, which it is not. > > Take the oportunity to do some cleanup

[Xen-devel] [PATCH v5] libelf: rewrite symtab/strtab loading

2016-03-01 Thread Roger Pau Monne
Current implementation of elf_load_bsdsyms is broken when loading inside of a HVM guest, because it assumes elf_memcpy_safe is able to write into guest memory space, which it is not. Take the oportunity to do some cleanup and properly document how elf_{parse/load}_bsdsyms works. The new