Page MenuHomeFreeBSD

ELF auxargs: reserve a slot for CheriABI use
ClosedPublic

Authored by brooks on Jul 22 2024, 3:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 6, 3:00 PM
Unknown Object (File)
Wed, Jan 15, 10:29 PM
Unknown Object (File)
Dec 18 2024, 7:21 AM
Unknown Object (File)
Dec 8 2024, 12:51 PM
Unknown Object (File)
Dec 8 2024, 12:51 PM
Unknown Object (File)
Dec 8 2024, 12:51 PM
Unknown Object (File)
Dec 6 2024, 4:37 PM
Unknown Object (File)
Nov 24 2024, 3:13 PM
Subscribers

Details

Summary

Reserve slot 37 to avoid flag days downstream.

We currently use this slot in CheriBSD to maintain counters in userspace
while providing access to them vis sysctl. CHERI support isn't landing
in FreeBSD quite yet (probably for 16 unless hardware access accelerates
radically), but it seems highly likely at this point.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Note for CHERI people, I've gone with a different name and description than downstream, but wanted to keep the reservation fairly generic. (I also think our current AT_CHERI_C18N might become a more general stats mechanism later.)

Hmm, @kevans suggests that it might make more sense to just make this something like AT_RESERVED0 and figure CHERI post merge will be incompatible anyway.

Hmm, @kevans suggests that it might make more sense to just make this something like AT_RESERVED0 and figure CHERI post merge will be incompatible anyway.

FWIW, I don't feel too strongly about it- I don't know if other downstreams chopped this one off (maybe HardenedBSD?), and I don't think I'd have any concerns that CHERI would just go away and force us to just retract the name before merging it in.

This whole thing was prompted by @andrew noticing that Linux has AT_HWCAP3 and AT_HWCAP4 now so we'll need to grow those eventually.

It looks like HardenedBSD uses #define AT_PAXFLAGS 35. I assume they stopped merging changes to this list as they didn't have AT_USRSTACK* in their copy of this file.

Having thought about it a bit, I think there might well be some value in one or more AT_RESERVED# values, but I do actually want to start reserving constants for CHERI use. Worse case we don't use them long term and they can eventually be reused as AT_RESERVED#.

s/vis/via/ in the commit log

This revision is now accepted and ready to land.Jul 23 2024, 9:24 PM
This revision was automatically updated to reflect the committed changes.