freebsd-skq/share/man
Conrad Meyer e6b95927f3 Fix core corruption caused by race in note_procstat_vmmap
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
2015-10-06 18:07:00 +00:00
..
man1 Add META_MODE support. 2015-06-13 19:20:56 +00:00
man3 Make the system queue header file fully usable within C++ programs by 2015-06-28 21:06:45 +00:00
man4 The Dt argument should be in capital letters. 2015-09-29 11:48:47 +00:00
man5 Fix core corruption caused by race in note_procstat_vmmap 2015-10-06 18:07:00 +00:00
man6 Add META_MODE support. 2015-06-13 19:20:56 +00:00
man7 /usr/src/games was removed in r288485. 2015-10-02 17:51:47 +00:00
man8 It's 2015, and some people are still trying to use fdisk and then 2015-09-02 14:08:43 +00:00
man9 Remove MLINKS to more non-existent mbuf(9) macros 2015-09-27 04:55:43 +00:00
Makefile Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00