Page MenuHomeFreeBSD

[PPC] Make new auxv format default

Authored by luporl on Jul 13 2020, 6:10 PM.



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; 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.