pkgsrc/sysutils/lsof/distinfo
jym 1373123a11 When we moved from fd_ofiles to a struct fdtab, the fd_ofiles became
an array of pointer (in struct fdtab) rather than a pointer of pointers.

Sadly for us, no, arrays and pointers are not equivalent from a memory
perspective: while pointers from/to another address space can
be consumed by kvm(3) to query for data in kernel space, arrays
are more tricky, especially when their content is copied in userland:
they are part of the copied struct.

Address of array members are only valid in their own address space,
in our case userland, which is (fortunately?) different from kernel space.
This breaks the various kvm_read() calls that query for file descriptor
information. Consequence: lsof(1) cannot print filedescriptor information
(starting from 5.99.14), and silently ignores the errors, as using
the userland fdtab (``dt'' variable) is not valid for kernel.

Fix that by using the ``fd_dt'' member of struct filedes, which stores
the address of the fdtab struct in kernel address space. Took a few hours
to understand what was going on with lsof(1), hmmm.

Luckily, fstat(1) uses the proper model (checked about 5min ago). Why
lsof(1) decided not to log an error on kvm_read() is... a good question.

Bump rev.
2011-03-21 00:22:02 +00:00

13 lines
706 B
Text

$NetBSD: distinfo,v 1.80 2011/03/21 00:22:02 jym Exp $
SHA1 (lsof_4.83.tar.bz2) = 1aee4c8de6959d84613030a65e90855a922493bf
RMD160 (lsof_4.83.tar.bz2) = 9a03b41362d68f93d9e7c2db824c8af6df978aa1
Size (lsof_4.83.tar.bz2) = 753094 bytes
SHA1 (patch-aa) = 4469a5fed540e3c5635b6082efedc477ea96a382
SHA1 (patch-ab) = 1501d8b0e6fd2c61949ba0d447c7b726655725c4
SHA1 (patch-ac) = dac0fcdfee97d42c8f23684a4321519b9f8698d9
SHA1 (patch-ad) = 4bd73dea4770c7f5a43be0d096c26e7d6728dd2c
SHA1 (patch-ae) = 1d8c1c3baf9575631c23d3ced7b12fab1df95cd6
SHA1 (patch-af) = b52c15a507960ecf33a61a3cbd608a92ebac1188
SHA1 (patch-ag) = 945d233d94a42510c47709554040534024f72926
SHA1 (patch-ah) = 2de22b9a3733f958298af5e33b66c0653c320f59