Commit c885df50f571faf9fd9f395361cfff1b3a16e06e

Authored by Jeremy Fitzhardinge
Committed by Ingo Molnar
1 parent 9f077871ce

x86: default corruption check to off, but put parameter default in Kconfig

Default the low memory corruption check to off, but make the default setting of
the memory_corruption_check kernel parameter a config parameter.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 2 changed files with 20 additions and 2 deletions Side-by-side Diff

... ... @@ -1061,7 +1061,6 @@
1061 1061  
1062 1062 config X86_CHECK_BIOS_CORRUPTION
1063 1063 bool "Check for low memory corruption"
1064   - default y
1065 1064 help
1066 1065 Periodically check for memory corruption in low memory, which
1067 1066 is suspected to be caused by BIOS. Even when enabled in the
... ... @@ -1081,6 +1080,14 @@
1081 1080 BIOS-originated corruption always affects the same memory,
1082 1081 you can use memmap= to prevent the kernel from using that
1083 1082 memory.
  1083 +
  1084 +config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
  1085 + bool "Set the default setting of memory_corruption_check"
  1086 + depends on X86_CHECK_BIOS_CORRUPTION
  1087 + default y
  1088 + help
  1089 + Set whether the default state of memory_corruption_check is
  1090 + on or off.
1084 1091  
1085 1092 config MATH_EMULATION
1086 1093 bool
arch/x86/kernel/setup.c
... ... @@ -587,7 +587,8 @@
587 587 #ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
588 588 #define MAX_SCAN_AREAS 8
589 589  
590   -static int __read_mostly memory_corruption_check = 0;
  590 +static int __read_mostly memory_corruption_check = -1;
  591 +
591 592 static unsigned __read_mostly corruption_check_size = 64*1024;
592 593 static unsigned __read_mostly corruption_check_period = 60; /* seconds */
593 594  
... ... @@ -633,6 +634,16 @@
633 634 static void __init setup_bios_corruption_check(void)
634 635 {
635 636 u64 addr = PAGE_SIZE; /* assume first page is reserved anyway */
  637 +
  638 + if (memory_corruption_check == -1) {
  639 + memory_corruption_check =
  640 +#ifdef CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK
  641 + 1
  642 +#else
  643 + 0
  644 +#endif
  645 + ;
  646 + }
636 647  
637 648 if (corruption_check_size == 0)
638 649 memory_corruption_check = 0;