Page MenuHomeFreeBSD

sys/_types.h: define fallback __(u)intcap_t
ClosedPublic

Authored by brooks on Nov 19 2025, 11:18 AM.
Tags
None
Referenced Files
F148161408: D53820.diff
Mon, Mar 16, 4:37 AM
Unknown Object (File)
Fri, Mar 13, 7:37 PM
Unknown Object (File)
Thu, Mar 12, 2:52 AM
Unknown Object (File)
Thu, Mar 12, 2:50 AM
Unknown Object (File)
Thu, Mar 12, 1:54 AM
Unknown Object (File)
Fri, Mar 6, 7:44 PM
Unknown Object (File)
Mon, Mar 2, 10:17 AM
Unknown Object (File)
Sat, Feb 28, 1:50 PM
Subscribers

Details

Summary

intcap_t and uintcap_t are new primative types in CHERI-aware ABIs
that are used to define (u)intptr_t. To allow coexistance of integer
pointers and hybrid code, define them to __(u)intptr_t when they are
not otherwise available.

Effort: CHERI upstreaming
Sponsored by: Innovate UK

Diff Detail

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

Event Timeline

brooks created this revision.

On CheriBSD we also include intcap_t and uintcap_t to be friendly, but we're trying to discourage the hybrid programming model so I'd like to stick with __ variants in FreeBSD.

This revision is now accepted and ready to land.Nov 19 2025, 1:47 PM
markj added inline comments.
sys/sys/_types.h
159

I'd be more explicit here about when these types are supposed to be useful, i.e., when exactly they should be used instead of (u)intptr_t. Like, would we ever use these in the base system?

Add some advice about (not) using __intcap_t

This revision now requires review to proceed.Nov 20 2025, 10:14 AM
This revision is now accepted and ready to land.Nov 20 2025, 11:54 AM
This revision was automatically updated to reflect the committed changes.