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
F162632973: D53819.diff
Wed, Jul 15, 6:55 AM
F162632972: D53819.diff
Wed, Jul 15, 6:55 AM
Unknown Object (File)
Tue, Jun 30, 8:04 AM
Unknown Object (File)
Sun, Jun 21, 10:14 PM
Unknown Object (File)
Sat, Jun 20, 1:12 AM
Unknown Object (File)
Fri, Jun 19, 5:45 PM
Unknown Object (File)
Jun 10 2026, 4:39 AM
Unknown Object (File)
May 20 2026, 5:07 PM
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.