Page MenuHomeFreeBSD

rtld-elf and libsys: remove old forward-compat code for powerpc auxv renumbering
Needs ReviewPublic

Authored by kib on Tue, Nov 18, 11:08 AM.
Tags
None
Referenced Files
F136737412: D53801.vs166659.id166727.diff
Wed, Nov 19, 4:12 AM
F136657487: D53801.id166659.diff
Tue, Nov 18, 6:50 PM
F136657424: D53801.id.diff
Tue, Nov 18, 6:50 PM
F136648805: D53801.diff
Tue, Nov 18, 6:00 PM
F136648321: D53801.diff
Tue, Nov 18, 5:57 PM
F136646660: D53801.diff
Tue, Nov 18, 5:48 PM

Details

Summary
This code was hackishly added in 2019 (__FreeBSD_version 1300070)
to provide the forward compatibility, allowing to somehow run newer
rtld on old kernel.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Tue, Nov 18, 11:08 AM

Looks good to me on a POWER9 Blackbird / powerpc64le.

Thanks for putting this together!

This revision is now accepted and ready to land.Wed, Nov 19, 4:13 AM

On second read through, caught a couple of code issues that don't affect functionality. Once those are fixed this looks good.

libexec/rtld-elf/powerpc/reloc.c
848 ↗(On Diff #166727)

This variable seems to be dangling. Remove?

libexec/rtld-elf/powerpc64/reloc.c
745 ↗(On Diff #166727)

This variable seems to be dangling. Remove?

This revision now requires changes to proceed.Wed, Nov 19, 4:18 AM

On second read through, caught a couple of code issues that don't affect functionality. Once those are fixed this looks good.

After thinking about this code some more, I realized that it probably should be removed altogether. Basically, it is there to allow to run newer binaries (rtld/libsys) on older (pre-AT_ renumbering) kernels. This was done in ~2019, and arguably outlived even the limited usefulness it had at the time of the commit.

kib retitled this revision from rtld-elf: move powerpc-specific code out of rtld to rtld-elf and libsys: remove old forward-compat code for powerpc auxv renumbering.
kib edited the summary of this revision. (Show Details)
kib removed a reviewer: andrew.