aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/unpcb.h
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2018-07-05 13:13:48 +0000
committerBrooks Davis <brooks@FreeBSD.org>2018-07-05 13:13:48 +0000
commitf38b68ae8aadd1e3fc55f9627b41651eab2f767e (patch)
tree2532422476e51289aa873aa68c5e7b030eed8460 /sys/sys/unpcb.h
parent4a7ec940e45555ef9e0398fccd83d5780857d927 (diff)
downloadsrc-f38b68ae8aadd1e3fc55f9627b41651eab2f767e.tar.gz
src-f38b68ae8aadd1e3fc55f9627b41651eab2f767e.zip
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
Notes
Notes: svn path=/head/; revision=335979
Diffstat (limited to 'sys/sys/unpcb.h')
-rw-r--r--sys/sys/unpcb.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/sys/unpcb.h b/sys/sys/unpcb.h
index 5126c11b4ff4..7363e5e47d03 100644
--- a/sys/sys/unpcb.h
+++ b/sys/sys/unpcb.h
@@ -138,12 +138,12 @@ struct unpcb {
*/
#ifdef _SYS_SOCKETVAR_H_
struct xunpcb {
- size_t xu_len; /* length of this structure */
- void *xu_unpp; /* to help netstat, fstat */
- void *unp_vnode; /* (s) */
- void *unp_conn; /* (s) */
- void *xu_firstref; /* (s) */
- void *xu_nextref; /* (s) */
+ ksize_t xu_len; /* length of this structure */
+ kvaddr_t xu_unpp; /* to help netstat, fstat */
+ kvaddr_t unp_vnode; /* (s) */
+ kvaddr_t unp_conn; /* (s) */
+ kvaddr_t xu_firstref; /* (s) */
+ kvaddr_t xu_nextref; /* (s) */
unp_gen_t unp_gencnt; /* (s) */
int64_t xu_spare64[8];
int32_t xu_spare32[8];
@@ -159,7 +159,7 @@ struct xunpcb {
} __aligned(8);
struct xunpgen {
- size_t xug_len;
+ ksize_t xug_len;
u_int xug_count;
unp_gen_t xug_gen;
so_gen_t xug_sogen;