HomeFreeBSD

Use unsigned intptr_t type for framebuffer addresses

Description

Use unsigned intptr_t type for framebuffer addresses

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.

Reviewed By: ray
Differential Revision: https://reviews.freebsd.org/D13332

Details

Provenance
jhibbitsAuthored on
Reviewer
ray
Differential Revision
D13332: Use unsigned intptr_t type for framebuffer addresses
Parents
rS326610: Fix random() prototype to match the system.
Branches
Unknown
Tags
Unknown