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)
Jan 12 2024, 1:53 AM
Unknown Object (File)
Dec 20 2023, 4:54 AM
Unknown Object (File)
Dec 13 2023, 6:15 AM
Unknown Object (File)
Nov 12 2023, 12:04 PM
Unknown Object (File)
Oct 9 2023, 11:01 AM
Unknown Object (File)
Sep 8 2023, 12:46 AM
Unknown Object (File)
Sep 8 2023, 12:46 AM
Unknown Object (File)
Sep 8 2023, 12:12 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.