<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/Documentation/fault-injection, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-01-07T22:36:11Z</updated>
<entry>
<title>doc: fault-injection: fix macro name in example</title>
<updated>2019-01-07T22:36:11Z</updated>
<author>
<name>Laurent Gauthier</name>
<email>laurent.gauthier@soccasys.com</email>
</author>
<published>2019-01-04T23:08:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2d87948a19ac26bb0307bd2af2a5550e4c3a172d'/>
<id>urn:sha1:2d87948a19ac26bb0307bd2af2a5550e4c3a172d</id>
<content type='text'>
Signed-off-by: Laurent Gauthier &lt;laurent.gauthier@soccasys.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>Documentation: nvme: Documentation for nvme fault injection</title>
<updated>2018-03-26T14:53:43Z</updated>
<author>
<name>Thomas Tai</name>
<email>thomas.tai@oracle.com</email>
</author>
<published>2018-02-08T18:38:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cf4182f3d06cec0546c69123f4104a2b69d07be2'/>
<id>urn:sha1:cf4182f3d06cec0546c69123f4104a2b69d07be2</id>
<content type='text'>
Add examples to show how to use nvme fault injection.

Signed-off-by: Thomas Tai &lt;thomas.tai@oracle.com&gt;
Reviewed-by: Eric Saint-Etienne &lt;eric.saint.etienne@oracle.com&gt;
Signed-off-by: Karl Volz &lt;karl.volz@oracle.com&gt;
Reviewed-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'docs-4.16' of git://git.lwn.net/linux</title>
<updated>2018-02-01T03:25:25Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-02-01T03:25:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=255442c93843f52b6891b21d0b485bf2c97f93c3'/>
<id>urn:sha1:255442c93843f52b6891b21d0b485bf2c97f93c3</id>
<content type='text'>
Pull documentation updates from Jonathan Corbet:
 "Documentation updates for 4.16.

  New stuff includes refcount_t documentation, errseq documentation,
  kernel-doc support for nested structure definitions, the removal of
  lots of crufty kernel-doc support for unused formats, SPDX tag
  documentation, the beginnings of a manual for subsystem maintainers,
  and lots of fixes and updates.

  As usual, some of the changesets reach outside of Documentation/ to
  effect kerneldoc comment fixes. It also adds the new LICENSES
  directory, of which Thomas promises I do not need to be the
  maintainer"

* tag 'docs-4.16' of git://git.lwn.net/linux: (65 commits)
  linux-next: docs-rst: Fix typos in kfigure.py
  linux-next: DOC: HWPOISON: Fix path to debugfs in hwpoison.txt
  Documentation: Fix misconversion of #if
  docs: add index entry for networking/msg_zerocopy
  Documentation: security/credentials.rst: explain need to sort group_list
  LICENSES: Add MPL-1.1 license
  LICENSES: Add the GPL 1.0 license
  LICENSES: Add Linux syscall note exception
  LICENSES: Add the MIT license
  LICENSES: Add the BSD-3-clause "Clear" license
  LICENSES: Add the BSD 3-clause "New" or "Revised" License
  LICENSES: Add the BSD 2-clause "Simplified" license
  LICENSES: Add the LGPL-2.1 license
  LICENSES: Add the LGPL 2.0 license
  LICENSES: Add the GPL 2.0 license
  Documentation: Add license-rules.rst to describe how to properly identify file licenses
  scripts: kernel_doc: better handle show warnings logic
  fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at
  doc: md: Fix a file name to md-fault.c in fault-injection.txt
  errseq: Add to documentation tree
  ...
</content>
</entry>
<entry>
<title>error-injection: Support fault injection framework</title>
<updated>2018-01-13T01:33:38Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>mhiramat@kernel.org</email>
</author>
<published>2018-01-12T17:56:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4b1a29a7f5425d32640b34b8a755f34e02f64d0f'/>
<id>urn:sha1:4b1a29a7f5425d32640b34b8a755f34e02f64d0f</id>
<content type='text'>
Support in-kernel fault-injection framework via debugfs.
This allows you to inject a conditional error to specified
function using debugfs interfaces.

Here is the result of test script described in
Documentation/fault-injection/fault-injection.txt

  ===========
  # ./test_fail_function.sh
  1+0 records in
  1+0 records out
  1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0227404 s, 46.1 MB/s
  btrfs-progs v4.4
  See http://btrfs.wiki.kernel.org for more information.

  Label:              (null)
  UUID:               bfa96010-12e9-4360-aed0-42eec7af5798
  Node size:          16384
  Sector size:        4096
  Filesystem size:    1001.00MiB
  Block group profiles:
    Data:             single            8.00MiB
    Metadata:         DUP              58.00MiB
    System:           DUP              12.00MiB
  SSD detected:       no
  Incompat features:  extref, skinny-metadata
  Number of devices:  1
  Devices:
     ID        SIZE  PATH
      1  1001.00MiB  /dev/loop2

  mount: mount /dev/loop2 on /opt/tmpmnt failed: Cannot allocate memory
  SUCCESS!
  ===========

Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Reviewed-by: Josef Bacik &lt;jbacik@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>doc: md: Fix a file name to md-fault.c in fault-injection.txt</title>
<updated>2018-01-01T19:43:09Z</updated>
<author>
<name>Masanari Iida</name>
<email>standby24x7@gmail.com</email>
</author>
<published>2017-12-22T16:41:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1892ce4cdd9bfb5a6c80fe4fdfd4ffcb59d1b06d'/>
<id>urn:sha1:1892ce4cdd9bfb5a6c80fe4fdfd4ffcb59d1b06d</id>
<content type='text'>
drivers/md/faulty.c has been renamed to md-faulty.c after
following commit merged int to the main line.

  935fe0983e09f4f7331ebf5ea4ae2124f6e9f9e8 .

But the file name in fault-injection.txt has not been changed.
Now the actual file name and document are in sync.

Signed-off-by: Masanari Iida &lt;standby24x7@gmail.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>cpu/hotplug: Get rid of CPU hotplug notifier leftovers</title>
<updated>2017-11-13T09:03:53Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2017-11-13T08:39:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f4c09f87adfe31587aa4b2aea2cb2dbde2150f54'/>
<id>urn:sha1:f4c09f87adfe31587aa4b2aea2cb2dbde2150f54</id>
<content type='text'>
The CPU hotplug notifiers are history. Remove the last reminders.

Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>fault-inject: add /proc/&lt;pid&gt;/fail-nth</title>
<updated>2017-07-14T22:05:13Z</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2017-07-14T21:50:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=168c42bc56d8d47f67f2a5206506cd4ba3c18475'/>
<id>urn:sha1:168c42bc56d8d47f67f2a5206506cd4ba3c18475</id>
<content type='text'>
fail-nth interface is only created in /proc/self/task/&lt;current-tid&gt;/.
This change also adds it in /proc/&lt;pid&gt;/.

This makes shell based tool a bit simpler.

	$ bash -c "builtin echo 100 &gt; /proc/self/fail-nth &amp;&amp; exec ls /"

Link: http://lkml.kernel.org/r/1491490561-10485-6-git-send-email-akinobu.mita@gmail.com
Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fault-inject: make fail-nth read/write interface symmetric</title>
<updated>2017-07-14T22:05:13Z</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2017-07-14T21:49:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bfc740938d151001cb1158580796f8f3be3bf0c1'/>
<id>urn:sha1:bfc740938d151001cb1158580796f8f3be3bf0c1</id>
<content type='text'>
The read interface for fail-nth looks a bit odd.  Read from this file
returns "NYYYY..." or "YYYYY..." (this makes me surprise when cat this
file).  Because there is no EOF condition.  The first character
indicates current-&gt;fail_nth is zero or not, and then current-&gt;fail_nth
is reset to zero.

Just returning task-&gt;fail_nth value is more natural to understand.

Link: http://lkml.kernel.org/r/1491490561-10485-4-git-send-email-akinobu.mita@gmail.com
Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fault-inject: parse as natural 1-based value for fail-nth write interface</title>
<updated>2017-07-14T22:05:13Z</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2017-07-14T21:49:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9049f2f6e7bdfb5de0c63c2635bf3cdb70c4efb5'/>
<id>urn:sha1:9049f2f6e7bdfb5de0c63c2635bf3cdb70c4efb5</id>
<content type='text'>
The value written to fail-nth file is parsed as 0-based.  Parsing as
one-based is more natural to understand and it enables to cancel the
previous setup by simply writing '0'.

This change also converts task-&gt;fail_nth from signed to unsigned int.

Link: http://lkml.kernel.org/r/1491490561-10485-3-git-send-email-akinobu.mita@gmail.com
Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fault-inject: support systematic fault injection</title>
<updated>2017-07-12T23:26:01Z</updated>
<author>
<name>Dmitry Vyukov</name>
<email>dvyukov@google.com</email>
</author>
<published>2017-07-12T21:34:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e41d58185f1444368873d4d7422f7664a68be61d'/>
<id>urn:sha1:e41d58185f1444368873d4d7422f7664a68be61d</id>
<content type='text'>
Add /proc/self/task/&lt;current-tid&gt;/fail-nth file that allows failing
0-th, 1-st, 2-nd and so on calls systematically.
Excerpt from the added documentation:

 "Write to this file of integer N makes N-th call in the current task
  fail (N is 0-based). Read from this file returns a single char 'Y' or
  'N' that says if the fault setup with a previous write to this file
  was injected or not, and disables the fault if it wasn't yet injected.
  Note that this file enables all types of faults (slab, futex, etc).
  This setting takes precedence over all other generic 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"

Why add a new setting:
1. Existing settings are global rather than per-task.
   So parallel testing is not possible.
2. attr-&gt;interval is close but it depends on attr-&gt;count
   which is non reset to 0, so interval does not work as expected.
3. Trying to model this with existing settings requires manipulations
   of all of probability, interval, times, space, task-filter and
   unexposed count and per-task make-it-fail files.
4. Existing settings are per-failure-type, and the set of failure
   types is potentially expanding.
5. make-it-fail can't be changed by unprivileged user and aggressive
   stress testing better be done from an unprivileged user.
   Similarly, this would require opening the debugfs files to the
   unprivileged user, as he would need to reopen at least times file
   (not possible to pre-open before dropping privs).

The proposed interface solves all of the above (see the example).

We want to integrate this into syzkaller fuzzer.  A prototype has found
10 bugs in kernel in first day of usage:

  https://groups.google.com/forum/#!searchin/syzkaller/%22FAULT_INJECTION%22%7Csort:relevance

I've made the current interface work with all types of our sandboxes.
For setuid the secret sauce was prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) to
make /proc entries non-root owned.  So I am fine with the current
version of the code.

[akpm@linux-foundation.org: fix build]
Link: http://lkml.kernel.org/r/20170328130128.101773-1-dvyukov@google.com
Signed-off-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: Michal Hocko &lt;mhocko@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
