]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make struct xinpcb and friends word-size independent.
authorbrooks <brooks@FreeBSD.org>
Thu, 5 Jul 2018 13:13:48 +0000 (13:13 +0000)
committerbrooks <brooks@FreeBSD.org>
Thu, 5 Jul 2018 13:13:48 +0000 (13:13 +0000)
commit6615ed4c6149c9810ba766e318f591d44a0596df
tree2532422476e51289aa873aa68c5e7b030eed8460
parent38475506db7ff2525c4dbae948163a1a8ca06bee
Make struct xinpcb and friends word-size independent.

Replace size_t members with ksize_t (uint64_t) and pointer members
(never used as pointers in userspace, but instead as unique
idenitifiers) with kvaddr_t (uint64_t). This makes the structs
identical between 32-bit and 64-bit ABIs.

On 64-bit bit systems, the ABI is maintained. On 32-bit systems,
this is an ABI breaking change. The ABI of most of these structs
was previously broken in r315662.  This also imposes a small API
change on userspace consumers who must handle kernel pointers
becoming virtual addresses.

PR: 228301 (exp-run by antoine)
Reviewed by: jtl, kib, rwatson (various versions)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D15386
18 files changed:
UPDATING
lib/libkvm/kvm.h
sys/kern/kern_descrip.c
sys/kern/uipc_socket.c
sys/kern/uipc_usrreq.c
sys/netinet/in_pcb.c
sys/netinet/in_pcb.h
sys/netinet/sctp_sysctl.c
sys/netinet/sctp_uio.h
sys/netinet/tcp_var.h
sys/sys/file.h
sys/sys/param.h
sys/sys/socketvar.h
sys/sys/types.h
sys/sys/unpcb.h
usr.bin/netstat/inet.c
usr.bin/netstat/unix.c
usr.bin/sockstat/sockstat.c