On 12/5/19 5:28 AM, Mateusz Guzik wrote:
> On 11/16/19, John Baldwin <j...@freebsd.org> wrote:
>> Author: jhb
>> Date: Fri Nov 15 23:01:43 2019
>> New Revision: 354754
>> URL: https://svnweb.freebsd.org/changeset/base/354754
>>
>> Log:
>>   Use a sv_copyout_auxargs hook in the Linux ELF ABIs.
>>
> 
> This makes Linux binaries instantly segfault for me on amd64.
> 
> You check: 
> https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64-root.tar.xz
> 
> I unpack this to tmpfs and chroot inside. Works without this commit.

Yes, trasz@ has let me know and the issue is that I'm calculating the
stack alignment wrong (doesn't factor in the variable number of argv
and envv entries).  It works for linux-base-c7 which is why my testing
didn't catch it.

arm64 linuxulator has a similar issue I think, and I actually have
another use case to want to copy auxv later, so my plan is to rework
this change to go back to statically allocating room for auxargs
and invoking this callback at the end of copyout_strings passing in
the address at the end of envv.  I should be able to work on that
today or tomorrow.

-- 
John Baldwin
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to