Commit c80e42a4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'docs-5.10-2' of git://git.lwn.net/linux

Pull documentation fixes from Jonathan Corbet:
 "A handful of late-arriving documentation fixes"

* tag 'docs-5.10-2' of git://git.lwn.net/linux:
  docs: Add two missing entries in vm sysctl index
  docs/vm: trivial fixes to several spelling mistakes
  docs: submitting-patches: describe preserving review/test tags
  Documentation: Chinese translation of Documentation/arm64/hugetlbpage.rst
  Documentation: x86: fix a missing word in x86_64/mm.rst.
  docs: driver-api: remove a duplicated index entry
  docs: lkdtm: Modernize and improve details
  docs: deprecated.rst: Expand str*cpy() replacement notes
  docs/cpu-load: format the example code.
parents a5e5c274 62af6964
Loading
Loading
Loading
Loading
+33 −30
Original line number Original line Diff line number Diff line
@@ -66,16 +66,19 @@ will lead to quite erratic information inside ``/proc/stat``::
		(void) signr;
		(void) signr;
		stop = 1;
		stop = 1;
	}
	}

	static unsigned long hog (unsigned long niters)
	static unsigned long hog (unsigned long niters)
	{
	{
		stop = 0;
		stop = 0;
		while (!stop && --niters);
		while (!stop && --niters);
		return niters;
		return niters;
	}
	}

	int main (void)
	int main (void)
	{
	{
		int i;
		int i;
	struct itimerval it = { .it_interval = { .tv_sec = 0, .tv_usec = 1 },
		struct itimerval it = {
			.it_interval = { .tv_sec = 0, .tv_usec = 1 },
			.it_value    = { .tv_sec = 0, .tv_usec = 1 } };
			.it_value    = { .tv_sec = 0, .tv_usec = 1 } };
		sigset_t set;
		sigset_t set;
		unsigned long v[HIST];
		unsigned long v[HIST];
+2 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ Currently, these files are in /proc/sys/vm:
- admin_reserve_kbytes
- admin_reserve_kbytes
- block_dump
- block_dump
- compact_memory
- compact_memory
- compaction_proactiveness
- compact_unevictable_allowed
- compact_unevictable_allowed
- dirty_background_bytes
- dirty_background_bytes
- dirty_background_ratio
- dirty_background_ratio
@@ -37,6 +38,7 @@ Currently, these files are in /proc/sys/vm:
- dirty_writeback_centisecs
- dirty_writeback_centisecs
- drop_caches
- drop_caches
- extfrag_threshold
- extfrag_threshold
- highmem_is_dirtyable
- hugetlb_shm_group
- hugetlb_shm_group
- laptop_mode
- laptop_mode
- legacy_va_layout
- legacy_va_layout
+2 −0
Original line number Original line Diff line number Diff line
.. _hugetlbpage_index:

====================
====================
HugeTLBpage on ARM64
HugeTLBpage on ARM64
====================
====================
+0 −1
Original line number Original line Diff line number Diff line
@@ -77,7 +77,6 @@ available subsections can be seen below.
   console
   console
   dcdbas
   dcdbas
   eisa
   eisa
   ipmb
   isa
   isa
   isapnp
   isapnp
   io-mapping
   io-mapping
+33 −23
Original line number Original line Diff line number Diff line
===============
.. SPDX-License-Identifier: GPL-2.0
Provoke crashes
===============


The lkdtm module provides an interface to crash or injure the kernel at
============================================================
predefined crashpoints to evaluate the reliability of crash dumps obtained
Provoking crashes with Linux Kernel Dump Test Module (LKDTM)
using different dumping solutions. The module uses KPROBEs to instrument
============================================================
crashing points, but can also crash the kernel directly without KRPOBE
support.


The lkdtm module provides an interface to disrupt (and usually crash)
the kernel at predefined code locations to evaluate the reliability of
the kernel's exception handling and to test crash dumps obtained using
different dumping solutions. The module uses KPROBEs to instrument the
trigger location, but can also trigger the kernel directly without KPROBE
support via debugfs.


You can provide the way either through module arguments when inserting
You can select the location of the trigger ("crash point name") and the
the module, or through a debugfs interface.
type of action ("crash point type") either through module arguments when
inserting the module, or through the debugfs interface.


Usage::
Usage::


@@ -18,31 +21,38 @@ Usage::
			[cpoint_count={>0}]
			[cpoint_count={>0}]


recur_count
recur_count
	Recursion level for the stack overflow test. Default is 10.
	Recursion level for the stack overflow test. By default this is
	dynamically calculated based on kernel configuration, with the
	goal of being just large enough to exhaust the kernel stack. The
	value can be seen at `/sys/module/lkdtm/parameters/recur_count`.


cpoint_name
cpoint_name
	Crash point where the kernel is to be crashed. It can be
	Where in the kernel to trigger the action. It can be
	one of INT_HARDWARE_ENTRY, INT_HW_IRQ_EN, INT_TASKLET_ENTRY,
	one of INT_HARDWARE_ENTRY, INT_HW_IRQ_EN, INT_TASKLET_ENTRY,
	FS_DEVRW, MEM_SWAPOUT, TIMERADD, SCSI_DISPATCH_CMD,
	FS_DEVRW, MEM_SWAPOUT, TIMERADD, SCSI_DISPATCH_CMD,
	IDE_CORE_CP, DIRECT
	IDE_CORE_CP, or DIRECT


cpoint_type
cpoint_type
	Indicates the action to be taken on hitting the crash point.
	Indicates the action to be taken on hitting the crash point.
	It can be one of PANIC, BUG, EXCEPTION, LOOP, OVERFLOW,
	These are numerous, and best queried directly from debugfs. Some
	CORRUPT_STACK, UNALIGNED_LOAD_STORE_WRITE, OVERWRITE_ALLOCATION,
	of the common ones are PANIC, BUG, EXCEPTION, LOOP, and OVERFLOW.
	WRITE_AFTER_FREE,
	See the contents of `/sys/kernel/debug/provoke-crash/DIRECT` for
	a complete list.


cpoint_count
cpoint_count
	Indicates the number of times the crash point is to be hit
	Indicates the number of times the crash point is to be hit
	to trigger an action. The default is 10.
	before triggering the action. The default is 10 (except for
	DIRECT, which always fires immediately).


You can also induce failures by mounting debugfs and writing the type to
You can also induce failures by mounting debugfs and writing the type to
<mountpoint>/provoke-crash/<crashpoint>. E.g.::
<debugfs>/provoke-crash/<crashpoint>. E.g.::


  mount -t debugfs debugfs /mnt
  mount -t debugfs debugfs /sys/kernel/debug
  echo EXCEPTION > /mnt/provoke-crash/INT_HARDWARE_ENTRY
  echo EXCEPTION > /sys/kernel/debug/provoke-crash/INT_HARDWARE_ENTRY


The special file `DIRECT` will induce the action directly without KPROBE
instrumentation. This mode is the only one available when the module is
built for a kernel without KPROBEs support::


A special file is `DIRECT` which will induce the crash directly without
  # Instead of having a BUG kill your shell, have it kill "cat":
KPROBE instrumentation. This mode is the only one available when the module
  cat <(echo WRITE_RO) >/sys/kernel/debug/provoke-crash/DIRECT
is built on a kernel without KPROBEs support.
Loading