9c1e214f79
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 |
||
---|---|---|
.. | ||
tests | ||
_secure_path.3 | ||
_secure_path.c | ||
auth.c | ||
expand_number.3 | ||
expand_number.c | ||
flopen.3 | ||
flopen.c | ||
fparseln.3 | ||
fparseln.c | ||
gr_util.c | ||
hexdump.3 | ||
hexdump.c | ||
humanize_number.3 | ||
humanize_number.c | ||
kinfo_getallproc.3 | ||
kinfo_getallproc.c | ||
kinfo_getfile.3 | ||
kinfo_getfile.c | ||
kinfo_getproc.3 | ||
kinfo_getproc.c | ||
kinfo_getvmmap.3 | ||
kinfo_getvmmap.c | ||
kinfo_getvmobject.3 | ||
kinfo_getvmobject.c | ||
kld.3 | ||
kld.c | ||
libutil.h | ||
login_auth.3 | ||
login_auth.c | ||
login_cap.3 | ||
login_cap.c | ||
login_cap.h | ||
login_class.3 | ||
login_class.c | ||
login_crypt.c | ||
login_ok.3 | ||
login_ok.c | ||
login_times.3 | ||
login_times.c | ||
login_tty.3 | ||
login_tty.c | ||
login.conf.5 | ||
Makefile | ||
Makefile.depend | ||
pidfile.3 | ||
pidfile.c | ||
property.3 | ||
property.c | ||
pty.3 | ||
pty.c | ||
pw_util.3 | ||
pw_util.c | ||
quotafile.3 | ||
quotafile.c | ||
realhostname_sa.3 | ||
realhostname.3 | ||
realhostname.c | ||
stub.c | ||
trimdomain.3 | ||
trimdomain.c | ||
uucplock.3 | ||
uucplock.c |