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
F163576722: D50230.id.diff
Fri, Jul 24, 4:03 PM
Unknown Object (File)
Thu, Jul 23, 4:00 AM
Unknown Object (File)
Wed, Jul 22, 9:59 AM
Unknown Object (File)
Sun, Jul 19, 10:42 PM
Unknown Object (File)
Thu, Jul 9, 1:42 AM
Unknown Object (File)
Mon, Jul 6, 1:21 PM
Unknown Object (File)
Mon, Jun 29, 1:50 PM
Unknown Object (File)
Sat, Jun 27, 12:57 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 Passed
Unit
No Test Coverage
Build Status
Buildable 63981
Build 60865: arc lint + arc unit