Page MenuHomeFreeBSD

sys/_types.h: define __(u)int(f)ptr_t for CHERI
ClosedPublic

Authored by brooks on Nov 19 2025, 11:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 26, 9:34 AM
Unknown Object (File)
Sat, Jan 10, 5:00 AM
Unknown Object (File)
Dec 31 2025, 3:08 AM
Unknown Object (File)
Dec 20 2025, 6:32 PM
Unknown Object (File)
Dec 19 2025, 10:26 AM
Unknown Object (File)
Dec 14 2025, 7:20 AM
Unknown Object (File)
Dec 2 2025, 1:47 PM
Unknown Object (File)
Dec 2 2025, 5:42 AM
Subscribers

Details

Summary

On pure-capability ABIs, uintptr_t and variants are capabilities and
defined to the new primative type __uintcap_t and variants. This is
required to allow pointers (capabilities) to round trip through
uintptr_t as required by the C standard.

Effort: CHERI upstreaming
Sponsored by: Innovate UK

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 68727
Build 65610: arc lint + arc unit

Event Timeline

brooks created this revision.
This revision is now accepted and ready to land.Nov 19 2025, 10:08 PM

And where is __intcap_t defined? Is it provided by some MD include, like machine/_types.h?

I do not remember seeing this MD define in the review series. If true, then should __intcap_t added before the use?

In D53819#1229955, @kib wrote:

And where is __intcap_t defined? Is it provided by some MD include, like machine/_types.h?

I do not remember seeing this MD define in the review series. If true, then should __intcap_t added before the use?

__intcap_t is a new primitive type provided by the compiler. It cannot be defined by a header except on systems that don't support it.

In D53819#1229955, @kib wrote:

And where is __intcap_t defined? Is it provided by some MD include, like machine/_types.h?

I do not remember seeing this MD define in the review series. If true, then should __intcap_t added before the use?

__intcap_t is a new primitive type provided by the compiler. It cannot be defined by a header except on systems that don't support it.

Eh, not quite. ((un)signed) __intcap is the primitive but there are also __(u)intcap_t pre-defined by the compiler. A bit weird to provide both but that's how int128 works; you get both ((un)signed) __int128 and __(u)int128_t out of the box.