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
F163006068: D53820.id166826.diff
Sun, Jul 19, 2:56 AM
Unknown Object (File)
Fri, Jul 17, 9:35 PM
Unknown Object (File)
Thu, Jul 16, 12:02 PM
Unknown Object (File)
Thu, Jul 16, 9:14 AM
Unknown Object (File)
Wed, Jul 15, 6:55 AM
Unknown Object (File)
Wed, Jul 15, 6:55 AM
Unknown Object (File)
Sat, Jul 4, 12:33 AM
Unknown Object (File)
Mon, Jun 29, 2:22 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.