~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/mm/Kconfig.debug

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /mm/Kconfig.debug (Version linux-6.11.5) and /mm/Kconfig.debug (Version linux-4.19.322)


  1 # SPDX-License-Identifier: GPL-2.0-only        << 
  2 config PAGE_EXTENSION                               1 config PAGE_EXTENSION
  3         bool "Extend memmap on extra space for      2         bool "Extend memmap on extra space for more information on page"
  4         help                                   !!   3         ---help---
  5           Extend memmap on extra space for mor      4           Extend memmap on extra space for more information on page. This
  6           could be used for debugging features      5           could be used for debugging features that need to insert extra
  7           field for every page. This extension      6           field for every page. This extension enables us to save memory
  8           by not allocating this extra memory       7           by not allocating this extra memory according to boottime
  9           configuration.                            8           configuration.
 10                                                     9 
 11 config DEBUG_PAGEALLOC                             10 config DEBUG_PAGEALLOC
 12         bool "Debug page memory allocations"       11         bool "Debug page memory allocations"
 13         depends on DEBUG_KERNEL                    12         depends on DEBUG_KERNEL
 14         depends on !HIBERNATION || ARCH_SUPPOR     13         depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
                                                   >>  14         select PAGE_EXTENSION
 15         select PAGE_POISONING if !ARCH_SUPPORT     15         select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC
 16         help                                   !!  16         ---help---
 17           Unmap pages from the kernel linear m     17           Unmap pages from the kernel linear mapping after free_pages().
 18           Depending on runtime enablement, thi     18           Depending on runtime enablement, this results in a small or large
 19           slowdown, but helps to find certain      19           slowdown, but helps to find certain types of memory corruption.
 20                                                    20 
 21           Also, the state of page tracking str << 
 22           pages are being allocated and freed, << 
 23           often happen for same reasons as mem << 
 24           use-after-free). The error reports f << 
 25           with stack traces of last allocation << 
 26           PAGE_OWNER is also selected and enab << 
 27                                                << 
 28           For architectures which don't enable     21           For architectures which don't enable ARCH_SUPPORTS_DEBUG_PAGEALLOC,
 29           fill the pages with poison patterns      22           fill the pages with poison patterns after free_pages() and verify
 30           the patterns before alloc_pages(). A !!  23           the patterns before alloc_pages().  Additionally,
 31           be enabled in combination with hiber !!  24           this option cannot be enabled in combination with hibernation as
 32           incorrect warnings of memory corrupt !!  25           that would result in incorrect warnings of memory corruption after
 33           pages are not saved to the suspend i !!  26           a resume because free pages are not saved to the suspend image.
 34                                                    27 
 35           By default this option will have a s     28           By default this option will have a small overhead, e.g. by not
 36           allowing the kernel mapping to be ba     29           allowing the kernel mapping to be backed by large pages on some
 37           architectures. Even bigger overhead      30           architectures. Even bigger overhead comes when the debugging is
 38           enabled by DEBUG_PAGEALLOC_ENABLE_DE     31           enabled by DEBUG_PAGEALLOC_ENABLE_DEFAULT or the debug_pagealloc
 39           command line parameter.                  32           command line parameter.
 40                                                    33 
 41 config DEBUG_PAGEALLOC_ENABLE_DEFAULT              34 config DEBUG_PAGEALLOC_ENABLE_DEFAULT
 42         bool "Enable debug page memory allocat     35         bool "Enable debug page memory allocations by default?"
                                                   >>  36         default n
 43         depends on DEBUG_PAGEALLOC                 37         depends on DEBUG_PAGEALLOC
 44         help                                   !!  38         ---help---
 45           Enable debug page memory allocations     39           Enable debug page memory allocations by default? This value
 46           can be overridden by debug_pagealloc     40           can be overridden by debug_pagealloc=off|on.
 47                                                    41 
 48 config SLUB_DEBUG                              << 
 49         default y                              << 
 50         bool "Enable SLUB debugging support" i << 
 51         depends on SYSFS && !SLUB_TINY         << 
 52         select STACKDEPOT if STACKTRACE_SUPPOR << 
 53         help                                   << 
 54           SLUB has extensive debug support fea << 
 55           result in significant savings in cod << 
 56           will still exist (with SYSFS enabled << 
 57           validation.                          << 
 58                                                << 
 59 config SLUB_DEBUG_ON                           << 
 60         bool "SLUB debugging on by default"    << 
 61         depends on SLUB_DEBUG                  << 
 62         select STACKDEPOT_ALWAYS_INIT if STACK << 
 63         default n                              << 
 64         help                                   << 
 65           Boot with debugging on by default. S << 
 66           the runtime debug capabilities switc << 
 67           equivalent to specifying the "slab_d << 
 68           There is no support for more fine gr << 
 69           possible with slab_debug=xxx. SLUB d << 
 70           off in a kernel built with CONFIG_SL << 
 71           "slab_debug=-".                      << 
 72                                                << 
 73 config PAGE_OWNER                              << 
 74         bool "Track page owner"                << 
 75         depends on DEBUG_KERNEL && STACKTRACE_ << 
 76         select DEBUG_FS                        << 
 77         select STACKTRACE                      << 
 78         select STACKDEPOT                      << 
 79         select PAGE_EXTENSION                  << 
 80         help                                   << 
 81           This keeps track of what call chain  << 
 82           help to find bare alloc_page(s) leak << 
 83           feature on your build, it is disable << 
 84           "page_owner=on" to boot parameter in << 
 85           a fair amount of memory if enabled.  << 
 86           for user-space helper.               << 
 87                                                << 
 88           If unsure, say N.                    << 
 89                                                << 
 90 config PAGE_TABLE_CHECK                        << 
 91         bool "Check for invalid mappings in us << 
 92         depends on ARCH_SUPPORTS_PAGE_TABLE_CH << 
 93         depends on EXCLUSIVE_SYSTEM_RAM        << 
 94         select PAGE_EXTENSION                  << 
 95         help                                   << 
 96           Check that anonymous page is not bei << 
 97           permissions. Check that anonymous an << 
 98           erroneously shared. Since the checki << 
 99           entries are added and removed to use << 
100           and double mapping problems are dete << 
101                                                << 
102           If unsure say "n".                   << 
103                                                << 
104 config PAGE_TABLE_CHECK_ENFORCED               << 
105         bool "Enforce the page table checking  << 
106         depends on PAGE_TABLE_CHECK            << 
107         help                                   << 
108           Always enable page table checking.   << 
109           is disabled, and can be optionally e << 
110           kernel parameter. This config enforc << 
111           enabled.                             << 
112                                                << 
113           If unsure say "n".                   << 
114                                                << 
115 config PAGE_POISONING                              42 config PAGE_POISONING
116         bool "Poison pages after freeing"          43         bool "Poison pages after freeing"
117         help                                   !!  44         select PAGE_POISONING_NO_SANITY if HIBERNATION
                                                   >>  45         ---help---
118           Fill the pages with poison patterns      46           Fill the pages with poison patterns after free_pages() and verify
119           the patterns before alloc_pages. The     47           the patterns before alloc_pages. The filling of the memory helps
120           reduce the risk of information leaks     48           reduce the risk of information leaks from freed data. This does
121           have a potential performance impact      49           have a potential performance impact if enabled with the
122           "page_poison=1" kernel boot option.      50           "page_poison=1" kernel boot option.
123                                                    51 
124           Note that "poison" here is not the s     52           Note that "poison" here is not the same thing as the "HWPoison"
125           for CONFIG_MEMORY_FAILURE. This is s     53           for CONFIG_MEMORY_FAILURE. This is software poisoning only.
126                                                    54 
127           If you are only interested in saniti << 
128           checking the poison pattern on alloc << 
129           "init_on_free=1" instead of enabling << 
130                                                << 
131           If unsure, say N                         55           If unsure, say N
132                                                    56 
                                                   >>  57 config PAGE_POISONING_NO_SANITY
                                                   >>  58         depends on PAGE_POISONING
                                                   >>  59         bool "Only poison, don't sanity check"
                                                   >>  60         ---help---
                                                   >>  61            Skip the sanity checking on alloc, only fill the pages with
                                                   >>  62            poison on free. This reduces some of the overhead of the
                                                   >>  63            poisoning feature.
                                                   >>  64 
                                                   >>  65            If you are only interested in sanitization, say Y. Otherwise
                                                   >>  66            say N.
                                                   >>  67 
                                                   >>  68 config PAGE_POISONING_ZERO
                                                   >>  69         bool "Use zero for poisoning instead of debugging value"
                                                   >>  70         depends on PAGE_POISONING
                                                   >>  71         ---help---
                                                   >>  72            Instead of using the existing poison value, fill the pages with
                                                   >>  73            zeros. This makes it harder to detect when errors are occurring
                                                   >>  74            due to sanitization but the zeroing at free means that it is
                                                   >>  75            no longer necessary to write zeros when GFP_ZERO is used on
                                                   >>  76            allocation.
                                                   >>  77 
                                                   >>  78            If unsure, say N
                                                   >>  79 
133 config DEBUG_PAGE_REF                              80 config DEBUG_PAGE_REF
134         bool "Enable tracepoint to track down      81         bool "Enable tracepoint to track down page reference manipulation"
135         depends on DEBUG_KERNEL                    82         depends on DEBUG_KERNEL
136         depends on TRACEPOINTS                     83         depends on TRACEPOINTS
137         help                                   !!  84         ---help---
138           This is a feature to add tracepoint      85           This is a feature to add tracepoint for tracking down page reference
139           manipulation. This tracking is usefu     86           manipulation. This tracking is useful to diagnose functional failure
140           due to migration failures caused by      87           due to migration failures caused by page reference mismatches.  Be
141           careful when enabling this feature b     88           careful when enabling this feature because it adds about 30 KB to the
142           kernel code.  However the runtime pe     89           kernel code.  However the runtime performance overhead is virtually
143           nil until the tracepoints are actual     90           nil until the tracepoints are actually enabled.
144                                                    91 
145 config DEBUG_RODATA_TEST                           92 config DEBUG_RODATA_TEST
146     bool "Testcase for the marking rodata read     93     bool "Testcase for the marking rodata read-only"
147     depends on STRICT_KERNEL_RWX                   94     depends on STRICT_KERNEL_RWX
148         help                                   !!  95     ---help---
149       This option enables a testcase for the s     96       This option enables a testcase for the setting rodata read-only.
150                                                << 
151 config ARCH_HAS_DEBUG_WX                       << 
152         bool                                   << 
153                                                << 
154 config DEBUG_WX                                << 
155         bool "Warn on W+X mappings at boot"    << 
156         depends on ARCH_HAS_DEBUG_WX           << 
157         depends on MMU                         << 
158         select PTDUMP_CORE                     << 
159         help                                   << 
160           Generate a warning if any W+X mappin << 
161                                                << 
162           This is useful for discovering cases << 
163           mappings after applying NX, as such  << 
164                                                << 
165           Look for a message in dmesg output l << 
166                                                << 
167             <arch>/mm: Checked W+X mappings: p << 
168                                                << 
169           or like this, if the check failed:   << 
170                                                << 
171             <arch>/mm: Checked W+X mappings: f << 
172                                                << 
173           Note that even if the check fails, y << 
174           still fine, as W+X mappings are not  << 
175           themselves, what they do is that the << 
176           of other unfixed kernel bugs easier. << 
177                                                << 
178           There is no runtime or memory usage  << 
179           once the kernel has booted up - it's << 
180                                                << 
181           If in doubt, say "Y".                << 
182                                                << 
183 config GENERIC_PTDUMP                          << 
184         bool                                   << 
185                                                << 
186 config PTDUMP_CORE                             << 
187         bool                                   << 
188                                                << 
189 config PTDUMP_DEBUGFS                          << 
190         bool "Export kernel pagetable layout t << 
191         depends on DEBUG_KERNEL                << 
192         depends on DEBUG_FS                    << 
193         depends on GENERIC_PTDUMP              << 
194         select PTDUMP_CORE                     << 
195         help                                   << 
196           Say Y here if you want to show the k << 
197           debugfs file. This information is on << 
198           who are working in architecture spec << 
199           It is probably not a good idea to en << 
200           kernel.                              << 
201                                                << 
202           If in doubt, say N.                  << 
203                                                << 
204 config HAVE_DEBUG_KMEMLEAK                     << 
205         bool                                   << 
206                                                << 
207 config DEBUG_KMEMLEAK                          << 
208         bool "Kernel memory leak detector"     << 
209         depends on DEBUG_KERNEL && HAVE_DEBUG_ << 
210         select DEBUG_FS                        << 
211         select STACKTRACE if STACKTRACE_SUPPOR << 
212         select KALLSYMS                        << 
213         select CRC32                           << 
214         select STACKDEPOT                      << 
215         select STACKDEPOT_ALWAYS_INIT if !DEBU << 
216         help                                   << 
217           Say Y here if you want to enable the << 
218           detector. The memory allocation/free << 
219           similar to the Boehm's conservative  << 
220           difference being that the orphan obj << 
221           only shown in /sys/kernel/debug/kmem << 
222           feature will introduce an overhead t << 
223           allocations. See Documentation/dev-t << 
224           details.                             << 
225                                                << 
226           Enabling SLUB_DEBUG may increase the << 
227           due to the slab objects poisoning.   << 
228                                                << 
229           In order to access the kmemleak file << 
230           mounted (usually at /sys/kernel/debu << 
231                                                << 
232 config DEBUG_KMEMLEAK_MEM_POOL_SIZE            << 
233         int "Kmemleak memory pool size"        << 
234         depends on DEBUG_KMEMLEAK              << 
235         range 200 1000000                      << 
236         default 16000                          << 
237         help                                   << 
238           Kmemleak must track all the memory a << 
239           reporting false positives. Since mem << 
240           freed before kmemleak is fully initi << 
241           of metadata objects to track such ca << 
242           fully initialised, this memory pool  << 
243           if slab allocations fail.            << 
244                                                << 
245 config DEBUG_KMEMLEAK_DEFAULT_OFF              << 
246         bool "Default kmemleak to off"         << 
247         depends on DEBUG_KMEMLEAK              << 
248         help                                   << 
249           Say Y here to disable kmemleak by de << 
250           on the command line via kmemleak=on. << 
251                                                << 
252 config DEBUG_KMEMLEAK_AUTO_SCAN                << 
253         bool "Enable kmemleak auto scan thread << 
254         default y                              << 
255         depends on DEBUG_KMEMLEAK              << 
256         help                                   << 
257           Depending on the cpu, kmemleak scan  << 
258           stall user tasks at times. This opti << 
259           kmemleak scan at boot up.            << 
260                                                << 
261           Say N here to disable kmemleak auto  << 
262           scanning. Disabling this option disa << 
263           memory leaks.                        << 
264                                                << 
265           If unsure, say Y.                    << 
266                                                << 
267 config PER_VMA_LOCK_STATS                      << 
268         bool "Statistics for per-vma locks"    << 
269         depends on PER_VMA_LOCK                << 
270         help                                   << 
271           Say Y here to enable success, retry  << 
272           faults handled under protection of p << 
273           counters are exposed in /proc/vmstat << 
274           kernel developers to evaluate effect << 
275           identify pathological cases. Countin << 
276           overhead in the page fault path.     << 
277                                                << 
278           If in doubt, say N.                  << 
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php