Page MenuHomeFreeBSD

add types: (u)int64ptr_t
AcceptedPublic

Authored by brooks on Wed, Nov 19, 11:19 AM.
Tags
None
Referenced Files
F136807478: D53823.diff
Wed, Nov 19, 5:15 PM
F136801955: D53823.id.diff
Wed, Nov 19, 3:58 PM
F136801910: D53823.id166756.diff
Wed, Nov 19, 3:57 PM
F136799619: D53823.id166756.diff
Wed, Nov 19, 3:34 PM
F136797306: D53823.diff
Wed, Nov 19, 3:10 PM
Subscribers

Details

Reviewers
imp
kib
markj
Group Reviewers
cheri
Summary

This type represents an integer value of at least 64 bits which is
capable of being cast to and from pointer types. It is intended to
replace various spellings of (u)int64_t there the value is expected to
hold a pointer. This is common in Linux code to allow 32-bit and 64-bit
structures to be the same and used other places including OpenZFS. With
the introduction of CHERI this no longer works, but we need to preserve
the ABI for integer pointer targets. Rather than adding ifdefs in every
case, we introduce a new type.

Effort: CHERI upstreaming
Sponsored by: Innovate UK

Diff Detail

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

Event Timeline

brooks created this revision.
sys/sys/_stdint.h
81

We could include sys/_visible.h instead of checking for the definition.

83

A reasonable argument could be made that we should stick to the __ prefixed variants, but in CheriBSD we have intruded on the standard namespace.

markj added a subscriber: markj.
markj added inline comments.
sys/sys/_stdint.h
83

I think this type is useful enough that it makes sense to have the unprefixed variant. I used it in quite a few places in the cheri port of dtrace for instance.

This revision is now accepted and ready to land.Wed, Nov 19, 3:45 PM