Page MenuHomeFreeBSD

rpctls_impl.c: Use a direct cast to uintptr_t instead of __DECONST
ClosedPublic

Authored by jhb on Jan 20 2026, 3:39 PM.
Tags
None
Referenced Files
F164840412: D54797.id.diff
Tue, Aug 4, 7:01 AM
F164813357: D54797.id170199.diff
Tue, Aug 4, 4:22 AM
F164790526: D54797.id170131.diff
Tue, Aug 4, 1:56 AM
Unknown Object (File)
Mon, Aug 3, 3:37 AM
Unknown Object (File)
Sun, Aug 2, 12:45 PM
Unknown Object (File)
Wed, Jul 29, 11:00 PM
Unknown Object (File)
Thu, Jul 23, 6:08 AM
Unknown Object (File)
Sun, Jul 19, 2:14 AM
Subscribers

Details

Summary

This fixes the build on CHERI architectures where the compiler warns
about a direct cast between uint64_t and const void * inside of
DECONST. However, GCC would also complain about this on 32-bit
kernels due to uint64_t not being the same size as a pointer. Also,
a direct cast to uintptr_t to right-size the cookie value is more
direct than using
DECONST given that there is no "const" pointer
involved in the expression.

Obtained from: CheriBSD
Sponsored by: AFRL, DARPA

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable