lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20171114080129.GA6115@dhcp-128-65.nay.redhat.com>
Date:   Tue, 14 Nov 2017 16:01:29 +0800
From:   Dave Young <dyoung@...hat.com>
To:     kexec@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc:     akpm@...ux-foundation.org, bhe@...hat.com, vgoyal@...hat.com,
        bhsharma@...hat.com
Subject: [PATCH V2] kdump: print a message in case parse_crashkernel_mem
 resulted in zero bytes

In parse_crashkernel_mem, it silently return in case we get zero
bytes in the parsing function.  It is useful for debugging for
adding a message especially sometimes kernel can not boot
up correctly.

Add a pr_info instead of pr_warn because it is expected behavior for
size = 0, eg. crashkernel=2G-4G:128M, size will be 0 in case system
memory is less than 2G.

Signed-off-by: Dave Young <dyoung@...hat.com>
---
[v1 -> v2]: bhsharma: pr_warn looks confusing because of return 0
 kernel/crash_core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-x86.orig/kernel/crash_core.c
+++ linux-x86/kernel/crash_core.c
@@ -108,7 +108,8 @@ static int __init parse_crashkernel_mem(
 				return -EINVAL;
 			}
 		}
-	}
+	} else
+		pr_info("crashkernel size resulted in zero bytes\n");
 
 	return 0;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ