Page MenuHomeFreeBSD

[PPC] Make new auxv format default
ClosedPublic

Authored by luporl on Jul 13 2020, 6:10 PM.
Referenced Files
Unknown Object (File)
Tue, Nov 26, 12:55 PM
Unknown Object (File)
Tue, Nov 26, 12:55 PM
Unknown Object (File)
Tue, Nov 26, 12:55 PM
Unknown Object (File)
Tue, Nov 26, 12:55 PM
Unknown Object (File)
Tue, Nov 26, 12:30 PM
Unknown Object (File)
Nov 18 2024, 10:45 PM
Unknown Object (File)
Nov 15 2024, 2:57 PM
Unknown Object (File)
Oct 1 2024, 11:08 PM

Details

Summary

Currently, non-tagged binaries are assumed to be old (pre-ELFv2) and kernel supply them with auxv in old format (because it can't extract OSREL from these binaries).

This cause problems for non-tagged programs expecting the new auxv format.
An example is rtld, that is not tagged. When using direct exec mode, old format auxv is passed to it, that forwards auxv to the binary to be run.
If it expects the new auxv format, as is the case for -CURRENT, it usually crashes early.
Besides rtld, this could also happen with binaries compiled in non-standard forms or when using compilers built outside base/ports.

This change makes the kernel assume that non-tagged binaries want the new auxv format.
While this may break direct exec'ing old binaries, it seems more appropriate, considering that the transition to ELFv2 happened several months ago in -CURRENT.
IMHO, a user running the latest kernel and world binaries would expect the new auxv format to be used, matching the installed binaries of his base system.

Note: perhaps printing a warning message when default is assumed would be nice.

Diff Detail

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

Event Timeline

At the least we should probably put a /* XXX here noting why we're doing this.

Address bdragon's comments

OK, the added comment looks good to me. I'm happy with this now.

This revision is now accepted and ready to land.Aug 21 2020, 5:54 PM
This revision was automatically updated to reflect the committed changes.