Index: kern/kern_proc.c =================================================================== --- kern/kern_proc.c (revision 185343) +++ kern/kern_proc.c (working copy) @@ -1337,6 +1337,10 @@ return (sysctl_handle_string(oidp, sv_name, 0, req)); } +#ifdef KINFO_VMENTRY_SIZE +CTASSERT(sizeof(struct kinfo_vmentry) == KINFO_VMENTRY_SIZE); +#endif + static int sysctl_kern_proc_vmmap(SYSCTL_HANDLER_ARGS) { @@ -1461,9 +1465,9 @@ kve->kve_shadow_count = 0; } - kve->kve_start = (void*)entry->start; - kve->kve_end = (void*)entry->end; - kve->kve_offset = (off_t)entry->offset; + kve->kve_start = entry->start; + kve->kve_end = entry->end; + kve->kve_offset = entry->offset; if (entry->protection & VM_PROT_READ) kve->kve_protection |= KVME_PROT_READ; Index: kern/kern_descrip.c =================================================================== --- kern/kern_descrip.c (revision 185343) +++ kern/kern_descrip.c (working copy) @@ -2509,6 +2509,10 @@ SYSCTL_PROC(_kern, KERN_FILE, file, CTLTYPE_OPAQUE|CTLFLAG_RD, 0, 0, sysctl_kern_file, "S,xfile", "Entire file table"); +#ifdef KINFO_FILE_SIZE +CTASSERT(sizeof(struct kinfo_file) == KINFO_FILE_SIZE); +#endif + static int export_vnode_for_sysctl(struct vnode *vp, int type, struct kinfo_file *kif, struct filedesc *fdp, struct sysctl_req *req) Index: sys/user.h =================================================================== --- sys/user.h (revision 185343) +++ sys/user.h (working copy) @@ -277,13 +277,17 @@ #define KF_FLAG_DIRECT 0x00000040 #define KF_FLAG_HASLOCK 0x00000080 +#ifdef __amd64__ +#define KINFO_FILE_SIZE 1328 +#endif + struct kinfo_file { int kf_structsize; /* Size of kinfo_file. */ int kf_type; /* Descriptor type. */ int kf_fd; /* Array index. */ int kf_ref_count; /* Reference count. */ int kf_flags; /* Flags. */ - off_t kf_offset; /* Seek location. */ + uint64_t kf_offset; /* Seek location. */ int kf_vnode_type; /* Vnode type. */ int kf_sock_domain; /* Socket domain. */ int kf_sock_type; /* Socket type. */ @@ -313,23 +317,26 @@ #define KVME_FLAG_COW 0x00000001 #define KVME_FLAG_NEEDS_COPY 0x00000002 +#ifdef __amd64__ +#define KINFO_VMENTRY_SIZE 1160 +#endif + struct kinfo_vmentry { int kve_structsize; /* Size of kinfo_vmmapentry. */ int kve_type; /* Type of map entry. */ - void *kve_start; /* Starting pointer. */ - void *kve_end; /* Finishing pointer. */ + uint64_t kve_start; /* Starting address. */ + uint64_t kve_end; /* Finishing address. */ + uint64_t kve_offset; /* Mapping offset in object */ + uint64_t kve_fileid; /* inode number if vnode */ + uint32_t kve_fsid; /* dev_t of vnode location */ int kve_flags; /* Flags on map entry. */ int kve_resident; /* Number of resident pages. */ int kve_private_resident; /* Number of private pages. */ int kve_protection; /* Protection bitmask. */ int kve_ref_count; /* VM obj ref count. */ int kve_shadow_count; /* VM obj shadow count. */ + int _kve_ispare[16]; /* Space for more stuff. */ char kve_path[PATH_MAX]; /* Path to VM obj, if any. */ - void *_kve_pspare[8]; /* Space for more stuff. */ - off_t kve_offset; /* Mapping offset in object */ - uint64_t kve_fileid; /* inode number of vnode */ - dev_t kve_fsid; /* dev_t of vnode location */ - int _kve_ispare[3]; /* Space for more stuff. */ }; /* @@ -343,12 +350,15 @@ #define KKST_STATE_SWAPPED 1 /* Stack swapped out. */ #define KKST_STATE_RUNNING 2 /* Stack ephemeral. */ +#ifdef __amd64__ +#define KINFO_KSTACK_SIZE 1088 +#endif + struct kinfo_kstack { lwpid_t kkst_tid; /* ID of thread. */ int kkst_state; /* Validity of stack. */ char kkst_trace[KKST_MAXLEN]; /* String representing stack. */ - void *_kkst_pspare[8]; /* Space for more stuff. */ - int _kkst_ispare[8]; /* Space for more stuff. */ + int _kkst_ispare[16]; /* Space for more stuff. */ }; #endif