Page MenuHomeFreeBSD

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

Authored by will on Aug 24 2017, 12:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 30 2024, 7:35 AM
Unknown Object (File)
Jan 20 2024, 10:24 PM
Unknown Object (File)
Dec 23 2023, 4:10 AM
Unknown Object (File)
Nov 11 2023, 12:00 AM
Unknown Object (File)
Oct 9 2023, 10:56 PM
Unknown Object (File)
Apr 7 2023, 4:07 PM
Unknown Object (File)
Mar 21 2023, 11:36 AM
Unknown Object (File)
Mar 11 2023, 11:45 PM
Subscribers

Details

Reviewers
None
Summary

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.
Test Plan

Install updated kernel. Test with and without sysctl kern.coredump_devctl=1,
with an appropriate devd configuration & absolute path in kern.corefile.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 11218
Build 11596: arc lint + arc unit

Event Timeline

will retitled this revision from MFC r278479,278494,278525,278545,278592,279237,280410 from HEAD to stable/10. to MFC r278479,278494,278525,278545,278592,279237,280410:.Aug 24 2017, 2:26 AM
will edited the summary of this revision. (Show Details)