svn commit: r354754 - in head/sys: amd64/linux amd64/linux32 arm64/linux i386/linux

John Baldwin jhb at FreeBSD.org
Thu Dec 5 16:49:49 UTC 2019


On 12/5/19 5:28 AM, Mateusz Guzik wrote:
> On 11/16/19, John Baldwin <jhb at 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


More information about the svn-src-all mailing list