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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6dbf6d62-a860-4b69-5ea0-f540d52dbf43@oracle.com>
Date:   Tue, 11 Jan 2022 09:05:28 -0600
From:   john.p.donnelly@...cle.com
To:     Zhen Lei <thunder.leizhen@...wei.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, "H . Peter Anvin" <hpa@...or.com>,
        linux-kernel@...r.kernel.org, Dave Young <dyoung@...hat.com>,
        Baoquan He <bhe@...hat.com>, Vivek Goyal <vgoyal@...hat.com>,
        Eric Biederman <ebiederm@...ssion.com>,
        kexec@...ts.infradead.org,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        linux-arm-kernel@...ts.infradead.org,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        devicetree@...r.kernel.org, Jonathan Corbet <corbet@....net>,
        linux-doc@...r.kernel.org
Cc:     Randy Dunlap <rdunlap@...radead.org>,
        Feng Zhou <zhoufeng.zf@...edance.com>,
        Kefeng Wang <wangkefeng.wang@...wei.com>,
        Chen Zhou <dingguo.cz@...group.com>
Subject: Re: [PATCH v19 04/13] kdump: reduce unnecessary parameters of
 parse_crashkernel_{high|low}()

On 12/28/21 7:26 AM, Zhen Lei wrote:
> Delete confusing parameters 'system_ram' and 'crash_base' of
> parse_crashkernel_{high|low}(), they are only needed by the case of
> "crashkernel=X@[offset]".
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
 >
Acked-by: John Donnelly  <john.p.donnelly@...cle.com>

> ---
>   kernel/crash_core.c | 21 ++++++++++-----------
>   1 file changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/kernel/crash_core.c b/kernel/crash_core.c
> index 3b9e01fc450b2a4..b7d024eb464d0ae 100644
> --- a/kernel/crash_core.c
> +++ b/kernel/crash_core.c
> @@ -278,20 +278,20 @@ int __init parse_crashkernel(char *cmdline,
>   }
>   
>   static int __init parse_crashkernel_high(char *cmdline,
> -			     unsigned long long system_ram,
> -			     unsigned long long *crash_size,
> -			     unsigned long long *crash_base)
> +					 unsigned long long *crash_size)
>   {
> -	return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base,
> +	unsigned long long base;
> +
> +	return __parse_crashkernel(cmdline, 0, crash_size, &base,
>   				"crashkernel=", suffix_tbl[SUFFIX_HIGH]);
>   }
>   
>   static int __init parse_crashkernel_low(char *cmdline,
> -			     unsigned long long system_ram,
> -			     unsigned long long *crash_size,
> -			     unsigned long long *crash_base)
> +					unsigned long long *crash_size)
>   {
> -	return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base,
> +	unsigned long long base;
> +
> +	return __parse_crashkernel(cmdline, 0, crash_size, &base,
>   				"crashkernel=", suffix_tbl[SUFFIX_LOW]);
>   }
>   
> @@ -310,12 +310,11 @@ int __init parse_crashkernel_high_low(char *cmdline,
>   				      unsigned long long *low_size)
>   {
>   	int ret;
> -	unsigned long long base;
>   
>   	BUG_ON(!high_size || !low_size);
>   
>   	/* crashkernel=X,high */
> -	ret = parse_crashkernel_high(cmdline, 0, high_size, &base);
> +	ret = parse_crashkernel_high(cmdline, high_size);
>   	if (ret)
>   		return ret;
>   
> @@ -323,7 +322,7 @@ int __init parse_crashkernel_high_low(char *cmdline,
>   		return -EINVAL;
>   
>   	/* crashkernel=Y,low */
> -	ret = parse_crashkernel_low(cmdline, 0, low_size, &base);
> +	ret = parse_crashkernel_low(cmdline, low_size);
>   	if (ret)
>   		*low_size = -1;
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ