hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/powerpc/Kconfig.debug
....@@ -2,7 +2,6 @@
22
33 config PPC_DISABLE_WERROR
44 bool "Don't build arch/powerpc code with -Werror"
5
- default n
65 help
76 This option tells the compiler NOT to build the code under
87 arch/powerpc with the -Werror flag (which means warnings
....@@ -56,7 +55,6 @@
5655 config CODE_PATCHING_SELFTEST
5756 bool "Run self-tests of the code-patching code"
5857 depends on DEBUG_KERNEL
59
- default n
6058
6159 config JUMP_LABEL_FEATURE_CHECKS
6260 bool "Enable use of jump label for cpu/mmu_has_feature()"
....@@ -70,7 +68,6 @@
7068 config JUMP_LABEL_FEATURE_CHECK_DEBUG
7169 bool "Do extra check on feature fixup calls"
7270 depends on DEBUG_KERNEL && JUMP_LABEL_FEATURE_CHECKS
73
- default n
7471 help
7572 This tries to catch incorrect usage of cpu_has_feature() and
7673 mmu_has_feature() in the code.
....@@ -80,16 +77,13 @@
8077 config FTR_FIXUP_SELFTEST
8178 bool "Run self-tests of the feature-fixup code"
8279 depends on DEBUG_KERNEL
83
- default n
8480
8581 config MSI_BITMAP_SELFTEST
8682 bool "Run self-tests of the MSI bitmap code"
8783 depends on DEBUG_KERNEL
88
- default n
8984
9085 config PPC_IRQ_SOFT_MASK_DEBUG
9186 bool "Include extra checks for powerpc irq soft masking"
92
- default n
9387
9488 config XMON
9589 bool "Include xmon kernel debugger"
....@@ -122,6 +116,14 @@
122116 Include support for disassembling in xmon. You probably want
123117 to say Y here, unless you're building for a memory-constrained
124118 system.
119
+
120
+config XMON_DEFAULT_RO_MODE
121
+ bool "Restrict xmon to read-only operations by default"
122
+ depends on XMON
123
+ default y
124
+ help
125
+ Operate xmon in read-only mode. The cmdline options 'xmon=rw' and
126
+ 'xmon=ro' override this default.
125127
126128 config DEBUGGER
127129 bool
....@@ -220,7 +222,7 @@
220222 help
221223 Select this to enable early debugging for IBM 44x chips via the
222224 inbuilt serial port. If you enable this, ensure you set
223
- PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
225
+ PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
224226
225227 config PPC_EARLY_DEBUG_40x
226228 bool "Early serial debugging for IBM/AMCC 40x CPUs"
....@@ -228,11 +230,11 @@
228230 help
229231 Select this to enable early debugging for IBM 40x chips via the
230232 inbuilt serial port. This works on chips with a 16550 compatible
231
- UART. Xilinx chips with uartlite cannot use this option.
233
+ UART.
232234
233235 config PPC_EARLY_DEBUG_CPM
234236 bool "Early serial debugging for Freescale CPM-based serial ports"
235
- depends on SERIAL_CPM
237
+ depends on SERIAL_CPM=y
236238 help
237239 Select this to enable early debugging for Freescale chips
238240 using a CPM-based serial port. This assumes that the bootwrapper
....@@ -323,7 +325,7 @@
323325 default "0x40000200"
324326 help
325327 You probably want 0x40000200 for ebony boards and
326
- 0x40000300 for taishan
328
+ 0x40000300 for taishan
327329
328330 config PPC_EARLY_DEBUG_44x_PHYSHIGH
329331 hex "EPRN of early debug UART physical address"
....@@ -358,9 +360,9 @@
358360 If you are unsure, say N.
359361
360362 config PPC_PTDUMP
361
- bool "Export kernel pagetable layout to userspace via debugfs"
362
- depends on DEBUG_KERNEL && DEBUG_FS
363
- help
363
+ bool "Export kernel pagetable layout to userspace via debugfs"
364
+ depends on DEBUG_KERNEL && DEBUG_FS
365
+ help
364366 This option exports the state of the kernel pagetables to a
365367 debugfs file. This is only useful for kernel developers who are
366368 working in architecture specific areas of the kernel - probably
....@@ -368,12 +370,32 @@
368370
369371 If you are unsure, say N.
370372
371
-config PPC_HTDUMP
372
- def_bool y
373
- depends on PPC_PTDUMP && PPC_BOOK3S_64
373
+config PPC_DEBUG_WX
374
+ bool "Warn on W+X mappings at boot"
375
+ depends on PPC_PTDUMP && STRICT_KERNEL_RWX
376
+ help
377
+ Generate a warning if any W+X mappings are found at boot.
378
+
379
+ This is useful for discovering cases where the kernel is leaving
380
+ W+X mappings after applying NX, as such mappings are a security risk.
381
+
382
+ Note that even if the check fails, your kernel is possibly
383
+ still fine, as W+X mappings are not a security hole in
384
+ themselves, what they do is that they make the exploitation
385
+ of other unfixed kernel bugs easier.
386
+
387
+ There is no runtime or memory usage effect of this option
388
+ once the kernel has booted up - it's a one time check.
389
+
390
+ If in doubt, say "Y".
374391
375392 config PPC_FAST_ENDIAN_SWITCH
376393 bool "Deprecated fast endian-switch syscall"
377
- depends on DEBUG_KERNEL && PPC_BOOK3S_64
378
- help
394
+ depends on DEBUG_KERNEL && PPC_BOOK3S_64
395
+ help
379396 If you're unsure what this is, say N.
397
+
398
+config KASAN_SHADOW_OFFSET
399
+ hex
400
+ depends on KASAN
401
+ default 0xe0000000