Summary: | [exp-run] Improve portability of struct xinpcb and friends | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Brooks Davis <brooks> | ||||
Component: | kern | Assignee: | Brooks Davis <brooks> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | CC: | emaste, swills | ||||
Priority: | --- | Flags: | antoine:
exp-run+
|
||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Brooks Davis
2018-05-16 18:23:22 UTC
Exp-run looks fine. Maybe you can have a look at devel/sigar and sysutils/py-psutil as they are candidates for using those API I took a quick look at those ports. devel/sigar does use this API, but so long as it compiles it should work (the API change just change things that are always used as integers from void * (etc) to int64_t. sysutils/py-psutil has comments about using xsocket, xinpcb, etc, but doesn't seem to actually do so. Given there wasn't any clear fallout, I think this is ready to land. A commit references this bug: Author: brooks Date: Thu Jul 5 13:13:53 UTC 2018 New revision: 335979 URL: https://svnweb.freebsd.org/changeset/base/335979 Log: 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 Changes: head/UPDATING head/lib/libkvm/kvm.h head/sys/kern/kern_descrip.c head/sys/kern/uipc_socket.c head/sys/kern/uipc_usrreq.c head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_uio.h head/sys/netinet/tcp_var.h head/sys/sys/file.h head/sys/sys/param.h head/sys/sys/socketvar.h head/sys/sys/types.h head/sys/sys/unpcb.h head/usr.bin/netstat/inet.c head/usr.bin/netstat/unix.c head/usr.bin/sockstat/sockstat.c |