History log of /freebsd-current/sys/kern/kern_fail.c
Revision Date Author Comments
# 0a713948 22-Nov-2023 Alexander Motin <mav@FreeBSD.org>

Replace random sbuf_printf() with cheaper cat/putc.


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 6fed89b1 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

kern: clean up empty lines in .c and .h files


# 7029da5c 26-Feb-2020 Pawel Biernacki <kaktus@FreeBSD.org>

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT

Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718


# bf2276f3 13-Dec-2019 John Baldwin <jhb@FreeBSD.org>

Use callout(9) instead of deprecated timeout(9) for fail points.

Allocate the callout structure on-demand from
fail_point_use_timeout_path() since most fail points do not use
timeouts.

Reviewed by: markj (earlier version), cem
Differential Revision: https://reviews.freebsd.org/D22599


# 8a36da99 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/kern: adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# 3bd485f9 18-May-2017 Mark Johnston <markj@FreeBSD.org>

Avoid open-coding PRI_UNCHANGED.

MFC after: 1 week


# 5abb3b74 21-Mar-2017 Conrad Meyer <cem@FreeBSD.org>

kern_fail: Allow sleeping for more than 2147483/hz seconds

Because of integer types, the timeout calculation result was limited to
INT_MAX / (1000 * hz) seconds. For systems with hz=10000, this is only 215
seconds. Perform the calculation with 64-bit math to allow sleeping for the
full INT_MAX / hz interval (215000 seconds on such hz=10000 systems).

Submitted by: Scott Ferris <sferris at isilon.com>
Sponsored by: Dell EMC Isilon


# 508d8569 09-Jun-2016 Mark Johnston <markj@FreeBSD.org>

Fix some cosmetic issues in kern_fail.c omitted from r296927.

Obtained from: Matthew Bryan <matthew.bryan@isilon.com>


# 82e17adc 16-Mar-2016 Conrad Meyer <cem@FreeBSD.org>

fail(9): Only gather/print stacks if STACK is enabled

This is a follow-up fix to the earlier r296927.

Reported by: bz
Sponsored by: EMC / Isilon Storage Division


# 70e20d4e 15-Mar-2016 Conrad Meyer <cem@FreeBSD.org>

fail(9): Upstreaming some fail point enhancements

This is several year's worth of fail point upgrades done at EMC Isilon. They
are interdependent enough that it makes sense to put a single diff up for them.
Primarily, we added:

- Changing all mainline execution paths to be lockless, which lets us use fail
points in more sleep-sensitive areas, and allows more parallel execution
- A number of additional commands, including 'pause' that lets us do some
interesting deterministic repros of race conditions
- The ability to dump the stacks of all threads sleeping on a fail point
- A number of other API changes to allow marking up the fail point's context in
the code, and firing callbacks before and after execution
- A man page update

Submitted by: Matthew Bryan <matthew.bryan@isilon.com>
Reviewed by: cem (earlier version), jhb, kib, pho
With feedback from: bdrewery
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5427


# ba008855 16-Mar-2015 Ian Lepore <ian@FreeBSD.org>

Use a regular sbuf + SYSCTL_OUT() rather than sbuf_new_for_sysctl() with
auto-draining, to avoid a potential copyout fault while holding a lock.

Pointed out by: jhb
Pointy hat to: ian


# b7733729 14-Mar-2015 Ian Lepore <ian@FreeBSD.org>

Use sbuf_new_for_sysctl() instead of plain sbuf_new() to ensure sysctl
string returned to userland is nulterminated.

PR: 195668


# d745c852 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.

This means that their use is restricted to a single C file.


# b5bd50ae 08-Jul-2011 Matthew D Fleming <mdf@FreeBSD.org>

Add an option to have a fail point term only execute when run by a
specified pid. This is helpful for automated testing involving a global
knob that would otherwise be executed by many other threads.

MFC after: 1 week


# 0894a9bc 08-Jul-2011 Matthew D Fleming <mdf@FreeBSD.org>

style(9) and cleanup fixes.

MFC after: 1 week


# 4b7c6844 21-Dec-2010 Matthew D Fleming <mdf@FreeBSD.org>

Initialize fp_location for explicitly managed fail points, and push
the parentheses around the location for simple fail points into the
location string. This makes the print on fail point set more
consistent between the two versions.

Also fix up fail.h a little for style(9): only use one of sys/param.h
and sys/types.h, and use the existing __XSTRING() macro instead of
rolling our own. Also fix up a few tabs on changed and nearby lines.

Lastly, since KFAIL_POINT_{BEGIN,END} are not meant for use outside
this file, just eliminate the macros entirely.

MFC after: 1 week


# d26b7945 21-Dec-2010 Matthew D Fleming <mdf@FreeBSD.org>

Move the fail_point_entry definition from fail.h to kern_fail.c, which
allows putting the enumeration constants of fail point types with the
text string that matches them.

MFC after: 1 week


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 7733cf8f 11-Feb-2010 Matt Jacob <mjacob@FreeBSD.org>

MFC a number of changes from head for ISP (203478,203463,203444,202418,201758,
201408,201325,200089,198822,197373,197372,197214,196162). Since one of those
changes was a semicolon cleanup from somebody else, this touches a lot more.


# c2ede4b3 07-Jan-2010 Martin Blapp <mbr@FreeBSD.org>

Remove extraneous semicolons, no functional changes.

Submitted by: Marc Balmer <marc@msys.ch>
MFC after: 1 week


# cfeb7489 27-May-2009 Zachary Loafman <zml@FreeBSD.org>

fail(9) support:

Add support for kernel fault injection using KFAIL_POINT_* macros and
fail_point_* infrastructure. Add example fail point in vfs_bio.c to
simulate VM buf pressure.

Approved by: dfr (mentor)