Page MenuHomeFreeBSD

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

Authored by brooks on Wed, Nov 19, 11:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 20, 11:14 PM
Unknown Object (File)
Thu, Nov 20, 11:13 PM
Unknown Object (File)
Thu, Nov 20, 11:05 PM
Unknown Object (File)
Thu, Nov 20, 5:39 PM
Unknown Object (File)
Thu, Nov 20, 5:35 PM
Unknown Object (File)
Thu, Nov 20, 5:23 PM
Unknown Object (File)
Wed, Nov 19, 11:14 PM
Unknown Object (File)
Wed, Nov 19, 3:09 PM
Subscribers

Details

Reviewers
imp
kib
markj
Group Reviewers
cheri
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.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.