Page MenuHomeFreeBSD

Use unsigned intptr_t type for framebuffer addresses
ClosedPublic

Authored by jhibbits on Dec 2 2017, 1:48 AM.
Tags
None
Referenced Files
F81641666: D13332.id36282.diff
Fri, Apr 19, 9:22 AM
Unknown Object (File)
Tue, Apr 16, 3:26 PM
Unknown Object (File)
Thu, Mar 28, 10:30 PM
Unknown Object (File)
Sat, Mar 23, 4:58 AM
Unknown Object (File)
Feb 14 2024, 9:26 AM
Unknown Object (File)
Dec 23 2023, 4:13 AM
Unknown Object (File)
Dec 9 2023, 9:16 AM
Unknown Object (File)
Nov 30 2023, 3:36 AM
Subscribers

Details

Summary

Some architectures (powerpc Book-E) have a vm_paddr_t larger than intptr_t.
Casting from the intptr_t to vm_paddr_t causes sign extension, leading to a
potentially invalid address.

This was seen when running X on a PowerPC P1022 machine, which mapped the
backing framebuffer at 0xc1800000. When mmap()d by X, this yielded an invalid
address of 0xffffffffc1800000, or, as the hardware would see it, 0xfc1800000.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 13258
Build 13495: arc lint + arc unit