Re: [Qemu-devel] [PATCH v2] linux-user: elf: Map empty PT_LOAD segments

2019-05-09 Thread Laurent Vivier
On 03/05/2019 14:20, Giuseppe Musacchio wrote: Some PT_LOAD segments may be completely zeroed out and their p_filesize is zero, in that case the loader should just allocate a page that's at least p_memsz bytes large (plus eventual alignment padding). Calling zero_bss does this job for us, all we

Re: [Qemu-devel] [PATCH v2] linux-user: elf: Map empty PT_LOAD segments

2019-05-09 Thread Peter Maydell
On Thu, 9 May 2019 at 16:50, Laurent Vivier wrote: > > On 03/05/2019 14:20, Giuseppe Musacchio wrote: > > Some PT_LOAD segments may be completely zeroed out and their p_filesize > > is zero, in that case the loader should just allocate a page that's at > > least p_memsz bytes large (plus eventual

Re: [Qemu-devel] [PATCH v2] linux-user: elf: Map empty PT_LOAD segments

2019-05-09 Thread Laurent Vivier
On 03/05/2019 14:20, Giuseppe Musacchio wrote: Some PT_LOAD segments may be completely zeroed out and their p_filesize is zero, in that case the loader should just allocate a page that's at least p_memsz bytes large (plus eventual alignment padding). Calling zero_bss does this job for us, all we

[Qemu-devel] [PATCH v2] linux-user: elf: Map empty PT_LOAD segments

2019-05-03 Thread Giuseppe Musacchio
Some PT_LOAD segments may be completely zeroed out and their p_filesize is zero, in that case the loader should just allocate a page that's at least p_memsz bytes large (plus eventual alignment padding). Calling zero_bss does this job for us, all we have to do is make sure we don't try to mmap a z