HomeFreeBSD

rtld: set osrel when in the direct exec mode.

Description

rtld: set osrel when in the direct exec mode.

Rtld itself is a shared object which does not have vendor note, so
after the direct exec of ld-elf.so.1 process has p_osrel set to zero.
This affects the ABI of syscalls.

Set osrel to the __FreeBSD_version value at compile time right after
rtld identified direct exec mode. Then, switch to the osrel read from
the binary note or zero if no note, right before starting calling
ifunc resolvers, which is the first byte of the user code.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on Jun 12 2020, 10:10 PM
Parents
rG3e6e3de0aa0a: verify_pcr_export: bump kenv_mvallen if needed
Branches
Unknown
Tags
Unknown

Event Timeline