Page MenuHomeFreeBSD

libsys: Implement safe aux vec initialization
Needs ReviewPublic

Authored by aokblast on Mar 17 2026, 6:40 AM.
Tags
None
Referenced Files
F160007718: D55891.diff
Sat, Jun 20, 12:14 PM
Unknown Object (File)
Thu, Jun 18, 11:20 PM
Unknown Object (File)
Wed, Jun 17, 9:11 PM
Unknown Object (File)
Thu, Jun 11, 8:35 PM
Unknown Object (File)
Sat, May 30, 3:24 PM
Unknown Object (File)
Sat, May 23, 8:31 AM
Unknown Object (File)
May 14 2026, 12:55 AM
Unknown Object (File)
May 13 2026, 4:38 PM
Subscribers

Details

Reviewers
dim
kib
jrtc27
Summary

In llvm sanitizer, we directly refenrece the aux vector by using weak
symbol since some of the aux info does not appeared in elf_aux_info.
However, since the elf_aux_vector is lazy initialzed, it is possible
that
elf_aux_vector will be NULL if the sanitizer initialize early
enough. Therefore, we provide a function to allow external user of
__elf_aux_vector to be properly initilized.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 71446
Build 68329: arc lint + arc unit

Event Timeline

lib/libsys/Symbol.map
7

why do you need the prefixed private symbol?

In fact, I think that it is ok but should have two underscores. And I prefer that we do not export any stable interface for this, i.e. remove the libsys_elf_aux_vec_addr from the version as well as the alias. Use __libsys_.. in the santitizer, which already knows to much about the C runtime internals anyway.

Also remove the proto from the public header.