diff options
| author | Randy Dunlap <rdunlap@infradead.org> | 2017-10-13 18:57:33 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-13 19:18:32 -0400 |
| commit | cc3fa84045694c2fd7ccf6ce84dee5cba372a7d3 (patch) | |
| tree | 1d0bbc116d0b9b7d32408652ab7816d9ca510290 /lib | |
| parent | e20d103b6c37038ca27409f746f0b3351bcd0c44 (diff) | |
lib/Kconfig.debug: kernel hacking menu: runtime testing: keep tests together
Expand the "Runtime testing" menu by including more entries inside it
instead of after it. This is just Kconfig symbol movement.
This causes the (arch-independent) Runtime tests to be presented
(listed) all in one place instead of in multiple places.
Link: http://lkml.kernel.org/r/c194e5c4-2042-bf94-a2d8-7aa13756e257@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig.debug | 143 |
1 files changed, 71 insertions, 72 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 2689b7c50c52..c1e720a22c71 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -1590,6 +1590,54 @@ config LATENCYTOP | |||
| 1590 | 1590 | ||
| 1591 | source kernel/trace/Kconfig | 1591 | source kernel/trace/Kconfig |
| 1592 | 1592 | ||
| 1593 | config PROVIDE_OHCI1394_DMA_INIT | ||
| 1594 | bool "Remote debugging over FireWire early on boot" | ||
| 1595 | depends on PCI && X86 | ||
| 1596 | help | ||
| 1597 | If you want to debug problems which hang or crash the kernel early | ||
| 1598 | on boot and the crashing machine has a FireWire port, you can use | ||
| 1599 | this feature to remotely access the memory of the crashed machine | ||
| 1600 | over FireWire. This employs remote DMA as part of the OHCI1394 | ||
| 1601 | specification which is now the standard for FireWire controllers. | ||
| 1602 | |||
| 1603 | With remote DMA, you can monitor the printk buffer remotely using | ||
| 1604 | firescope and access all memory below 4GB using fireproxy from gdb. | ||
| 1605 | Even controlling a kernel debugger is possible using remote DMA. | ||
| 1606 | |||
| 1607 | Usage: | ||
| 1608 | |||
| 1609 | If ohci1394_dma=early is used as boot parameter, it will initialize | ||
| 1610 | all OHCI1394 controllers which are found in the PCI config space. | ||
| 1611 | |||
| 1612 | As all changes to the FireWire bus such as enabling and disabling | ||
| 1613 | devices cause a bus reset and thereby disable remote DMA for all | ||
| 1614 | devices, be sure to have the cable plugged and FireWire enabled on | ||
| 1615 | the debugging host before booting the debug target for debugging. | ||
| 1616 | |||
| 1617 | This code (~1k) is freed after boot. By then, the firewire stack | ||
| 1618 | in charge of the OHCI-1394 controllers should be used instead. | ||
| 1619 | |||
| 1620 | See Documentation/debugging-via-ohci1394.txt for more information. | ||
| 1621 | |||
| 1622 | config DMA_API_DEBUG | ||
| 1623 | bool "Enable debugging of DMA-API usage" | ||
| 1624 | depends on HAVE_DMA_API_DEBUG | ||
| 1625 | help | ||
| 1626 | Enable this option to debug the use of the DMA API by device drivers. | ||
| 1627 | With this option you will be able to detect common bugs in device | ||
| 1628 | drivers like double-freeing of DMA mappings or freeing mappings that | ||
| 1629 | were never allocated. | ||
| 1630 | |||
| 1631 | This also attempts to catch cases where a page owned by DMA is | ||
| 1632 | accessed by the cpu in a way that could cause data corruption. For | ||
| 1633 | example, this enables cow_user_page() to check that the source page is | ||
| 1634 | not undergoing DMA. | ||
| 1635 | |||
| 1636 | This option causes a performance degradation. Use only if you want to | ||
| 1637 | debug device drivers and dma interactions. | ||
| 1638 | |||
| 1639 | If unsure, say N. | ||
| 1640 | |||
| 1593 | menu "Runtime Testing" | 1641 | menu "Runtime Testing" |
| 1594 | 1642 | ||
| 1595 | config LKDTM | 1643 | config LKDTM |
| @@ -1749,56 +1797,6 @@ config TEST_PARMAN | |||
| 1749 | 1797 | ||
| 1750 | If unsure, say N. | 1798 | If unsure, say N. |
| 1751 | 1799 | ||
| 1752 | endmenu # runtime tests | ||
| 1753 | |||
| 1754 | config PROVIDE_OHCI1394_DMA_INIT | ||
| 1755 | bool "Remote debugging over FireWire early on boot" | ||
| 1756 | depends on PCI && X86 | ||
| 1757 | help | ||
| 1758 | If you want to debug problems which hang or crash the kernel early | ||
| 1759 | on boot and the crashing machine has a FireWire port, you can use | ||
| 1760 | this feature to remotely access the memory of the crashed machine | ||
| 1761 | over FireWire. This employs remote DMA as part of the OHCI1394 | ||
| 1762 | specification which is now the standard for FireWire controllers. | ||
| 1763 | |||
| 1764 | With remote DMA, you can monitor the printk buffer remotely using | ||
| 1765 | firescope and access all memory below 4GB using fireproxy from gdb. | ||
| 1766 | Even controlling a kernel debugger is possible using remote DMA. | ||
| 1767 | |||
| 1768 | Usage: | ||
| 1769 | |||
| 1770 | If ohci1394_dma=early is used as boot parameter, it will initialize | ||
| 1771 | all OHCI1394 controllers which are found in the PCI config space. | ||
| 1772 | |||
| 1773 | As all changes to the FireWire bus such as enabling and disabling | ||
| 1774 | devices cause a bus reset and thereby disable remote DMA for all | ||
| 1775 | devices, be sure to have the cable plugged and FireWire enabled on | ||
| 1776 | the debugging host before booting the debug target for debugging. | ||
| 1777 | |||
| 1778 | This code (~1k) is freed after boot. By then, the firewire stack | ||
| 1779 | in charge of the OHCI-1394 controllers should be used instead. | ||
| 1780 | |||
| 1781 | See Documentation/debugging-via-ohci1394.txt for more information. | ||
| 1782 | |||
| 1783 | config DMA_API_DEBUG | ||
| 1784 | bool "Enable debugging of DMA-API usage" | ||
| 1785 | depends on HAVE_DMA_API_DEBUG | ||
| 1786 | help | ||
| 1787 | Enable this option to debug the use of the DMA API by device drivers. | ||
| 1788 | With this option you will be able to detect common bugs in device | ||
| 1789 | drivers like double-freeing of DMA mappings or freeing mappings that | ||
| 1790 | were never allocated. | ||
| 1791 | |||
| 1792 | This also attempts to catch cases where a page owned by DMA is | ||
| 1793 | accessed by the cpu in a way that could cause data corruption. For | ||
| 1794 | example, this enables cow_user_page() to check that the source page is | ||
| 1795 | not undergoing DMA. | ||
| 1796 | |||
| 1797 | This option causes a performance degradation. Use only if you want to | ||
| 1798 | debug device drivers and dma interactions. | ||
| 1799 | |||
| 1800 | If unsure, say N. | ||
| 1801 | |||
| 1802 | config TEST_LKM | 1800 | config TEST_LKM |
| 1803 | tristate "Test module loading with 'hello world' module" | 1801 | tristate "Test module loading with 'hello world' module" |
| 1804 | default n | 1802 | default n |
| @@ -1873,18 +1871,6 @@ config TEST_UDELAY | |||
| 1873 | 1871 | ||
| 1874 | If unsure, say N. | 1872 | If unsure, say N. |
| 1875 | 1873 | ||
| 1876 | config MEMTEST | ||
| 1877 | bool "Memtest" | ||
| 1878 | depends on HAVE_MEMBLOCK | ||
| 1879 | ---help--- | ||
| 1880 | This option adds a kernel parameter 'memtest', which allows memtest | ||
| 1881 | to be set. | ||
| 1882 | memtest=0, mean disabled; -- default | ||
| 1883 | memtest=1, mean do 1 test pattern; | ||
| 1884 | ... | ||
| 1885 | memtest=17, mean do 17 test patterns. | ||
| 1886 | If you are unsure how to answer this question, answer N. | ||
| 1887 | |||
| 1888 | config TEST_STATIC_KEYS | 1874 | config TEST_STATIC_KEYS |
| 1889 | tristate "Test static keys" | 1875 | tristate "Test static keys" |
| 1890 | default n | 1876 | default n |
| @@ -1894,16 +1880,6 @@ config TEST_STATIC_KEYS | |||
| 1894 | 1880 | ||
| 1895 | If unsure, say N. | 1881 | If unsure, say N. |
| 1896 | 1882 | ||
| 1897 | config BUG_ON_DATA_CORRUPTION | ||
| 1898 | bool "Trigger a BUG when data corruption is detected" | ||
| 1899 | select DEBUG_LIST | ||
| 1900 | help | ||
| 1901 | Select this option if the kernel should BUG when it encounters | ||
| 1902 | data corruption in kernel memory structures when they get checked | ||
| 1903 | for validity. | ||
| 1904 | |||
| 1905 | If unsure, say N. | ||
| 1906 | |||
| 1907 | config TEST_KMOD | 1883 | config TEST_KMOD |
| 1908 | tristate "kmod stress tester" | 1884 | tristate "kmod stress tester" |
| 1909 | default n | 1885 | default n |
| @@ -1941,6 +1917,29 @@ config TEST_DEBUG_VIRTUAL | |||
| 1941 | 1917 | ||
| 1942 | If unsure, say N. | 1918 | If unsure, say N. |
| 1943 | 1919 | ||
| 1920 | endmenu # runtime tests | ||
| 1921 | |||
| 1922 | config MEMTEST | ||
| 1923 | bool "Memtest" | ||
| 1924 | depends on HAVE_MEMBLOCK | ||
| 1925 | ---help--- | ||
| 1926 | This option adds a kernel parameter 'memtest', which allows memtest | ||
| 1927 | to be set. | ||
| 1928 | memtest=0, mean disabled; -- default | ||
| 1929 | memtest=1, mean do 1 test pattern; | ||
| 1930 | ... | ||
| 1931 | memtest=17, mean do 17 test patterns. | ||
| 1932 | If you are unsure how to answer this question, answer N. | ||
| 1933 | |||
| 1934 | config BUG_ON_DATA_CORRUPTION | ||
| 1935 | bool "Trigger a BUG when data corruption is detected" | ||
| 1936 | select DEBUG_LIST | ||
| 1937 | help | ||
| 1938 | Select this option if the kernel should BUG when it encounters | ||
| 1939 | data corruption in kernel memory structures when they get checked | ||
| 1940 | for validity. | ||
| 1941 | |||
| 1942 | If unsure, say N. | ||
| 1944 | 1943 | ||
| 1945 | source "samples/Kconfig" | 1944 | source "samples/Kconfig" |
| 1946 | 1945 | ||
