Page MenuHomeFreeBSD

rtld-elf: Use clear pointer provenance when updating DTV pointer
ClosedPublic

Authored by jrtc27 on May 7 2025, 3:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 17, 6:56 AM
Unknown Object (File)
Sat, Jan 17, 6:43 AM
Unknown Object (File)
Thu, Jan 15, 11:56 PM
Unknown Object (File)
Mon, Jan 12, 6:21 AM
Unknown Object (File)
Wed, Jan 7, 10:23 PM
Unknown Object (File)
Dec 20 2025, 10:46 PM
Unknown Object (File)
Dec 12 2025, 5:22 AM
Unknown Object (File)
Dec 2 2025, 11:50 PM
Subscribers

Details

Summary

On traditional architectures where uintptr_t is just a plain integer,
there is no provenance from the order of operations. However, on CHERI
there is even for uintptr_t, and in future this code will use actual
pointer types anyway, where the provenance does technically matter even
for non-CHERI. Commute and associate the operands appropriately to
ensure the provenance is for the new allocation, not the old one.

Diff Detail

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