]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reimplement support for userland core dump compression using a new interface
authorMark Johnston <markj@FreeBSD.org>
Mon, 9 Mar 2015 03:50:53 +0000 (03:50 +0000)
committerMark Johnston <markj@FreeBSD.org>
Mon, 9 Mar 2015 03:50:53 +0000 (03:50 +0000)
commitaa14e9b7c9d90c2db81e29b3c68bcee6129b8b4c
treec2951caec9b898eb9457779108d4f0b71d4607bb
parent10b92369a1d53e5ac4a0c81011605eb60295824d
Reimplement support for userland core dump compression using a new interface
in kern_gzio.c. The old gzio interface was somewhat inflexible and has not
worked properly since r272535: currently, the gzio functions are called with
a range lock held on the output vnode, but kern_gzio.c does not pass the
IO_RANGELOCKED flag to vn_rdwr() calls, resulting in deadlock when vn_rdwr()
attempts to reacquire the range lock. Moreover, the new gzio interface can
be used to implement kernel core compression.

This change also modifies the kernel configuration options needed to enable
userland core dump compression support: gzio is now an option rather than a
device, and the COMPRESS_USER_CORES option is removed. Core dump compression
is enabled using the kern.compress_user_cores sysctl/tunable.

Differential Revision: https://reviews.freebsd.org/D1832
Reviewed by: rpaulo
Discussed with: kib
share/man/man5/core.5
sys/conf/NOTES
sys/conf/options
sys/kern/imgact_elf.c
sys/kern/kern_gzio.c
sys/kern/kern_sig.c
sys/net/zlib.h
sys/sys/gzio.h [new file with mode: 0644]