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
Unknown Object (File)
Sun, Feb 22, 2:53 AM
Unknown Object (File)
Sat, Feb 21, 7:38 PM
Unknown Object (File)
Thu, Feb 19, 8:51 AM
Unknown Object (File)
Sun, Feb 8, 1:10 PM
Unknown Object (File)
Sun, Feb 8, 1:19 AM
Unknown Object (File)
Fri, Jan 30, 9:21 PM
Unknown Object (File)
Jan 24 2026, 9:25 PM
Unknown Object (File)
Jan 23 2026, 9:35 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 70022
Build 66905: arc lint + arc unit