Page MenuHomeFreeBSD

[PPC] Make new auxv format default
ClosedPublic

Authored by luporl on Jul 13 2020, 6:10 PM.
Referenced Files
F81681763: D25651.id.diff
Fri, Apr 19, 9:01 PM
Unknown Object (File)
Thu, Apr 18, 3:36 AM
Unknown Object (File)
Mar 7 2024, 5:22 PM
Unknown Object (File)
Dec 20 2023, 8:29 AM
Unknown Object (File)
Jun 14 2023, 3:08 PM
Unknown Object (File)
Apr 10 2023, 4:11 AM
Unknown Object (File)
Apr 10 2023, 4:09 AM
Unknown Object (File)
Apr 10 2023, 4:08 AM

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.