brde at optusnet.com.au
Wed Jul 23 05:12:11 UTC 2008
On Mon, 21 Jul 2008, Alfred Perlstein wrote:
> Isn't it a bit strange to export 64bit pointers to 32 bit userspace?
Only for pointers in kernel objects, and I think the proposed change
doesn't touch that.
kvm_read() doesn't use pointers for kernel addresses. It uses unsigned
longs. But even uintmax_t is not enough in general, since the application
uintmax_t might be too small to represent a kernel pointer. The type
used shouldn't be fixed-width, but typedefed in an MD way like vm_offset_t.
vm_offset_t gives the correct integral type to use for (mapped) kernel
addresses and related compat_fewer_bit[s] type[s] are needed in userland.
It would probably be too hard to support the general case which requires
the compat types to be arrays or structs.
More information about the freebsd-arch