freebsd-dev/share/man/man5
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
..
a.out.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
acct.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
ar.5
autofs.5 Update the autofs(5) manual to reflect it first appeared in 2014-09-03 17:15:12 +00:00
bluetooth.device.conf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
bluetooth.hosts.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
bluetooth.protocols.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
boot.config.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
core.5 Fix core corruption caused by race in note_procstat_vmmap 2015-10-06 18:07:00 +00:00
devfs.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
devfs.conf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
devfs.rules.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
device.hints.5 Document the fact that tunables can be set in device.hints. 2015-07-23 17:27:10 +00:00
dir.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
disktab.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
elf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
ethers.5
eui64.5
ext2fs.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
fbtab.5
fdescfs.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
forward.5
freebsd-update.conf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
fs.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
fstab.5 Allow to disable BIO_DELETE passthru in fstab for swap-on-geli devices by 2015-08-08 09:57:38 +00:00
group.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
hesiod.conf.5
hosts.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
hosts.equiv.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
hosts.lpd.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
intro.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
libmap.conf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
link.5
linprocfs.5
linsysfs.5
mailer.conf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
make.conf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
Makefile Document src-env.conf and note its use for MAKEOBJDIRPREFIX and WITH_META_MDOE. 2015-09-17 17:45:20 +00:00
Makefile.depend Add META_MODE support. 2015-06-13 19:20:56 +00:00
moduli.5
motd.5
mqueuefs.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
msdosfs.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
nandfs.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
networks.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
nsmb.conf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
nsswitch.conf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
nullfs.5 Fix a rendering issue in the nullfs(5) manual page. 2015-02-10 18:49:13 +00:00
passwd.5 Correct the document date for last change. 2014-06-05 01:58:21 +00:00
pbm.5
periodic.conf.5 Allow additional flags to be passed to netstat -i in the daily status check. 2015-03-27 00:37:41 +00:00
pf.conf.5 pf: Remove support for 'scrub fragment crop|drop-ovl' 2015-08-27 21:27:47 +00:00
pf.os.5 Various mdoc fixes. 2014-12-21 12:13:49 +00:00
phones.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
portindex.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
portsnap.conf.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
procfs.5 Update description of process status output. 2013-04-22 20:14:57 +00:00
protocols.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
quota.user.5
rc.conf.5 Tweak the "rctl_enable" description to not give the impression 2015-08-23 13:51:06 +00:00
rctl.conf.5
regdomain.5
reiserfs.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00
remote.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
resolver.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
services.5 Various mdoc fixes. 2014-12-21 12:13:49 +00:00
shells.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
src.conf.5 Regenerate 2015-09-18 22:26:25 +00:00
stab.5 multiple: Remove 3rd clause from BSD license where approved by the 2014-03-14 03:07:51 +00:00
style.Makefile.5
sysctl.conf.5
tmpfs.5 use .Mt to mark up email addresses consistently (part6) 2014-06-23 08:27:27 +00:00