Page MenuHomeFreeBSD

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

Authored by brooks on Wed, Nov 19, 11:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 2, 1:47 PM
Unknown Object (File)
Tue, Dec 2, 5:42 AM
Unknown Object (File)
Sat, Nov 29, 8:34 PM
Unknown Object (File)
Fri, Nov 28, 10:00 AM
Unknown Object (File)
Fri, Nov 28, 12:53 AM
Unknown Object (File)
Sun, Nov 23, 2:20 PM
Unknown Object (File)
Thu, Nov 20, 11:14 PM
Unknown Object (File)
Thu, Nov 20, 11:13 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks created this revision.
This revision is now accepted and ready to land.Wed, Nov 19, 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.