HomeFreeBSD

MFC r278479,278494,278525,278545,278592,279237,280410:

Description

MFC r278479,278494,278525,278545,278592,279237,280410:

This change merges devctl notification for userland coredumps.

r278479 (rpaulo):

Notify devd(8) when a process crashed.

This change implements a notification (via devctl) to userland when
the kernel produces coredumps after a process has crashed.
devd can then run a specific command to produce a human readable crash
report.  The command is most usually a helper that runs gdb/lldb
commands on the file/coredump pair.  It's possible to use this
functionality for implementing automatic generation of crash reports.

devd(8) will be notified of the full path of the binary that crashed and
the full path of the coredump file.

r278494 (rpaulo):

Sanitise the coredump file names sent to devd.

While there, add a sysctl to turn this feature off as requested by kib@.

r278525 (rpaulo):

Remove a printf and an strlen() from the coredump code.

r278545 (rpaulo):

Restore the data array in coredump(), but use a different style to
calculate the length.

r278592 (rpaulo):

Remove check against NULL after M_WAITOK.

r279237 (kib):

Keep a reference on the coredump vnode for vn_fullpath() call.  Do it
by moving vn_close() after the point where notification is sent.

r280410 (rpaulo):

Disable coredump_devctl because it could lead to leaking paths to jails.

Approved by: re

Details

Committed
willAug 24 2017, 5:25 PM
Parents
rS322847: MFC r322752:
Branches
Unknown
Tags
Unknown