Skip to content

fault-injection capabilities (v3)

Akinobu Mita lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8documentation and scriptsDocumentation/fault-injection/failcmd.sh Documentation/fault-injection/failmodule.sh Documentation/fault-injection/fault-injection.txt+186 -02 replies
2/8fault-injection capabilities infrastructureinclude/linux/fault-inject.h lib/Kconfig.debug lib/Makefile +1 more+130 -02 replies
3/8fault-injection capability for kmallocinclude/linux/fault-inject.h lib/Kconfig.debug mm/slab.c+45 -00 replies
4/8fault-injection capability for alloc_pages()include/linux/fault-inject.h lib/Kconfig.debug mm/page_alloc.c+45 -00 replies
5/8fault-injection capability for disk IOblock/genhd.c block/ll_rw_blk.c fs/partitions/check.c +3 more+107 -00 replies
6/8debugfs entries for configurationlib/Kconfig.debug lib/Makefile lib/fault-inject-debugfs.c+188 -01 reply
7/8process filtering for fault-injection capabilitiesfs/proc/base.c include/linux/fault-inject.h include/linux/sched.h +1 more+96 -04 replies
8/8stacktrace filtering for fault-injection capabilitiesinclude/linux/fault-inject.h lib/Kconfig.debug lib/fault-inject-debugfs.c +1 more+120 -07 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/8] fault-injection capabilities (v3)

Changes from last version

- add stacktrace filter
- drop process-filter from boot-time setup
- build fixes from Don Mullis
- add documentation and some scripts

---

This patch set provides some fault-injection capabilities.

- kmalloc() failures

- alloc_pages() failures

- disk IO errors

We can see what really happens if those failures happen.

In order to enable these fault-injection capabilities:

1. Enable relevant config options (CONFIG_FAILSLAB, CONFIG_PAGE_ALLOC, CONFIG_MAKE_REQUEST) and runtime configuration kernel module (CONFIG_FAULT_INJECTION_DEBUGFS)

2. build and boot with this kernel

3. modprobe fault-inject-debugfs

4. configure fault-injection capabilities behavior by debugfs

For example about kmalloc failures:

/debug/failslab/probability

specifies how often it should fail in percent.

/debug/failslab/interval

specifies the interval of failures.

/debug/failslab/times

specifies how many times failures may happen at most.

/debug/failslab/space

specifies the size of free space where memory can be allocated safely in bytes.

/debug/failslab/process-filter

specifies whether process filter is enabled or not.
it allows failing only permitted processes by /proc/<pid>/make-it-fail

/debug/failslab/stacktrace-depth

specifies the maximum stacktrace depth walking allowed. a value '0' means stacktrace filter is disabled.

/debug/failslab/address-start
/debug/failslab/address-end

specifies the range of virtual address.
it allows failing only if the stacktrace hits in this range.

5. see what really happens.