<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/lib/libprocstat/libprocstat.c, branch release/11.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2018-12-10T01:39:40Z</updated>
<entry>
<title>MFC r341448:</title>
<updated>2018-12-10T01:39:40Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2018-12-10T01:39:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=fff9befc26dcc70db6caf6c35b951044301895da'/>
<id>urn:sha1:fff9befc26dcc70db6caf6c35b951044301895da</id>
<content type='text'>
Print type designator 'D' for the KF_TYPE_DEV files.
</content>
</entry>
<entry>
<title>MFC r324237:</title>
<updated>2018-04-16T14:39:34Z</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2018-04-16T14:39:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=5317f44fe2ba2adb6cf0599d5837af42a0e37fec'/>
<id>urn:sha1:5317f44fe2ba2adb6cf0599d5837af42a0e37fec</id>
<content type='text'>
Make procstat(1) recognize process descriptors, so that it shows
"P" instead of "?" in "procstat -af" output. Note that there are
still a few more DTYPE_* kinds we don't decode yet.

Sponsored by:	DARPA, AFRL
</content>
</entry>
<entry>
<title>Revert r330897:</title>
<updated>2018-03-29T02:50:57Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-29T02:50:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4ab2e064d7950be84256d671a7ae93f87cc6aa36'/>
<id>urn:sha1:4ab2e064d7950be84256d671a7ae93f87cc6aa36</id>
<content type='text'>
This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)
</content>
</entry>
<entry>
<title>Partial merge of the SPDX changes</title>
<updated>2018-03-14T03:19:51Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-14T03:19:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=be5d0b9566b13fdf8cabebb63334cbec12bfc409'/>
<id>urn:sha1:be5d0b9566b13fdf8cabebb63334cbec12bfc409</id>
<content type='text'>
These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from:	pfg
</content>
</entry>
<entry>
<title>MFC r316304 (by tychon):</title>
<updated>2017-10-27T15:33:26Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2017-10-27T15:33:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=ab6990f888afb4edea86f9f756afd7ffb3bef879'/>
<id>urn:sha1:ab6990f888afb4edea86f9f756afd7ffb3bef879</id>
<content type='text'>
Reorder includes to placate MIPS build.

Reported and tested by:	David Wolfskill
</content>
</entry>
<entry>
<title>MFC r316286:</title>
<updated>2017-10-23T18:25:21Z</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2017-10-23T18:25:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=76fe1394564da491d556754bb602560437aaaa1d'/>
<id>urn:sha1:76fe1394564da491d556754bb602560437aaaa1d</id>
<content type='text'>
  Add support for capturing 'struct ptrace_lwpinfo' for signals resulting in a
  process dumping core in the corefile.

  Direct stable changed: Padding added to struct thread and td_si added to end
  with explicit bzeroing when forking/initializing a thread to preserve KBI.
</content>
</entry>
<entry>
<title>MFC r311715:</title>
<updated>2017-01-13T08:42:05Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-01-13T08:42:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=70d4fe94d9b158b83f0b392d55996ce59c3b93fe'/>
<id>urn:sha1:70d4fe94d9b158b83f0b392d55996ce59c3b93fe</id>
<content type='text'>
Use nitems({mib,name}) instead of hardcoding their value
</content>
</entry>
<entry>
<title>Fix core corruption caused by race in note_procstat_vmmap</title>
<updated>2015-10-06T18:07:00Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2015-10-06T18:07:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e6b95927f39018d10fcfc39f8236525c72b84d06'/>
<id>urn:sha1:e6b95927f39018d10fcfc39f8236525c72b84d06</id>
<content type='text'>
This fix is spiritually similar to r287442 and was discovered thanks to
the KASSERT added in that revision.

NT_PROCSTAT_VMMAP output length, when packing kinfo structs, is tied to
the length of filenames corresponding to vnodes in the process' vm map
via vn_fullpath.  As vnodes may move during coredump, this is racy.

We do not remove the race, only prevent it from causing coredump
corruption.

- Add a sysctl, kern.coredump_pack_vmmapinfo, to allow users to disable
  kinfo packing for PROCSTAT_VMMAP notes.  This avoids VMMAP corruption
  and truncation, even if names change, at the cost of up to PATH_MAX
  bytes per mapped object.  The new sysctl is documented in core.5.

- Fix note_procstat_vmmap to self-limit in the second pass.  This
  addresses corruption, at the cost of sometimes producing a truncated
  result.

- Fix PROCSTAT_VMMAP consumers libutil (and libprocstat, via copy-paste)
  to grok the new zero padding.

Reported by:	pho (https://people.freebsd.org/~pho/stress/log/datamove4-2.txt)
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3824
</content>
</entry>
<entry>
<title>Detect badly behaved coredump note helpers</title>
<updated>2015-09-03T20:32:10Z</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2015-09-03T20:32:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=14bdbaf2e40a827e84f6c2fe27b1f8229767f03c'/>
<id>urn:sha1:14bdbaf2e40a827e84f6c2fe27b1f8229767f03c</id>
<content type='text'>
Coredump notes depend on being able to invoke dump routines twice; once
in a dry-run mode to get the size of the note, and another to actually
emit the note to the corefile.

When a note helper emits a different length section the second time
around than the length it requested the first time, the kernel produces
a corrupt coredump.

NT_PROCSTAT_FILES output length, when packing kinfo structs, is tied to
the length of filenames corresponding to vnodes in the process' fd table
via vn_fullpath.  As vnodes may move around during dump, this is racy.

So:

 - Detect badly behaved notes in putnote() and pad underfilled notes.

 - Add a fail point, debug.fail_point.fill_kinfo_vnode__random_path to
   exercise the NT_PROCSTAT_FILES corruption.  It simply picks random
   lengths to expand or truncate paths to in fo_fill_kinfo_vnode().

 - Add a sysctl, kern.coredump_pack_fileinfo, to allow users to
   disable kinfo packing for PROCSTAT_FILES notes.  This should avoid
   both FILES note corruption and truncation, even if filenames change,
   at the cost of about 1 kiB in padding bloat per open fd.  Document
   the new sysctl in core.5.

 - Fix note_procstat_files to self-limit in the 2nd pass.  Since
   sometimes this will result in a short write, pad up to our advertised
   size.  This addresses note corruption, at the risk of sometimes
   truncating the last several fd info entries.

 - Fix NT_PROCSTAT_FILES consumers libutil and libprocstat to grok the
   zero padding.

With suggestions from:	bjk, jhb, kib, wblock
Approved by:	markj (mentor)
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3548
</content>
</entry>
<entry>
<title>Remove unused variable spotted by clang.</title>
<updated>2015-06-01T06:05:53Z</updated>
<author>
<name>Marcelo Araujo</name>
<email>araujo@FreeBSD.org</email>
</author>
<published>2015-06-01T06:05:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=a770b4d8ae6633c99e5ab0638ea2d04f028e8d26'/>
<id>urn:sha1:a770b4d8ae6633c99e5ab0638ea2d04f028e8d26</id>
<content type='text'>
Differential Revision:	D2685
Reviewed by:		rodrigc, stas
</content>
</entry>
</feed>
