Merge "defconfig: Enable PANIC_ON_DATA_CORRUPTION on SM8150"

tirimbino
qctecmdr Service 6 years ago committed by Gerrit - the friendly Code Review server
commit 699acfcb87
  1. 1
      arch/arm64/configs/vendor/sm8150_defconfig
  2. 5
      include/linux/bug.h
  3. 7
      lib/Kconfig.debug
  4. 1
      mm/page_poison.c

@ -725,6 +725,7 @@ CONFIG_ATOMIC64_SELFTEST=m
CONFIG_TEST_USER_COPY=m
CONFIG_MEMTEST=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_PANIC_ON_DATA_CORRUPTION=y
CONFIG_PID_IN_CONTEXTIDR=y
CONFIG_ARM64_STRICT_BREAK_BEFORE_MAKE=y
CONFIG_CORESIGHT=y

@ -71,4 +71,9 @@ static inline __must_check bool check_data_corruption(bool v) { return v; }
corruption; \
}))
#ifdef CONFIG_PANIC_ON_DATA_CORRUPTION
#define PANIC_CORRUPTION 1
#else
#define PANIC_CORRUPTION 0
#endif /* CONFIG_PANIC_ON_DATA_CORRUPTION */
#endif /* _LINUX_BUG_H */

@ -2061,6 +2061,13 @@ config BUG_ON_DATA_CORRUPTION
If unsure, say N.
config PANIC_ON_DATA_CORRUPTION
bool "Cause a Kernel Panic When Data Corruption is detected"
help
Select this option to upgrade warnings for potentially
recoverable data corruption scenarios to system-halting panics,
for easier detection and debug.
source "samples/Kconfig"
source "lib/Kconfig.kgdb"

@ -84,6 +84,7 @@ static void check_poison_mem(struct page *page,
print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 16, 1, start,
end - start + 1, 1);
BUG_ON(PANIC_CORRUPTION);
dump_stack();
}

Loading…
Cancel
Save