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
F158258502: D54797.diff
Sat, May 30, 11:41 AM
Unknown Object (File)
Mon, May 25, 10:23 PM
Unknown Object (File)
Sat, May 23, 7:49 PM
Unknown Object (File)
Fri, May 22, 4:37 PM
Unknown Object (File)
Tue, May 19, 9:16 AM
Unknown Object (File)
Tue, May 19, 8:27 AM
Unknown Object (File)
Sun, May 17, 11:14 AM
Unknown Object (File)
Sun, May 17, 6:54 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