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
Unknown Object (File)
Mon, Sep 7, 12:46 PM
Unknown Object (File)
Sat, Sep 5, 11:47 PM
Unknown Object (File)
Sat, Sep 5, 5:30 AM
Unknown Object (File)
Fri, Sep 4, 1:58 AM
Unknown Object (File)
Fri, Sep 4, 1:44 AM
Unknown Object (File)
Wed, Sep 2, 6:26 PM
Unknown Object (File)
Tue, Sep 1, 11:36 PM
Unknown Object (File)
Tue, Sep 1, 11:00 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.