€•Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ3/translations/zh_CN/fault-injection/fault-injection”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/zh_TW/fault-injection/fault-injection”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/it_IT/fault-injection/fault-injection”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ja_JP/fault-injection/fault-injection”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ko_KR/fault-injection/fault-injection”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/pt_BR/fault-injection/fault-injection”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/sp_SP/fault-injection/fault-injection”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ+Fault injection capabilities infrastructure”h]”hŒ+Fault injection capabilities infrastructure”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒM/var/lib/git/docbuild/linux/Documentation/fault-injection/fault-injection.rst”h´KubhŒ paragraph”“”)�”}”(hŒ2See also "every_nth" module option for scsi_debug.”h]”hŒ6See also “every_nthâ€� module option for scsi_debug.”…”�”}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ&Available fault injection capabilities”h]”hŒ&Available fault injection capabilities”…”�”}”(hhÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhÛh²hh³hÊh´K ubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒQfailslab injects slab allocation failures. (kmalloc(), kmem_cache_alloc(), ...) ”h]”(hÌ)�”}”(hŒfailslab”h]”hŒfailslab”…”�”}”(hh÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hhóubhÌ)�”}”(hŒFinjects slab allocation failures. (kmalloc(), kmem_cache_alloc(), ...)”h]”hŒFinjects slab allocation failures. (kmalloc(), kmem_cache_alloc(), ...)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hhóubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubhò)�”}”(hŒZfail_page_alloc injects page allocation failures. (alloc_pages(), get_free_pages(), ...) ”h]”(hÌ)�”}”(hŒfail_page_alloc”h]”hŒfail_page_alloc”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhjubhÌ)�”}”(hŒHinjects page allocation failures. (alloc_pages(), get_free_pages(), ...)”h]”hŒHinjects page allocation failures. (alloc_pages(), get_free_pages(), ...)”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubhò)�”}”(hŒefail_usercopy injects failures in user memory access functions. (copy_from_user(), get_user(), ...) ”h]”(hÌ)�”}”(hŒ fail_usercopy”h]”hŒ fail_usercopy”…”�”}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj?ubhÌ)�”}”(hŒUinjects failures in user memory access functions. (copy_from_user(), get_user(), ...)”h]”hŒUinjects failures in user memory access functions. (copy_from_user(), get_user(), ...)”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj?ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubhò)�”}”(hŒ;fail_futex injects futex deadlock and uaddr fault errors. ”h]”(hÌ)�”}”(hŒ fail_futex”h]”hŒ fail_futex”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhjeubhÌ)�”}”(hŒ.injects futex deadlock and uaddr fault errors.”h]”hŒ.injects futex deadlock and uaddr fault errors.”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjeubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubhò)�”}”(hŒ/make-it-fail or /sys/block///make-it-fail. (submit_bio_noacct()) ”h]”(hÌ)�”}”(hŒfail_make_request”h]”hŒfail_make_request”…”�”}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj±ubhÌ)�”}”(hŒžinjects disk IO errors on devices permitted by setting /sys/block//make-it-fail or /sys/block///make-it-fail. (submit_bio_noacct())”h]”hŒžinjects disk IO errors on devices permitted by setting /sys/block//make-it-fail or /sys/block///make-it-fail. (submit_bio_noacct())”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K!hj±ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubhò)�”}”(hŒˆfail_mmc_request injects MMC data errors on devices permitted by setting debugfs entries under /sys/kernel/debug/mmc0/fail_mmc_request ”h]”(hÌ)�”}”(hŒfail_mmc_request”h]”hŒfail_mmc_request”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K%hj×ubhÌ)�”}”(hŒuinjects MMC data errors on devices permitted by setting debugfs entries under /sys/kernel/debug/mmc0/fail_mmc_request”h]”hŒuinjects MMC data errors on devices permitted by setting debugfs entries under /sys/kernel/debug/mmc0/fail_mmc_request”…”�”}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K'hj×ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubhò)�”}”(hŒÊfail_function injects error return on specific functions, which are marked by ALLOW_ERROR_INJECTION() macro, by setting debugfs entries under /sys/kernel/debug/fail_function. No boot option supported. ”h]”(hÌ)�”}”(hŒ fail_function”h]”hŒ fail_function”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K*hjýubhÌ)�”}”(hŒºinjects error return on specific functions, which are marked by ALLOW_ERROR_INJECTION() macro, by setting debugfs entries under /sys/kernel/debug/fail_function. No boot option supported.”h]”hŒºinjects error return on specific functions, which are marked by ALLOW_ERROR_INJECTION() macro, by setting debugfs entries under /sys/kernel/debug/fail_function. No boot option supported.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K,hjýubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubhò)�”}”(hX‡fail_skb_realloc inject skb (socket buffer) reallocation events into the network path. The primary goal is to identify and prevent issues related to pointer mismanagement in the network subsystem. By forcing skb reallocation at strategic points, this feature creates scenarios where existing pointers to skb headers become invalid. When the fault is injected and the reallocation is triggered, cached pointers to skb headers and data no longer reference valid memory locations. This deliberate invalidation helps expose code paths where proper pointer updating is neglected after a reallocation event. By creating these controlled fault scenarios, the system can catch instances where stale pointers are used, potentially leading to memory corruption or system instability. To select the interface to act on, write the network name to /sys/kernel/debug/fail_skb_realloc/devname. If this field is left empty (which is the default value), skb reallocation will be forced on all network interfaces. The effectiveness of this fault detection is enhanced when KASAN is enabled, as it helps identify invalid memory references and use-after-free (UAF) issues. ”h]”(hÌ)�”}”(hŒfail_skb_realloc”h]”hŒfail_skb_realloc”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K0hj#ubhÌ)�”}”(hX;inject skb (socket buffer) reallocation events into the network path. The primary goal is to identify and prevent issues related to pointer mismanagement in the network subsystem. By forcing skb reallocation at strategic points, this feature creates scenarios where existing pointers to skb headers become invalid.”h]”hX;inject skb (socket buffer) reallocation events into the network path. The primary goal is to identify and prevent issues related to pointer mismanagement in the network subsystem. By forcing skb reallocation at strategic points, this feature creates scenarios where existing pointers to skb headers become invalid.”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K2hj#ubhÌ)�”}”(hX When the fault is injected and the reallocation is triggered, cached pointers to skb headers and data no longer reference valid memory locations. This deliberate invalidation helps expose code paths where proper pointer updating is neglected after a reallocation event.”h]”hX When the fault is injected and the reallocation is triggered, cached pointers to skb headers and data no longer reference valid memory locations. This deliberate invalidation helps expose code paths where proper pointer updating is neglected after a reallocation event.”…”�”}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K8hj#ubhÌ)�”}”(hŒ«By creating these controlled fault scenarios, the system can catch instances where stale pointers are used, potentially leading to memory corruption or system instability.”h]”hŒ«By creating these controlled fault scenarios, the system can catch instances where stale pointers are used, potentially leading to memory corruption or system instability.”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K=hj#ubhÌ)�”}”(hŒÝTo select the interface to act on, write the network name to /sys/kernel/debug/fail_skb_realloc/devname. If this field is left empty (which is the default value), skb reallocation will be forced on all network interfaces.”h]”hŒÝTo select the interface to act on, write the network name to /sys/kernel/debug/fail_skb_realloc/devname. If this field is left empty (which is the default value), skb reallocation will be forced on all network interfaces.”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KAhj#ubhÌ)�”}”(hŒœThe effectiveness of this fault detection is enhanced when KASAN is enabled, as it helps identify invalid memory references and use-after-free (UAF) issues.”h]”hŒœThe effectiveness of this fault detection is enhanced when KASAN is enabled, as it helps identify invalid memory references and use-after-free (UAF) issues.”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KFhj#ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubhò)�”}”(hXNVMe fault injection inject NVMe status code and retry flag on devices permitted by setting debugfs entries under /sys/kernel/debug/nvme*/fault_inject. The default status code is NVME_SC_INVALID_OPCODE with no retry. The status code and retry flag can be set via the debugfs. ”h]”(hÌ)�”}”(hŒNVMe fault injection”h]”hŒNVMe fault injection”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KJhj�ubhÌ)�”}”(hŒþinject NVMe status code and retry flag on devices permitted by setting debugfs entries under /sys/kernel/debug/nvme*/fault_inject. The default status code is NVME_SC_INVALID_OPCODE with no retry. The status code and retry flag can be set via the debugfs.”h]”hŒþinject NVMe status code and retry flag on devices permitted by setting debugfs entries under /sys/kernel/debug/nvme*/fault_inject. The default status code is NVME_SC_INVALID_OPCODE with no retry. The status code and retry flag can be set via the debugfs.”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KLhj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubhò)�”}”(hXcNull test block driver fault injection inject IO timeouts by setting config items under /sys/kernel/config/nullb//timeout_inject, inject requeue requests by setting config items under /sys/kernel/config/nullb//requeue_inject, and inject init_hctx() errors by setting config items under /sys/kernel/config/nullb//init_hctx_fault_inject. ”h]”(hÌ)�”}”(hŒ&Null test block driver fault injection”h]”hŒ&Null test block driver fault injection”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KQhj§ubhÌ)�”}”(hX:inject IO timeouts by setting config items under /sys/kernel/config/nullb//timeout_inject, inject requeue requests by setting config items under /sys/kernel/config/nullb//requeue_inject, and inject init_hctx() errors by setting config items under /sys/kernel/config/nullb//init_hctx_fault_inject.”h]”hX:inject IO timeouts by setting config items under /sys/kernel/config/nullb//timeout_inject, inject requeue requests by setting config items under /sys/kernel/config/nullb//requeue_inject, and inject init_hctx() errors by setting config items under /sys/kernel/config/nullb//init_hctx_fault_inject.”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KShj§ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhhîh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1hìh³hÊh´K hhÛh²hubeh}”(h]”Œ&available-fault-injection-capabilities”ah ]”h"]”Œ&available fault injection capabilities”ah$]”h&]”uh1hµhh·h²hh³hÊh´K ubh¶)�”}”(hhh]”(h»)�”}”(hŒ/Configure fault-injection capabilities behavior”h]”hŒ/Configure fault-injection capabilities behavior”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÝh²hh³hÊh´K[ubh¶)�”}”(hhh]”(h»)�”}”(hŒdebugfs entries”h]”hŒdebugfs entries”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjîh²hh³hÊh´K^ubhÌ)�”}”(hŒ{fault-inject-debugfs kernel module provides some debugfs entries for runtime configuration of fault-injection capabilities.”h]”hŒ{fault-inject-debugfs kernel module provides some debugfs entries for runtime configuration of fault-injection capabilities.”…”�”}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K`hjîh²hubhí)�”}”(hhh]”(hò)�”}”(hX:/sys/kernel/debug/fail*/probability: likelihood of failure injection, in percent. Format: Note that one-failure-per-hundred is a very high error rate for some testcases. Consider setting probability=100 and configure /sys/kernel/debug/fail*/interval for such testcases. ”h]”(hÌ)�”}”(hŒ$/sys/kernel/debug/fail*/probability:”h]”hŒ$/sys/kernel/debug/fail*/probability:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KchjubhŒ block_quote”“”)�”}”(hŒölikelihood of failure injection, in percent. Format: Note that one-failure-per-hundred is a very high error rate for some testcases. Consider setting probability=100 and configure /sys/kernel/debug/fail*/interval for such testcases. ”h]”(hÌ)�”}”(hŒ,likelihood of failure injection, in percent.”h]”hŒ,likelihood of failure injection, in percent.”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kehj$ubhÌ)�”}”(hŒFormat: ”h]”hŒFormat: ”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kghj$ubhÌ)�”}”(hŒ´Note that one-failure-per-hundred is a very high error rate for some testcases. Consider setting probability=100 and configure /sys/kernel/debug/fail*/interval for such testcases.”h]”hŒ´Note that one-failure-per-hundred is a very high error rate for some testcases. Consider setting probability=100 and configure /sys/kernel/debug/fail*/interval for such testcases.”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kihj$ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´Kehjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hX/sys/kernel/debug/fail*/interval: specifies the interval between failures, for calls to should_fail() that pass all the other tests. Note that if you enable this, by setting interval>1, you will probably want to set probability=100. ”h]”(hÌ)�”}”(hŒ!/sys/kernel/debug/fail*/interval:”h]”hŒ!/sys/kernel/debug/fail*/interval:”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kmhj^ubj#)�”}”(hŒÈspecifies the interval between failures, for calls to should_fail() that pass all the other tests. Note that if you enable this, by setting interval>1, you will probably want to set probability=100. ”h]”(hÌ)�”}”(hŒbspecifies the interval between failures, for calls to should_fail() that pass all the other tests.”h]”hŒbspecifies the interval between failures, for calls to should_fail() that pass all the other tests.”…”�”}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KohjpubhÌ)�”}”(hŒcNote that if you enable this, by setting interval>1, you will probably want to set probability=100.”h]”hŒcNote that if you enable this, by setting interval>1, you will probably want to set probability=100.”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Krhjpubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´Kohj^ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒ‚/sys/kernel/debug/fail*/times: specifies how many times failures may happen at most. A value of -1 means "no limit". ”h]”(hÌ)�”}”(hŒ/sys/kernel/debug/fail*/times:”h]”hŒ/sys/kernel/debug/fail*/times:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kuhjœubj#)�”}”(hŒVspecifies how many times failures may happen at most. A value of -1 means "no limit". ”h]”hÌ)�”}”(hŒUspecifies how many times failures may happen at most. A value of -1 means "no limit".”h]”hŒYspecifies how many times failures may happen at most. A value of -1 means “no limitâ€�.”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kwhj®ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´Kwhjœubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒÑ/sys/kernel/debug/fail*/space: specifies an initial resource "budget", decremented by "size" on each call to should_fail(,size). Failure injection is suppressed until "space" reaches zero. ”h]”(hÌ)�”}”(hŒ/sys/kernel/debug/fail*/space:”h]”hŒ/sys/kernel/debug/fail*/space:”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KzhjÌubj#)�”}”(hŒŸspecifies an initial resource "budget", decremented by "size" on each call to should_fail(,size). Failure injection is suppressed until "space" reaches zero. ”h]”hÌ)�”}”(hŒžspecifies an initial resource "budget", decremented by "size" on each call to should_fail(,size). Failure injection is suppressed until "space" reaches zero.”h]”hŒªspecifies an initial resource “budgetâ€�, decremented by “sizeâ€� on each call to should_fail(,size). Failure injection is suppressed until “spaceâ€� reaches zero.”…”�”}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K|hjÞubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´K|hjÌubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hX@/sys/kernel/debug/fail*/verbose Format: { 0 | 1 | 2 } specifies the verbosity of the messages when failure is injected. '0' means no messages; '1' will print only a single log line per failure; '2' will print a call trace too -- useful to debug the problems revealed by fault injection. ”h]”(hÌ)�”}”(hŒ/sys/kernel/debug/fail*/verbose”h]”hŒ/sys/kernel/debug/fail*/verbose”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K€hjüubj#)�”}”(hXFormat: { 0 | 1 | 2 } specifies the verbosity of the messages when failure is injected. '0' means no messages; '1' will print only a single log line per failure; '2' will print a call trace too -- useful to debug the problems revealed by fault injection. ”h]”(hÌ)�”}”(hŒFormat: { 0 | 1 | 2 }”h]”hŒFormat: { 0 | 1 | 2 }”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‚hjubhÌ)�”}”(hŒéspecifies the verbosity of the messages when failure is injected. '0' means no messages; '1' will print only a single log line per failure; '2' will print a call trace too -- useful to debug the problems revealed by fault injection.”h]”hŒõspecifies the verbosity of the messages when failure is injected. ‘0’ means no messages; ‘1’ will print only a single log line per failure; ‘2’ will print a call trace too -- useful to debug the problems revealed by fault injection.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K„hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´K‚hjüubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒì/sys/kernel/debug/fail*/task-filter: Format: { 'Y' | 'N' } A value of 'N' disables filtering by process (default). Any positive value limits failures to only processes indicated by /proc//make-it-fail==1. ”h]”(hÌ)�”}”(hŒ$/sys/kernel/debug/fail*/task-filter:”h]”hŒ$/sys/kernel/debug/fail*/task-filter:”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‰hj:ubj#)�”}”(hŒ®Format: { 'Y' | 'N' } A value of 'N' disables filtering by process (default). Any positive value limits failures to only processes indicated by /proc//make-it-fail==1. ”h]”(hÌ)�”}”(hŒFormat: { 'Y' | 'N' }”h]”hŒFormat: { ‘Y’ | ‘N’ }”…”�”}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‹hjLubhÌ)�”}”(hŒ–A value of 'N' disables filtering by process (default). Any positive value limits failures to only processes indicated by /proc//make-it-fail==1.”h]”hŒšA value of ‘N’ disables filtering by process (default). Any positive value limits failures to only processes indicated by /proc//make-it-fail==1.”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K�hjLubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´K‹hj:ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hXü/sys/kernel/debug/fail*/require-start, /sys/kernel/debug/fail*/require-end, /sys/kernel/debug/fail*/reject-start, /sys/kernel/debug/fail*/reject-end: specifies the range of virtual addresses tested during stacktrace walking. Failure is injected only if some caller in the walked stacktrace lies within the required range, and none lies within the rejected range. Default required range is [0,ULONG_MAX) (whole of virtual address space). Default rejected range is [0,0). ”h]”(hÌ)�”}”(hŒ•/sys/kernel/debug/fail*/require-start, /sys/kernel/debug/fail*/require-end, /sys/kernel/debug/fail*/reject-start, /sys/kernel/debug/fail*/reject-end:”h]”hŒ•/sys/kernel/debug/fail*/require-start, /sys/kernel/debug/fail*/require-end, /sys/kernel/debug/fail*/reject-start, /sys/kernel/debug/fail*/reject-end:”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‘hjxubj#)�”}”(hXAspecifies the range of virtual addresses tested during stacktrace walking. Failure is injected only if some caller in the walked stacktrace lies within the required range, and none lies within the rejected range. Default required range is [0,ULONG_MAX) (whole of virtual address space). Default rejected range is [0,0). ”h]”hÌ)�”}”(hX@specifies the range of virtual addresses tested during stacktrace walking. Failure is injected only if some caller in the walked stacktrace lies within the required range, and none lies within the rejected range. Default required range is [0,ULONG_MAX) (whole of virtual address space). Default rejected range is [0,0).”h]”hX@specifies the range of virtual addresses tested during stacktrace walking. Failure is injected only if some caller in the walked stacktrace lies within the required range, and none lies within the rejected range. Default required range is [0,ULONG_MAX) (whole of virtual address space). Default rejected range is [0,0).”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K–hjŠubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´K–hjxubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒÇ/sys/kernel/debug/fail*/stacktrace-depth: specifies the maximum stacktrace depth walked during search for a caller within [require-start,require-end) OR [reject-start,reject-end). ”h]”(hÌ)�”}”(hŒ)/sys/kernel/debug/fail*/stacktrace-depth:”h]”hŒ)/sys/kernel/debug/fail*/stacktrace-depth:”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K�hj¨ubj#)�”}”(hŒŠspecifies the maximum stacktrace depth walked during search for a caller within [require-start,require-end) OR [reject-start,reject-end). ”h]”hÌ)�”}”(hŒ‰specifies the maximum stacktrace depth walked during search for a caller within [require-start,require-end) OR [reject-start,reject-end).”h]”hŒ‰specifies the maximum stacktrace depth walked during search for a caller within [require-start,require-end) OR [reject-start,reject-end).”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŸhjºubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´KŸhj¨ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒ×/sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem: Format: { 'Y' | 'N' } default is 'Y', setting it to 'N' will also inject failures into highmem/user allocations (__GFP_HIGHMEM allocations). ”h]”(hÌ)�”}”(hŒ5/sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem:”h]”hŒ5/sys/kernel/debug/fail_page_alloc/ignore-gfp-highmem:”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K£hjØubj#)�”}”(hŒŽFormat: { 'Y' | 'N' } default is 'Y', setting it to 'N' will also inject failures into highmem/user allocations (__GFP_HIGHMEM allocations). ”h]”(hÌ)�”}”(hŒFormat: { 'Y' | 'N' }”h]”hŒFormat: { ‘Y’ | ‘N’ }”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¥hjêubhÌ)�”}”(hŒvdefault is 'Y', setting it to 'N' will also inject failures into highmem/user allocations (__GFP_HIGHMEM allocations).”h]”hŒ~default is ‘Y’, setting it to ‘N’ will also inject failures into highmem/user allocations (__GFP_HIGHMEM allocations).”…”�”}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K§hjêubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´K¥hjØubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hX /sys/kernel/debug/failslab/cache-filter Format: { 'Y' | 'N' } default is 'N', setting it to 'Y' will only inject failures when objects are requests from certain caches. Select the cache by writing '1' to /sys/kernel/slab//failslab: ”h]”hŒdefinition_list”“”)�”}”(hhh]”hŒdefinition_list_item”“”)�”}”(hŒñ/sys/kernel/debug/failslab/cache-filter Format: { 'Y' | 'N' } default is 'N', setting it to 'Y' will only inject failures when objects are requests from certain caches. Select the cache by writing '1' to /sys/kernel/slab//failslab: ”h]”(hŒterm”“”)�”}”(hŒ'/sys/kernel/debug/failslab/cache-filter”h]”hŒ'/sys/kernel/debug/failslab/cache-filter”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j%h³hÊh´K°hj!ubhŒ definition”“”)�”}”(hhh]”(hÌ)�”}”(hŒFormat: { 'Y' | 'N' }”h]”hŒFormat: { ‘Y’ | ‘N’ }”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K«hj7ubhÌ)�”}”(hŒjdefault is 'N', setting it to 'Y' will only inject failures when objects are requests from certain caches.”h]”hŒrdefault is ‘N’, setting it to ‘Y’ will only inject failures when objects are requests from certain caches.”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K­hj7ubhÌ)�”}”(hŒESelect the cache by writing '1' to /sys/kernel/slab//failslab:”h]”hŒISelect the cache by writing ‘1’ to /sys/kernel/slab//failslab:”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K°hj7ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j5hj!ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´K°hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³Nh´Nubhò)�”}”(hŒ+/sys/kernel/debug/failslab/ignore-gfp-wait:”h]”hÌ)�”}”(hj~h]”hŒ+/sys/kernel/debug/failslab/ignore-gfp-wait:”…”�”}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K²hj|ubah}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒÝ/sys/kernel/debug/fail_page_alloc/ignore-gfp-wait: Format: { 'Y' | 'N' } default is 'Y', setting it to 'N' will also inject failures into allocations that can sleep (__GFP_DIRECT_RECLAIM allocations). ”h]”(hÌ)�”}”(hŒ2/sys/kernel/debug/fail_page_alloc/ignore-gfp-wait:”h]”hŒ2/sys/kernel/debug/fail_page_alloc/ignore-gfp-wait:”…”�”}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K³hj“ubj#)�”}”(hŒ—Format: { 'Y' | 'N' } default is 'Y', setting it to 'N' will also inject failures into allocations that can sleep (__GFP_DIRECT_RECLAIM allocations). ”h]”(hÌ)�”}”(hŒFormat: { 'Y' | 'N' }”h]”hŒFormat: { ‘Y’ | ‘N’ }”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kµhj¥ubhÌ)�”}”(hŒdefault is 'Y', setting it to 'N' will also inject failures into allocations that can sleep (__GFP_DIRECT_RECLAIM allocations).”h]”hŒ‡default is ‘Y’, setting it to ‘N’ will also inject failures into allocations that can sleep (__GFP_DIRECT_RECLAIM allocations).”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K·hj¥ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´Kµhj“ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒ/sys/kernel/debug/fail_page_alloc/min-order: specifies the minimum page allocation order to be injected failures. ”h]”(hÌ)�”}”(hŒ,/sys/kernel/debug/fail_page_alloc/min-order:”h]”hŒ,/sys/kernel/debug/fail_page_alloc/min-order:”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KºhjÑubj#)�”}”(hŒEspecifies the minimum page allocation order to be injected failures. ”h]”hÌ)�”}”(hŒDspecifies the minimum page allocation order to be injected failures.”h]”hŒDspecifies the minimum page allocation order to be injected failures.”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¼hjãubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´K¼hjÑubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒÌ/sys/kernel/debug/fail_futex/ignore-private: Format: { 'Y' | 'N' } default is 'N', setting it to 'Y' will disable failure injections when dealing with private (address space) futexes. ”h]”(hÌ)�”}”(hŒ,/sys/kernel/debug/fail_futex/ignore-private:”h]”hŒ,/sys/kernel/debug/fail_futex/ignore-private:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¿hjubj#)�”}”(hŒŒFormat: { 'Y' | 'N' } default is 'N', setting it to 'Y' will disable failure injections when dealing with private (address space) futexes. ”h]”(hÌ)�”}”(hŒFormat: { 'Y' | 'N' }”h]”hŒFormat: { ‘Y’ | ‘N’ }”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÁhjubhÌ)�”}”(hŒtdefault is 'N', setting it to 'Y' will disable failure injections when dealing with private (address space) futexes.”h]”hŒ|default is ‘N’, setting it to ‘Y’ will disable failure injections when dealing with private (address space) futexes.”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÃhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´KÁhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒ¹/sys/kernel/debug/fail_sunrpc/ignore-client-disconnect: Format: { 'Y' | 'N' } default is 'N', setting it to 'Y' will disable disconnect injection on the RPC client. ”h]”(hÌ)�”}”(hŒ7/sys/kernel/debug/fail_sunrpc/ignore-client-disconnect:”h]”hŒ7/sys/kernel/debug/fail_sunrpc/ignore-client-disconnect:”…”�”}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÆhj?ubj#)�”}”(hŒnFormat: { 'Y' | 'N' } default is 'N', setting it to 'Y' will disable disconnect injection on the RPC client. ”h]”(hÌ)�”}”(hŒFormat: { 'Y' | 'N' }”h]”hŒFormat: { ‘Y’ | ‘N’ }”…”�”}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÈhjQubhÌ)�”}”(hŒVdefault is 'N', setting it to 'Y' will disable disconnect injection on the RPC client.”h]”hŒ^default is ‘N’, setting it to ‘Y’ will disable disconnect injection on the RPC client.”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÊhjQubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´KÈhj?ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒ¹/sys/kernel/debug/fail_sunrpc/ignore-server-disconnect: Format: { 'Y' | 'N' } default is 'N', setting it to 'Y' will disable disconnect injection on the RPC server. ”h]”(hÌ)�”}”(hŒ7/sys/kernel/debug/fail_sunrpc/ignore-server-disconnect:”h]”hŒ7/sys/kernel/debug/fail_sunrpc/ignore-server-disconnect:”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÍhj}ubj#)�”}”(hŒnFormat: { 'Y' | 'N' } default is 'N', setting it to 'Y' will disable disconnect injection on the RPC server. ”h]”(hÌ)�”}”(hŒFormat: { 'Y' | 'N' }”h]”hŒFormat: { ‘Y’ | ‘N’ }”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÏhj�ubhÌ)�”}”(hŒVdefault is 'N', setting it to 'Y' will disable disconnect injection on the RPC server.”h]”hŒ^default is ‘N’, setting it to ‘Y’ will disable disconnect injection on the RPC server.”…”�”}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÑhj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´KÏhj}ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hŒ²/sys/kernel/debug/fail_sunrpc/ignore-cache-wait: Format: { 'Y' | 'N' } default is 'N', setting it to 'Y' will disable cache wait injection on the RPC server. ”h]”(hÌ)�”}”(hŒ0/sys/kernel/debug/fail_sunrpc/ignore-cache-wait:”h]”hŒ0/sys/kernel/debug/fail_sunrpc/ignore-cache-wait:”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÔhj»ubj#)�”}”(hŒnFormat: { 'Y' | 'N' } default is 'N', setting it to 'Y' will disable cache wait injection on the RPC server. ”h]”(hÌ)�”}”(hŒFormat: { 'Y' | 'N' }”h]”hŒFormat: { ‘Y’ | ‘N’ }”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÖhjÍubhÌ)�”}”(hŒVdefault is 'N', setting it to 'Y' will disable cache wait injection on the RPC server.”h]”hŒ^default is ‘N’, setting it to ‘Y’ will disable cache wait injection on the RPC server.”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KØhjÍubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´KÖhj»ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hXA/sys/kernel/debug/fail_function/inject: Format: { 'function-name' | '!function-name' | '' } specifies the target function of error injection by name. If the function name leads '!' prefix, given function is removed from injection list. If nothing specified ('') injection list is cleared. ”h]”(hÌ)�”}”(hŒ'/sys/kernel/debug/fail_function/inject:”h]”hŒ'/sys/kernel/debug/fail_function/inject:”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÛhjùubj#)�”}”(hŒúFormat: { 'function-name' | '!function-name' | '' } specifies the target function of error injection by name. If the function name leads '!' prefix, given function is removed from injection list. If nothing specified ('') injection list is cleared. ”h]”(hÌ)�”}”(hŒ3Format: { 'function-name' | '!function-name' | '' }”h]”hŒ?Format: { ‘function-name’ | ‘!function-name’ | ‘’ }”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÝhj ubhÌ)�”}”(hŒÄspecifies the target function of error injection by name. If the function name leads '!' prefix, given function is removed from injection list. If nothing specified ('') injection list is cleared.”h]”hŒÌspecifies the target function of error injection by name. If the function name leads ‘!’ prefix, given function is removed from injection list. If nothing specified (‘’) injection list is cleared.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kßhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´KÝhjùubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hXY/sys/kernel/debug/fail_function/injectable: (read only) shows error injectable functions and what type of error values can be specified. The error type will be one of below; - NULL: retval must be 0. - ERRNO: retval must be -1 to -MAX_ERRNO (-4096). - ERR_NULL: retval must be 0 or -1 to -MAX_ERRNO (-4096). ”h]”(hÌ)�”}”(hŒ+/sys/kernel/debug/fail_function/injectable:”h]”hŒ+/sys/kernel/debug/fail_function/injectable:”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kähj7ubj#)�”}”(hX(read only) shows error injectable functions and what type of error values can be specified. The error type will be one of below; - NULL: retval must be 0. - ERRNO: retval must be -1 to -MAX_ERRNO (-4096). - ERR_NULL: retval must be 0 or -1 to -MAX_ERRNO (-4096). ”h]”hÌ)�”}”(hX(read only) shows error injectable functions and what type of error values can be specified. The error type will be one of below; - NULL: retval must be 0. - ERRNO: retval must be -1 to -MAX_ERRNO (-4096). - ERR_NULL: retval must be 0 or -1 to -MAX_ERRNO (-4096).”h]”hX(read only) shows error injectable functions and what type of error values can be specified. The error type will be one of below; - NULL: retval must be 0. - ERRNO: retval must be -1 to -MAX_ERRNO (-4096). - ERR_NULL: retval must be 0 or -1 to -MAX_ERRNO (-4096).”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KæhjIubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´Kæhj7ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hX…/sys/kernel/debug/fail_function//retval: specifies the "error" return value to inject to the given function. This will be created when the user specifies a new injection entry. Note that this file only accepts unsigned values. So, if you want to use a negative errno, you better use 'printf' instead of 'echo', e.g.: $ printf %#x -12 > retval ”h]”(hÌ)�”}”(hŒ7/sys/kernel/debug/fail_function//retval:”h]”hŒ7/sys/kernel/debug/fail_function//retval:”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kíhjgubj#)�”}”(hX.specifies the "error" return value to inject to the given function. This will be created when the user specifies a new injection entry. Note that this file only accepts unsigned values. So, if you want to use a negative errno, you better use 'printf' instead of 'echo', e.g.: $ printf %#x -12 > retval ”h]”hÌ)�”}”(hX-specifies the "error" return value to inject to the given function. This will be created when the user specifies a new injection entry. Note that this file only accepts unsigned values. So, if you want to use a negative errno, you better use 'printf' instead of 'echo', e.g.: $ printf %#x -12 > retval”h]”hX9specifies the “errorâ€� return value to inject to the given function. This will be created when the user specifies a new injection entry. Note that this file only accepts unsigned values. So, if you want to use a negative errno, you better use ‘printf’ instead of ‘echo’, e.g.: $ printf %#x -12 > retval”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kïhjyubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´Kïhjgubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubhò)�”}”(hXÔ/sys/kernel/debug/fail_skb_realloc/devname: Specifies the network interface on which to force SKB reallocation. If left empty, SKB reallocation will be applied to all network interfaces. Example usage:: # Force skb reallocation on eth0 echo "eth0" > /sys/kernel/debug/fail_skb_realloc/devname # Clear the selection and force skb reallocation on all interfaces echo "" > /sys/kernel/debug/fail_skb_realloc/devname ”h]”(hÌ)�”}”(hŒ+/sys/kernel/debug/fail_skb_realloc/devname:”h]”hŒ+/sys/kernel/debug/fail_skb_realloc/devname:”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kõhj—ubj#)�”}”(hX}Specifies the network interface on which to force SKB reallocation. If left empty, SKB reallocation will be applied to all network interfaces. Example usage:: # Force skb reallocation on eth0 echo "eth0" > /sys/kernel/debug/fail_skb_realloc/devname # Clear the selection and force skb reallocation on all interfaces echo "" > /sys/kernel/debug/fail_skb_realloc/devname ”h]”(hÌ)�”}”(hŒ�Specifies the network interface on which to force SKB reallocation. If left empty, SKB reallocation will be applied to all network interfaces.”h]”hŒ�Specifies the network interface on which to force SKB reallocation. If left empty, SKB reallocation will be applied to all network interfaces.”…”�”}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K÷hj©ubhÌ)�”}”(hŒExample usage::”h]”hŒExample usage:”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kúhj©ubhŒ literal_block”“”)�”}”(hŒÒ# Force skb reallocation on eth0 echo "eth0" > /sys/kernel/debug/fail_skb_realloc/devname # Clear the selection and force skb reallocation on all interfaces echo "" > /sys/kernel/debug/fail_skb_realloc/devname”h]”hŒÒ# Force skb reallocation on eth0 echo "eth0" > /sys/kernel/debug/fail_skb_realloc/devname # Clear the selection and force skb reallocation on all interfaces echo "" > /sys/kernel/debug/fail_skb_realloc/devname”…”�”}”hjËsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jÉh³hÊh´Kühj©ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´K÷hj—ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1hìh³hÊh´Kchjîh²hubeh}”(h]”Œdebugfs-entries”ah ]”h"]”Œdebugfs entries”ah$]”h&]”uh1hµhjÝh²hh³hÊh´K^ubh¶)�”}”(hhh]”(h»)�”}”(hŒ Boot option”h]”hŒ Boot option”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjõh²hh³hÊh´MubhÌ)�”}”(hŒaIn order to inject faults while debugfs is not available (early boot time), use the boot option::”h]”hŒ`In order to inject faults while debugfs is not available (early boot time), use the boot option:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjõh²hubjÊ)�”}”(hŒ™failslab= fail_page_alloc= fail_usercopy= fail_make_request= fail_futex= fail_skb_realloc= mmc_core.fail_request=,,,”h]”hŒ™failslab= fail_page_alloc= fail_usercopy= fail_make_request= fail_futex= fail_skb_realloc= mmc_core.fail_request=,,,”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´Mhjõh²hubeh}”(h]”Œ boot-option”ah ]”h"]”Œ boot option”ah$]”h&]”uh1hµhjÝh²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒ proc entries”h]”hŒ proc entries”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj*h²hh³hÊh´Mubhí)�”}”(hhh]”hò)�”}”(hX÷/proc//fail-nth, /proc/self/task//fail-nth: Write to this file of integer N makes N-th call in the task fail. Read from this file returns a integer value. A value of '0' indicates that the fault setup with a previous write to this file was injected. A positive integer N indicates that the fault wasn't yet injected. Note that this file enables all types of faults (slab, futex, etc). This setting takes precedence over all other generic debugfs settings like probability, interval, times, etc. But per-capability settings (e.g. fail_futex/ignore-private) take precedence over it. This feature is intended for systematic testing of faults in a single system call. See an example below. ”h]”(hÌ)�”}”(hŒ5/proc//fail-nth, /proc/self/task//fail-nth:”h]”hŒ5/proc//fail-nth, /proc/self/task//fail-nth:”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj>ubj#)�”}”(hX„Write to this file of integer N makes N-th call in the task fail. Read from this file returns a integer value. A value of '0' indicates that the fault setup with a previous write to this file was injected. A positive integer N indicates that the fault wasn't yet injected. Note that this file enables all types of faults (slab, futex, etc). This setting takes precedence over all other generic debugfs settings like probability, interval, times, etc. But per-capability settings (e.g. fail_futex/ignore-private) take precedence over it. This feature is intended for systematic testing of faults in a single system call. See an example below. ”h]”(hÌ)�”}”(hXWrite to this file of integer N makes N-th call in the task fail. Read from this file returns a integer value. A value of '0' indicates that the fault setup with a previous write to this file was injected. A positive integer N indicates that the fault wasn't yet injected. Note that this file enables all types of faults (slab, futex, etc). This setting takes precedence over all other generic debugfs settings like probability, interval, times, etc. But per-capability settings (e.g. fail_futex/ignore-private) take precedence over it.”h]”hXWrite to this file of integer N makes N-th call in the task fail. Read from this file returns a integer value. A value of ‘0’ indicates that the fault setup with a previous write to this file was injected. A positive integer N indicates that the fault wasn’t yet injected. Note that this file enables all types of faults (slab, futex, etc). This setting takes precedence over all other generic debugfs settings like probability, interval, times, etc. But per-capability settings (e.g. fail_futex/ignore-private) take precedence over it.”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjPubhÌ)�”}”(hŒhThis feature is intended for systematic testing of faults in a single system call. See an example below.”h]”hŒhThis feature is intended for systematic testing of faults in a single system call. See an example below.”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjPubeh}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´Mhj>ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj;h²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1hìh³hÊh´Mhj*h²hubeh}”(h]”Œ proc-entries”ah ]”h"]”Œ proc entries”ah$]”h&]”uh1hµhjÝh²hh³hÊh´Mubeh}”(h]”Œ/configure-fault-injection-capabilities-behavior”ah ]”h"]”Œ/configure fault-injection capabilities behavior”ah$]”h&]”uh1hµhh·h²hh³hÊh´K[ubh¶)�”}”(hhh]”(h»)�”}”(hŒError Injectable Functions”h]”hŒError Injectable Functions”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj’h²hh³hÊh´M$ubhÌ)�”}”(hŒfThis part is for the kernel developers considering to add a function to ALLOW_ERROR_INJECTION() macro.”h]”hŒfThis part is for the kernel developers considering to add a function to ALLOW_ERROR_INJECTION() macro.”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M&hj’h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ/Requirements for the Error Injectable Functions”h]”hŒ/Requirements for the Error Injectable Functions”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj±h²hh³hÊh´M*ubhÌ)�”}”(hX#Since the function-level error injection forcibly changes the code path and returns an error even if the input and conditions are proper, this can cause unexpected kernel crash if you allow error injection on the function which is NOT error injectable. Thus, you (and reviewers) must ensure;”h]”hX#Since the function-level error injection forcibly changes the code path and returns an error even if the input and conditions are proper, this can cause unexpected kernel crash if you allow error injection on the function which is NOT error injectable. Thus, you (and reviewers) must ensure;”…”�”}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M,hj±h²hubhí)�”}”(hhh]”(hò)�”}”(hŒsThe function returns an error code if it fails, and the callers must check it correctly (need to recover from it). ”h]”hÌ)�”}”(hŒrThe function returns an error code if it fails, and the callers must check it correctly (need to recover from it).”h]”hŒrThe function returns an error code if it fails, and the callers must check it correctly (need to recover from it).”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M1hjÓubah}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÐh²hh³hÊh´Nubhò)�”}”(hXgThe function does not execute any code which can change any state before the first error return. The state includes global or local, or input variable. For example, clear output address storage (e.g. `*ret = NULL`), increments/decrements counter, set a flag, preempt/irq disable or get a lock (if those are recovered before returning error, that will be OK.) ”h]”hÌ)�”}”(hXfThe function does not execute any code which can change any state before the first error return. The state includes global or local, or input variable. For example, clear output address storage (e.g. `*ret = NULL`), increments/decrements counter, set a flag, preempt/irq disable or get a lock (if those are recovered before returning error, that will be OK.)”h]”(hŒÈThe function does not execute any code which can change any state before the first error return. The state includes global or local, or input variable. For example, clear output address storage (e.g. ”…”�”}”(hjïh²hh³Nh´NubhŒtitle_reference”“”)�”}”(hŒ `*ret = NULL`”h]”hŒ *ret = NULL”…”�”}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j÷hjïubhŒ‘), increments/decrements counter, set a flag, preempt/irq disable or get a lock (if those are recovered before returning error, that will be OK.)”…”�”}”(hjïh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M4hjëubah}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÐh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1hìh³hÊh´M1hj±h²hubhÌ)�”}”(hXKThe first requirement is important, and it will result in that the release (free objects) functions are usually harder to inject errors than allocate functions. If errors of such release functions are not correctly handled it will cause a memory leak easily (the caller will confuse that the object has been released or corrupted.)”h]”hXKThe first requirement is important, and it will result in that the release (free objects) functions are usually harder to inject errors than allocate functions. If errors of such release functions are not correctly handled it will cause a memory leak easily (the caller will confuse that the object has been released or corrupted.)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M:hj±h²hubhÌ)�”}”(hŒ×The second one is for the caller which expects the function should always does something. Thus if the function error injection skips whole of the function, the expectation is betrayed and causes an unexpected error.”h]”hŒ×The second one is for the caller which expects the function should always does something. Thus if the function error injection skips whole of the function, the expectation is betrayed and causes an unexpected error.”…”�”}”(hj+ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M@hj±h²hubeh}”(h]”Œ/requirements-for-the-error-injectable-functions”ah ]”h"]”Œ/requirements for the error injectable functions”ah$]”h&]”uh1hµhj’h²hh³hÊh´M*ubh¶)�”}”(hhh]”(h»)�”}”(hŒ&Type of the Error Injectable Functions”h]”hŒ&Type of the Error Injectable Functions”…”�”}”(hjD h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjA h²hh³hÊh´MEubhÌ)�”}”(hXiEach error injectable functions will have the error type specified by the ALLOW_ERROR_INJECTION() macro. You have to choose it carefully if you add a new error injectable function. If the wrong error type is chosen, the kernel may crash because it may not be able to handle the error. There are 4 types of errors defined in include/asm-generic/error-injection.h”h]”hXiEach error injectable functions will have the error type specified by the ALLOW_ERROR_INJECTION() macro. You have to choose it carefully if you add a new error injectable function. If the wrong error type is chosen, the kernel may crash because it may not be able to handle the error. There are 4 types of errors defined in include/asm-generic/error-injection.h”…”�”}”(hjR h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MGhjA h²hubj)�”}”(hhh]”(j )�”}”(hŒeEI_ETYPE_NULL This function will return `NULL` if it fails. e.g. return an allocated object address. ”h]”(j&)�”}”(hŒ EI_ETYPE_NULL”h]”hŒ EI_ETYPE_NULL”…”�”}”(hjg h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j%h³hÊh´MOhjc ubj6)�”}”(hhh]”hÌ)�”}”(hŒVThis function will return `NULL` if it fails. e.g. return an allocated object address.”h]”(hŒThis function will return ”…”�”}”(hjx h²hh³Nh´Nubjø)�”}”(hŒ`NULL`”h]”hŒNULL”…”�”}”(hj€ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j÷hjx ubhŒ6 if it fails. e.g. return an allocated object address.”…”�”}”(hjx h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MNhju ubah}”(h]”h ]”h"]”h$]”h&]”uh1j5hjc ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´MOhj` ubj )�”}”(hŒàEI_ETYPE_ERRNO This function will return an `-errno` error code if it fails. e.g. return -EINVAL if the input is wrong. This will include the functions which will return an address which encodes `-errno` by ERR_PTR() macro. ”h]”(j&)�”}”(hŒEI_ETYPE_ERRNO”h]”hŒEI_ETYPE_ERRNO”…”�”}”(hj¨ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j%h³hÊh´MThj¤ ubj6)�”}”(hhh]”hÌ)�”}”(hŒÐThis function will return an `-errno` error code if it fails. e.g. return -EINVAL if the input is wrong. This will include the functions which will return an address which encodes `-errno` by ERR_PTR() macro.”h]”(hŒThis function will return an ”…”�”}”(hj¹ h²hh³Nh´Nubjø)�”}”(hŒ`-errno`”h]”hŒ-errno”…”�”}”(hjÁ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j÷hj¹ ubhŒ� error code if it fails. e.g. return -EINVAL if the input is wrong. This will include the functions which will return an address which encodes ”…”�”}”(hj¹ h²hh³Nh´Nubjø)�”}”(hŒ`-errno`”h]”hŒ-errno”…”�”}”(hjÓ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j÷hj¹ ubhŒ by ERR_PTR() macro.”…”�”}”(hj¹ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MRhj¶ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j5hj¤ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´MThj` h²hubj )�”}”(hŒÄEI_ETYPE_ERRNO_NULL This function will return an `-errno` or `NULL` if it fails. If the caller of this function checks the return value with IS_ERR_OR_NULL() macro, this type will be appropriate. ”h]”(j&)�”}”(hŒEI_ETYPE_ERRNO_NULL”h]”hŒEI_ETYPE_ERRNO_NULL”…”�”}”(hjû h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j%h³hÊh´MYhj÷ ubj6)�”}”(hhh]”hÌ)�”}”(hŒ¯This function will return an `-errno` or `NULL` if it fails. If the caller of this function checks the return value with IS_ERR_OR_NULL() macro, this type will be appropriate.”h]”(hŒThis function will return an ”…”�”}”(hj h²hh³Nh´Nubjø)�”}”(hŒ`-errno`”h]”hŒ-errno”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j÷hj ubhŒ or ”…”�”}”(hj h²hh³Nh´Nubjø)�”}”(hŒ`NULL`”h]”hŒNULL”…”�”}”(hj& h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j÷hj ubhŒ€ if it fails. If the caller of this function checks the return value with IS_ERR_OR_NULL() macro, this type will be appropriate.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MWhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j5hj÷ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´MYhj` h²hubj )�”}”(hŒVEI_ETYPE_TRUE This function will return `true` (non-zero positive value) if it fails. ”h]”(j&)�”}”(hŒ EI_ETYPE_TRUE”h]”hŒ EI_ETYPE_TRUE”…”�”}”(hjN h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j%h³hÊh´M\hjJ ubj6)�”}”(hhh]”hÌ)�”}”(hŒGThis function will return `true` (non-zero positive value) if it fails.”h]”(hŒThis function will return ”…”�”}”(hj_ h²hh³Nh´Nubjø)�”}”(hŒ`true`”h]”hŒtrue”…”�”}”(hjg h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j÷hj_ ubhŒ' (non-zero positive value) if it fails.”…”�”}”(hj_ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M\hj\ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j5hjJ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÊh´M\hj` h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjA h²hh³hÊh´NubhÌ)�”}”(hŒæIf you specifies a wrong type, for example, EI_TYPE_ERRNO for the function which returns an allocated object, it may cause a problem because the returned value is not an object address and the caller can not access to the address.”h]”hŒæIf you specifies a wrong type, for example, EI_TYPE_ERRNO for the function which returns an allocated object, it may cause a problem because the returned value is not an object address and the caller can not access to the address.”…”�”}”(hj‘ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M^hjA h²hubeh}”(h]”Œ&type-of-the-error-injectable-functions”ah ]”h"]”Œ&type of the error injectable functions”ah$]”h&]”uh1hµhj’h²hh³hÊh´MEubeh}”(h]”Œerror-injectable-functions”ah ]”h"]”Œerror injectable functions”ah$]”h&]”uh1hµhh·h²hh³hÊh´M$ubh¶)�”}”(hhh]”(h»)�”}”(hŒ)How to add new fault injection capability”h]”hŒ)How to add new fault injection capability”…”�”}”(hj² h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj¯ h²hh³hÊh´Mdubhí)�”}”(hhh]”(hò)�”}”(hŒ #include ”h]”hÌ)�”}”(hŒ#include ”h]”hŒ#include ”…”�”}”(hjÇ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mfhjà ubah}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÀ h²hh³hÊh´Nubhò)�”}”(hŒ†define the fault attributes DECLARE_FAULT_ATTR(name); Please see the definition of struct fault_attr in fault-inject.h for details. ”h]”(hÌ)�”}”(hŒdefine the fault attributes”h]”hŒdefine the fault attributes”…”�”}”(hjß h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhhjÛ ubhÌ)�”}”(hŒDECLARE_FAULT_ATTR(name);”h]”hŒDECLARE_FAULT_ATTR(name);”…”�”}”(hjí h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MjhjÛ ubhÌ)�”}”(hŒMPlease see the definition of struct fault_attr in fault-inject.h for details.”h]”hŒMPlease see the definition of struct fault_attr in fault-inject.h for details.”…”�”}”(hjû h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MlhjÛ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÀ h²hh³hÊh´Nubhò)�”}”(hŒ,provide a way to configure fault attributes ”h]”hÌ)�”}”(hŒ+provide a way to configure fault attributes”h]”hŒ+provide a way to configure fault attributes”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mohj ubah}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÀ h²hh³hÊh´Nubhò)�”}”(hŒÆboot option If you need to enable the fault injection capability from boot time, you can provide boot option to configure it. There is a helper function for it: setup_fault_attr(attr, str); ”h]”(hÌ)�”}”(hŒ boot option”h]”hŒ boot option”…”�”}”(hj+ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mqhj' ubhÌ)�”}”(hŒ”If you need to enable the fault injection capability from boot time, you can provide boot option to configure it. There is a helper function for it:”h]”hŒ”If you need to enable the fault injection capability from boot time, you can provide boot option to configure it. There is a helper function for it:”…”�”}”(hj9 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mshj' ubj#)�”}”(hŒsetup_fault_attr(attr, str); ”h]”hÌ)�”}”(hŒsetup_fault_attr(attr, str);”h]”hŒsetup_fault_attr(attr, str);”…”�”}”(hjK h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MvhjG ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´Mvhj' ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÀ h²hh³hÊh´Nubhò)�”}”(hŒ§debugfs entries failslab, fail_page_alloc, fail_usercopy, and fail_make_request use this way. Helper functions: fault_create_debugfs_attr(name, parent, attr); ”h]”(hÌ)�”}”(hŒdebugfs entries”h]”hŒdebugfs entries”…”�”}”(hji h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mxhje ubhÌ)�”}”(hŒ_failslab, fail_page_alloc, fail_usercopy, and fail_make_request use this way. Helper functions:”h]”hŒ_failslab, fail_page_alloc, fail_usercopy, and fail_make_request use this way. Helper functions:”…”�”}”(hjw h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mzhje ubj#)�”}”(hŒ/fault_create_debugfs_attr(name, parent, attr); ”h]”hÌ)�”}”(hŒ.fault_create_debugfs_attr(name, parent, attr);”h]”hŒ.fault_create_debugfs_attr(name, parent, attr);”…”�”}”(hj‰ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M}hj… ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´M}hje ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÀ h²hh³hÊh´Nubhò)�”}”(hŒµmodule parameters If the scope of the fault injection capability is limited to a single kernel module, it is better to provide module parameters to configure the fault attributes. ”h]”(hÌ)�”}”(hŒmodule parameters”h]”hŒmodule parameters”…”�”}”(hj§ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj£ ubhÌ)�”}”(hŒ¡If the scope of the fault injection capability is limited to a single kernel module, it is better to provide module parameters to configure the fault attributes.”h]”hŒ¡If the scope of the fault injection capability is limited to a single kernel module, it is better to provide module parameters to configure the fault attributes.”…”�”}”(hjµ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M�hj£ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÀ h²hh³hÊh´Nubhò)�”}”(hŒ‡add a hook to insert failures Upon should_fail() returning true, client code should inject a failure: should_fail(attr, size); ”h]”(hÌ)�”}”(hŒadd a hook to insert failures”h]”hŒadd a hook to insert failures”…”�”}”(hjÍ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M…hjÉ ubhÌ)�”}”(hŒGUpon should_fail() returning true, client code should inject a failure:”h]”hŒGUpon should_fail() returning true, client code should inject a failure:”…”�”}”(hjÛ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M‡hjÉ ubj#)�”}”(hŒshould_fail(attr, size); ”h]”hÌ)�”}”(hŒshould_fail(attr, size);”h]”hŒshould_fail(attr, size);”…”�”}”(hjí h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M‰hjé ubah}”(h]”h ]”h"]”h$]”h&]”uh1j"h³hÊh´M‰hjÉ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÀ h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1hìh³hÊh´Mfhj¯ h²hubeh}”(h]”Œ)how-to-add-new-fault-injection-capability”ah ]”h"]”Œ)how to add new fault injection capability”ah$]”h&]”uh1hµhh·h²hh³hÊh´Mdubh¶)�”}”(hhh]”(h»)�”}”(hŒApplication Examples”h]”hŒApplication Examples”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´MŒubhí)�”}”(hhh]”hò)�”}”(hXInject slab allocation failures into module init/exit code:: #!/bin/bash FAILTYPE=failslab echo Y > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait faulty_system() { bash -c "echo 1 > /proc/self/make-it-fail && exec $*" } if [ $# -eq 0 ] then echo "Usage: $0 modulename [ modulename ... ]" exit 1 fi for m in $* do echo inserting $m... faulty_system modprobe $m echo removing $m... faulty_system modprobe -r $m done ”h]”(hÌ)�”}”(hŒ /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait faulty_system() { bash -c "echo 1 > /proc/self/make-it-fail && exec $*" } if [ $# -eq 0 ] then echo "Usage: $0 modulename [ modulename ... ]" exit 1 fi for m in $* do echo inserting $m... faulty_system modprobe $m echo removing $m... faulty_system modprobe -r $m done”h]”hX–#!/bin/bash FAILTYPE=failslab echo Y > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait faulty_system() { bash -c "echo 1 > /proc/self/make-it-fail && exec $*" } if [ $# -eq 0 ] then echo "Usage: $0 modulename [ modulename ... ]" exit 1 fi for m in $* do echo inserting $m... faulty_system modprobe $m echo removing $m... faulty_system modprobe -r $m done”…”�”•fF}”hj; sbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´M�hj) ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhj& h²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1hìh³hÊh´MŽhj h²hubhŒ transition”“”)�”}”(hŒN------------------------------------------------------------------------------”h]”h}”(h]”h ]”h"]”h$]”h&]”uh1jU h³hÊh´M¯hj h²hubhí)�”}”(hhh]”hò)�”}”(hXgInject page allocation failures only for a specific module:: #!/bin/bash FAILTYPE=fail_page_alloc module=$1 if [ -z $module ] then echo "Usage: $0 " exit 1 fi modprobe $module if [ ! -d /sys/module/$module/sections ] then echo Module $module is not loaded exit 1 fi cat /sys/module/$module/sections/.text > /sys/kernel/debug/$FAILTYPE/require-start cat /sys/module/$module/sections/.data > /sys/kernel/debug/$FAILTYPE/require-end echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-highmem echo 10 > /sys/kernel/debug/$FAILTYPE/stacktrace-depth trap "echo 0 > /sys/kernel/debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT echo "Injecting errors into the module $module... (interrupt to stop)" sleep 1000000 ”h]”(hÌ)�”}”(hŒ" exit 1 fi modprobe $module if [ ! -d /sys/module/$module/sections ] then echo Module $module is not loaded exit 1 fi cat /sys/module/$module/sections/.text > /sys/kernel/debug/$FAILTYPE/require-start cat /sys/module/$module/sections/.data > /sys/kernel/debug/$FAILTYPE/require-end echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-highmem echo 10 > /sys/kernel/debug/$FAILTYPE/stacktrace-depth trap "echo 0 > /sys/kernel/debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT echo "Injecting errors into the module $module... (interrupt to stop)" sleep 1000000”h]”hXð#!/bin/bash FAILTYPE=fail_page_alloc module=$1 if [ -z $module ] then echo "Usage: $0 " exit 1 fi modprobe $module if [ ! -d /sys/module/$module/sections ] then echo Module $module is not loaded exit 1 fi cat /sys/module/$module/sections/.text > /sys/kernel/debug/$FAILTYPE/require-start cat /sys/module/$module/sections/.data > /sys/kernel/debug/$FAILTYPE/require-end echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 10 > /sys/kernel/debug/$FAILTYPE/probability echo 100 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 2 > /sys/kernel/debug/$FAILTYPE/verbose echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-highmem echo 10 > /sys/kernel/debug/$FAILTYPE/stacktrace-depth trap "echo 0 > /sys/kernel/debug/$FAILTYPE/probability" SIGINT SIGTERM EXIT echo "Injecting errors into the module $module... (interrupt to stop)" sleep 1000000”…”�”}”hjv sbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´M³hjd ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhja h²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1hìh³hÊh´M±hj h²hubjV )�”}”(hŒN------------------------------------------------------------------------------”h]”h}”(h]”h ]”h"]”h$]”h&]”uh1jU h³hÊh´MØhj h²hubhí)�”}”(hhh]”hò)�”}”(hX‘Inject open_ctree error while btrfs mount:: #!/bin/bash rm -f testfile.img dd if=/dev/zero of=testfile.img bs=1M seek=1000 count=1 DEVICE=$(losetup --show -f testfile.img) mkfs.btrfs -f $DEVICE mkdir -p tmpmnt FAILTYPE=fail_function FAILFUNC=open_ctree echo $FAILFUNC > /sys/kernel/debug/$FAILTYPE/inject printf %#x -12 > /sys/kernel/debug/$FAILTYPE/$FAILFUNC/retval echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 100 > /sys/kernel/debug/$FAILTYPE/probability echo 0 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 1 > /sys/kernel/debug/$FAILTYPE/verbose mount -t btrfs $DEVICE tmpmnt if [ $? -ne 0 ] then echo "SUCCESS!" else echo "FAILED!" umount tmpmnt fi echo > /sys/kernel/debug/$FAILTYPE/inject rmdir tmpmnt losetup -d $DEVICE rm testfile.img ”h]”(hÌ)�”}”(hŒ+Inject open_ctree error while btrfs mount::”h]”hŒ*Inject open_ctree error while btrfs mount:”…”�”}”(hj¡ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÚhj� ubjÊ)�”}”(hX+#!/bin/bash rm -f testfile.img dd if=/dev/zero of=testfile.img bs=1M seek=1000 count=1 DEVICE=$(losetup --show -f testfile.img) mkfs.btrfs -f $DEVICE mkdir -p tmpmnt FAILTYPE=fail_function FAILFUNC=open_ctree echo $FAILFUNC > /sys/kernel/debug/$FAILTYPE/inject printf %#x -12 > /sys/kernel/debug/$FAILTYPE/$FAILFUNC/retval echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 100 > /sys/kernel/debug/$FAILTYPE/probability echo 0 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 1 > /sys/kernel/debug/$FAILTYPE/verbose mount -t btrfs $DEVICE tmpmnt if [ $? -ne 0 ] then echo "SUCCESS!" else echo "FAILED!" umount tmpmnt fi echo > /sys/kernel/debug/$FAILTYPE/inject rmdir tmpmnt losetup -d $DEVICE rm testfile.img”h]”hX+#!/bin/bash rm -f testfile.img dd if=/dev/zero of=testfile.img bs=1M seek=1000 count=1 DEVICE=$(losetup --show -f testfile.img) mkfs.btrfs -f $DEVICE mkdir -p tmpmnt FAILTYPE=fail_function FAILFUNC=open_ctree echo $FAILFUNC > /sys/kernel/debug/$FAILTYPE/inject printf %#x -12 > /sys/kernel/debug/$FAILTYPE/$FAILFUNC/retval echo N > /sys/kernel/debug/$FAILTYPE/task-filter echo 100 > /sys/kernel/debug/$FAILTYPE/probability echo 0 > /sys/kernel/debug/$FAILTYPE/interval echo -1 > /sys/kernel/debug/$FAILTYPE/times echo 0 > /sys/kernel/debug/$FAILTYPE/space echo 1 > /sys/kernel/debug/$FAILTYPE/verbose mount -t btrfs $DEVICE tmpmnt if [ $? -ne 0 ] then echo "SUCCESS!" else echo "FAILED!" umount tmpmnt fi echo > /sys/kernel/debug/$FAILTYPE/inject rmdir tmpmnt losetup -d $DEVICE rm testfile.img”…”�”}”hj¯ sbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´MÜhj� ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhjš h²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1hìh³hÊh´MÚhj h²hubjV )�”}”(hŒN------------------------------------------------------------------------------”h]”h}”(h]”h ]”h"]”h$]”h&]”uh1jU h³hÊh´Mþhj h²hubhí)�”}”(hhh]”hò)�”}”(hX_Inject only skbuff allocation failures :: # mark skbuff_head_cache as faulty echo 1 > /sys/kernel/slab/skbuff_head_cache/failslab # Turn on cache filter (off by default) echo 1 > /sys/kernel/debug/failslab/cache-filter # Turn on fault injection echo 1 > /sys/kernel/debug/failslab/times echo 1 > /sys/kernel/debug/failslab/probability ”h]”(hÌ)�”}”(hŒ)Inject only skbuff allocation failures ::”h]”hŒ&Inject only skbuff allocation failures”…”�”}”(hjÚ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjÖ ubjÊ)�”}”(hX$# mark skbuff_head_cache as faulty echo 1 > /sys/kernel/slab/skbuff_head_cache/failslab # Turn on cache filter (off by default) echo 1 > /sys/kernel/debug/failslab/cache-filter # Turn on fault injection echo 1 > /sys/kernel/debug/failslab/times echo 1 > /sys/kernel/debug/failslab/probability”h]”hX$# mark skbuff_head_cache as faulty echo 1 > /sys/kernel/slab/skbuff_head_cache/failslab # Turn on cache filter (off by default) echo 1 > /sys/kernel/debug/failslab/cache-filter # Turn on fault injection echo 1 > /sys/kernel/debug/failslab/times echo 1 > /sys/kernel/debug/failslab/probability”…”�”}”hjè sbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´MhjÖ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hñhjÓ h²hh³hÊh´Nubah}”(h]”h ]”h"]”h$]”h&]”jÓjÔuh1hìh³hÊh´Mhj h²hubeh}”(h]”Œapplication-examples”ah ]”h"]”Œapplication examples”ah$]”h&]”uh1hµhh·h²hh³hÊh´MŒubh¶)�”}”(hhh]”(h»)�”}”(hŒ4Tool to run command with failslab or fail_page_alloc”h]”hŒ4Tool to run command with failslab or fail_page_alloc”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´M ubhÌ)�”}”(hŒ÷In order to make it easier to accomplish the tasks mentioned above, we can use tools/testing/fault-injection/failcmd.sh. Please run a command "./tools/testing/fault-injection/failcmd.sh --help" for more information and see the following examples.”h]”hŒûIn order to make it easier to accomplish the tasks mentioned above, we can use tools/testing/fault-injection/failcmd.sh. Please run a command “./tools/testing/fault-injection/failcmd.sh --helpâ€� for more information and see the following examples.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hj h²hubhÌ)�”}”(hŒ Examples:”h]”hŒ Examples:”…”�”}”(hj) h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj h²hubhÌ)�”}”(hŒcRun a command "make -C tools/testing/selftests/ run_tests" with injecting slab allocation failure::”h]”hŒfRun a command “make -C tools/testing/selftests/ run_testsâ€� with injecting slab allocation failure:”…”�”}”(hj7 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj h²hubjÊ)�”}”(hŒd# ./tools/testing/fault-injection/failcmd.sh \ -- make -C tools/testing/selftests/ run_tests”h]”hŒd# ./tools/testing/fault-injection/failcmd.sh \ -- make -C tools/testing/selftests/ run_tests”…”�”}”hjE sbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´Mhj h²hubhÌ)�”}”(hŒcSame as above except to specify 100 times failures at most instead of one time at most by default::”h]”hŒbSame as above except to specify 100 times failures at most instead of one time at most by default:”…”�”}”(hjS h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj h²hubjÊ)�”}”(hŒp# ./tools/testing/fault-injection/failcmd.sh --times=100 \ -- make -C tools/testing/selftests/ run_tests”h]”hŒp# ./tools/testing/fault-injection/failcmd.sh --times=100 \ -- make -C tools/testing/selftests/ run_tests”…”�”}”hja sbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´Mhj h²hubhÌ)�”}”(hŒ[Same as above except to inject page allocation failure instead of slab allocation failure::”h]”hŒZSame as above except to inject page allocation failure instead of slab allocation failure:”…”�”}”(hjo h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hj h²hubjÊ)�”}”(hŒ›# env FAILCMD_TYPE=fail_page_alloc \ ./tools/testing/fault-injection/failcmd.sh --times=100 \ -- make -C tools/testing/selftests/ run_tests”h]”hŒ›# env FAILCMD_TYPE=fail_page_alloc \ ./tools/testing/fault-injection/failcmd.sh --times=100 \ -- make -C tools/testing/selftests/ run_tests”…”�”}”hj} sbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´M#hj h²hubeh}”(h]”Œ4tool-to-run-command-with-failslab-or-fail-page-alloc”ah ]”h"]”Œ4tool to run command with failslab or fail_page_alloc”ah$]”h&]”uh1hµhh·h²hh³hÊh´M ubh¶)�”}”(hhh]”(h»)�”}”(hŒ Systematic faults using fail-nth”h]”hŒ Systematic faults using fail-nth”…”�”}”(hj– h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj“ h²hh³hÊh´M(ubhÌ)�”}”(hŒrThe following code systematically faults 0-th, 1-st, 2-nd and so on capabilities in the socketpair() system call::”h]”hŒqThe following code systematically faults 0-th, 1-st, 2-nd and so on capabilities in the socketpair() system call:”…”�”}”(hj¤ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M*hj“ h²hubjÊ)�”}”(hX #include #include #include #include #include #include #include #include #include #include int main() { int i, err, res, fail_nth, fds[2]; char buf[128]; system("echo N > /sys/kernel/debug/failslab/ignore-gfp-wait"); sprintf(buf, "/proc/self/task/%ld/fail-nth", syscall(SYS_gettid)); fail_nth = open(buf, O_RDWR); for (i = 1;; i++) { sprintf(buf, "%d", i); write(fail_nth, buf, strlen(buf)); res = socketpair(AF_LOCAL, SOCK_STREAM, 0, fds); err = errno; pread(fail_nth, buf, sizeof(buf), 0); if (res == 0) { close(fds[0]); close(fds[1]); } printf("%d-th fault %c: res=%d/%d\n", i, atoi(buf) ? 'N' : 'Y', res, err); if (atoi(buf)) break; } return 0; }”h]”hX #include #include #include #include #include #include #include #include #include #include int main() { int i, err, res, fail_nth, fds[2]; char buf[128]; system("echo N > /sys/kernel/debug/failslab/ignore-gfp-wait"); sprintf(buf, "/proc/self/task/%ld/fail-nth", syscall(SYS_gettid)); fail_nth = open(buf, O_RDWR); for (i = 1;; i++) { sprintf(buf, "%d", i); write(fail_nth, buf, strlen(buf)); res = socketpair(AF_LOCAL, SOCK_STREAM, 0, fds); err = errno; pread(fail_nth, buf, sizeof(buf), 0); if (res == 0) { close(fds[0]); close(fds[1]); } printf("%d-th fault %c: res=%d/%d\n", i, atoi(buf) ? 'N' : 'Y', res, err); if (atoi(buf)) break; } return 0; }”…”�”}”hj² sbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´M-hj“ h²hubhÌ)�”}”(hŒAn example output::”h]”hŒAn example output:”…”�”}”(hjÀ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MRhj“ h²hubjÊ)�”}”(hX…1-th fault Y: res=-1/23 2-th fault Y: res=-1/23 3-th fault Y: res=-1/12 4-th fault Y: res=-1/12 5-th fault Y: res=-1/23 6-th fault Y: res=-1/23 7-th fault Y: res=-1/23 8-th fault Y: res=-1/12 9-th fault Y: res=-1/12 10-th fault Y: res=-1/12 11-th fault Y: res=-1/12 12-th fault Y: res=-1/12 13-th fault Y: res=-1/12 14-th fault Y: res=-1/12 15-th fault Y: res=-1/12 16-th fault N: res=0/12”h]”hX…1-th fault Y: res=-1/23 2-th fault Y: res=-1/23 3-th fault Y: res=-1/12 4-th fault Y: res=-1/12 5-th fault Y: res=-1/23 6-th fault Y: res=-1/23 7-th fault Y: res=-1/23 8-th fault Y: res=-1/12 9-th fault Y: res=-1/12 10-th fault Y: res=-1/12 11-th fault Y: res=-1/12 12-th fault Y: res=-1/12 13-th fault Y: res=-1/12 14-th fault Y: res=-1/12 15-th fault Y: res=-1/12 16-th fault N: res=0/12”…”�”}”hjÎ sbah}”(h]”h ]”h"]”h$]”h&]”jÙjÚuh1jÉh³hÊh´MThj“ h²hubeh}”(h]”Œ systematic-faults-using-fail-nth”ah ]”h"]”Œ systematic faults using fail-nth”ah$]”h&]”uh1hµhh·h²hh³hÊh´M(ubeh}”(h]”Œ+fault-injection-capabilities-infrastructure”ah ]”h"]”Œ+fault injection capabilities infrastructure”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jé jæ jÚj×j�jŒjòjïj'j$j‡j„j¬ j© j> j; j¤ j¡ j j j j j� j� já jÞ uŒ nametypes”}”(jé ‰jÚ‰j�‰jò‰j'‰j‡‰j¬ ‰j> ‰j¤ ‰j ‰j ‰j� ‰já ‰uh}”(jæ h·j×hÛjŒjÝjïjîj$jõj„j*j© j’j; j±j¡ jA j j¯ j j j� j jÞ j“ uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.