Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107595359
D34184.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D34184.diff
View Options
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -2324,8 +2324,12 @@
static int
kqueue_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
{
+ struct kqueue *kq = fp->f_data;
kif->kf_type = KF_TYPE_KQUEUE;
+ kif->kf_un.kf_kqueue.kf_kqueue_addr = (uintptr_t)kq;
+ kif->kf_un.kf_kqueue.kf_kqueue_count = kq->kq_count;
+ kif->kf_un.kf_kqueue.kf_kqueue_state = kq->kq_state;
return (0);
}
diff --git a/sys/kern/sys_eventfd.c b/sys/kern/sys_eventfd.c
--- a/sys/kern/sys_eventfd.c
+++ b/sys/kern/sys_eventfd.c
@@ -341,6 +341,7 @@
mtx_lock(&efd->efd_lock);
kif->kf_un.kf_eventfd.kf_eventfd_value = efd->efd_count;
kif->kf_un.kf_eventfd.kf_eventfd_flags = efd->efd_flags;
+ kif->kf_un.kf_eventfd.kf_eventfd_addr = (uintptr_t)efd;
mtx_unlock(&efd->efd_lock);
return (0);
}
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1613,6 +1613,9 @@
kif->kf_un.kf_pipe.kf_pipe_addr = (uintptr_t)pi;
kif->kf_un.kf_pipe.kf_pipe_peer = (uintptr_t)pi->pipe_peer;
kif->kf_un.kf_pipe.kf_pipe_buffer_cnt = pi->pipe_buffer.cnt;
+ kif->kf_un.kf_pipe.kf_pipe_buffer_in = pi->pipe_buffer.in;
+ kif->kf_un.kf_pipe.kf_pipe_buffer_out = pi->pipe_buffer.out;
+ kif->kf_un.kf_pipe.kf_pipe_buffer_size = pi->pipe_buffer.size;
return (0);
}
diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c
--- a/sys/kern/sys_socket.c
+++ b/sys/kern/sys_socket.c
@@ -382,17 +382,19 @@
switch (kif->kf_un.kf_sock.kf_sock_domain0) {
case AF_INET:
case AF_INET6:
- if (kif->kf_un.kf_sock.kf_sock_protocol0 == IPPROTO_TCP) {
- if (so->so_pcb != NULL) {
- inpcb = (struct inpcb *)(so->so_pcb);
- kif->kf_un.kf_sock.kf_sock_inpcb =
- (uintptr_t)inpcb->inp_ppcb;
- kif->kf_un.kf_sock.kf_sock_sendq =
- sbused(&so->so_snd);
- kif->kf_un.kf_sock.kf_sock_recvq =
- sbused(&so->so_rcv);
- }
+ if (so->so_pcb != NULL) {
+ inpcb = (struct inpcb *)(so->so_pcb);
+ kif->kf_un.kf_sock.kf_sock_inpcb =
+ (uintptr_t)inpcb->inp_ppcb;
}
+ kif->kf_un.kf_sock.kf_sock_rcv_sb_state =
+ so->so_rcv.sb_state;
+ kif->kf_un.kf_sock.kf_sock_snd_sb_state =
+ so->so_snd.sb_state;
+ kif->kf_un.kf_sock.kf_sock_sendq =
+ sbused(&so->so_snd);
+ kif->kf_un.kf_sock.kf_sock_recvq =
+ sbused(&so->so_rcv);
break;
case AF_UNIX:
if (so->so_pcb != NULL) {
diff --git a/sys/sys/param.h b/sys/sys/param.h
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -76,7 +76,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1400061
+#define __FreeBSD_version 1400062
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
diff --git a/sys/sys/user.h b/sys/sys/user.h
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -420,8 +420,9 @@
uint64_t kf_pipe_addr;
uint64_t kf_pipe_peer;
uint32_t kf_pipe_buffer_cnt;
- /* Round to 64 bit alignment. */
- uint32_t kf_pipe_pad0[3];
+ uint32_t kf_pipe_buffer_in;
+ uint32_t kf_pipe_buffer_out;
+ uint32_t kf_pipe_buffer_size;
} kf_pipe;
struct {
uint32_t kf_spareint[4];
@@ -440,7 +441,14 @@
struct {
uint64_t kf_eventfd_value;
uint32_t kf_eventfd_flags;
+ uint32_t kf_eventfd_spareint[3];
+ uint64_t kf_eventfd_addr;
} kf_eventfd;
+ struct {
+ uint64_t kf_kqueue_addr;
+ int32_t kf_kqueue_count;
+ int32_t kf_kqueue_state;
+ } kf_kqueue;
} kf_un;
};
uint16_t kf_status; /* Status flags. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 17, 9:46 AM (21 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15837401
Default Alt Text
D34184.diff (3 KB)
Attached To
Mode
D34184: struct kinfo_file changes needed for lsof to work using only usermode APIs
Attached
Detach File
Event Timeline
Log In to Comment