Page MenuHomeFreeBSD

Use a sv_copyout_auxargs hook in the Linux ELF ABIs.
ClosedPublic

Authored by jhb on Nov 13 2019, 11:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 2:00 PM
Unknown Object (File)
Sun, Dec 8, 5:09 AM
Unknown Object (File)
Oct 9 2024, 7:45 PM
Unknown Object (File)
Sep 26 2024, 12:00 PM
Unknown Object (File)
Sep 23 2024, 12:08 PM
Unknown Object (File)
Sep 23 2024, 7:22 AM
Unknown Object (File)
Sep 18 2024, 11:01 PM
Unknown Object (File)
Sep 18 2024, 10:21 AM
Subscribers

Details

Summary

Tested on: amd64 (linux64 only), i386

Test Plan
  • I have not tested on arm64

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/amd64/linux/linux_sysvec.c
332 ↗(On Diff #64293)

This had to be moved earlier as the auxv entries have to be right after the end of the argv and envv arrays. I originally hadn't moved this which broke as the extra 8 byte gap was between the end of argv and the auxv array.

@emaste would you be able to test this on arm64?

In D22356#489546, @jhb wrote:

@emaste would you be able to test this on arm64?

I think it's fine to just commit after review, and I'll test it as soon as I can (after commit).

This revision is now accepted and ready to land.Nov 15 2019, 7:23 PM
This revision was automatically updated to reflect the committed changes.
jhb added inline comments.
head/sys/arm64/linux/linux_sysvec.c
275

While adding error checking for a followup for @kib, I noticed this line. This is almost certainly going to cause breakage on arm64 with this change. Previously this was overwritten because we recalculated the location of auxargs and the first auxarg overwrote this duplicate argc, but now this argc will be "real", so if arm64 Linux binaries fail, the first thing I'd try is to remove this line. Note that ps_argvstr is also currently wrong (it points at this argc value instead of argv[0]) due to this.