[Devel] [PATCH RHEL8 COMMIT] kexec/kasan: Increase automatic memory reservation for KASAN-enabled kernels

Konstantin Khorenko khorenko at virtuozzo.com
Fri Mar 5 18:46:13 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.8
------>
commit c1ace47dc5e6bd9d7c73e44c6263c94e10cdde4c
Author: Andrey Ryabinin <aryabinin at odin.com>
Date:   Tue Sep 8 19:30:58 2015 +0400

    kexec/kasan: Increase automatic memory reservation for KASAN-enabled kernels
    
    CONFIG_KASAN=y significantly increases kernel's memory usage.
    160Mb for crash kernel is not enough. Increase it up to 320Mb.
    
    https://jira.sw.ru/browse/PSBM-39339
    Signed-off-by: Andrey Ryabinin <aryabinin at odin.com>
    
    https://jira.sw.ru/browse/PSBM-56847
    Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
    
    (cherry picked from vz7 commit 6e7f52766da5 ("kexec, kasan: increase
    KEXEC_AUTO_RESERVED_SIZE under CONFIG_KASAN=y"))
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 kernel/crash_core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index 26131019b179..0ea2e4463e0d 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -263,7 +263,11 @@ static int __init __parse_crashkernel(char *cmdline,
 
 	if (strncmp(ck_cmdline, "auto", 4) == 0) {
 #if defined(CONFIG_X86_64) || defined(CONFIG_S390)
+#ifndef CONFIG_KASAN
 		ck_cmdline = "1G-4G:160M,4G-64G:192M,64G-1T:256M,1T-:512M";
+#else
+		ck_cmdline = "1G-1T:320M,1T-:512M";
+#endif
 #elif defined(CONFIG_ARM64)
 		ck_cmdline = "2G-:448M";
 #elif defined(CONFIG_PPC64)


More information about the Devel mailing list