Page MenuHomeFreeBSD

libc: Let elf_aux_info() handle AT_KPRELOAD
AbandonedPublic

Authored by markj on Dec 30 2021, 10:39 PM.
Tags
None
Referenced Files
F153841038: D33702.id100767.diff
Fri, Apr 24, 4:33 AM
F153814871: D33702.id.diff
Thu, Apr 23, 11:38 PM
Unknown Object (File)
Tue, Apr 21, 2:03 AM
Unknown Object (File)
Tue, Apr 21, 12:20 AM
Unknown Object (File)
Mon, Apr 20, 1:14 PM
Unknown Object (File)
Mon, Apr 6, 9:41 AM
Unknown Object (File)
Thu, Mar 26, 7:46 AM
Unknown Object (File)
Mar 19 2026, 12:04 PM
Subscribers

Details

Reviewers
emaste
kib
jrtc27

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43652
Build 40540: arc lint + arc unit

Event Timeline

What's the use case? So a static libc can also use it in future?

What's the use case? So a static libc can also use it in future?

I wanted to change tests/sys/kern/kern_copyin.c to use this instead of the KERN_PROC_PS_STRINGS sysctl to derive the max user address. That would still be kind of gross, maybe the right approach is to add a new sysctl to fetch that value. But is there any reason not to expose the AT_KPRELOAD value this way?

It's a bit scary from a CHERI perspective, but probably ok...

But yes, adding a sysctl for the actual thing you want rather than inferring it from ps_strings or kpreload+PAGE_SIZE seems like the right thing to do, regardless of whether this is exposed

It definitely should not be AT_KPRELOAD to get the U/K boundary. For instance, shared page base might get randomized.