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]
Date:   Thu, 24 Oct 2019 22:39:59 -0500
From:   ebiederm@...ssion.com (Eric W. Biederman)
To:     lijiang <lijiang@...hat.com>
Cc:     "d.hatayama\@fujitsu.com" <d.hatayama@...itsu.com>,
        Simon Horman <horms@...ge.net.au>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
        "jgross\@suse.com" <jgross@...e.com>,
        "Thomas.Lendacky\@amd.com" <Thomas.Lendacky@....com>,
        "bhe\@redhat.com" <bhe@...hat.com>,
        "x86\@kernel.org" <x86@...nel.org>,
        "kexec\@lists.infradead.org" <kexec@...ts.infradead.org>,
        "dhowells\@redhat.com" <dhowells@...hat.com>,
        "mingo\@redhat.com" <mingo@...hat.com>,
        "bp\@alien8.de" <bp@...en8.de>, "hpa\@zytor.com" <hpa@...or.com>,
        "tglx\@linutronix.de" <tglx@...utronix.de>,
        "dyoung\@redhat.com" <dyoung@...hat.com>,
        "vgoyal\@redhat.com" <vgoyal@...hat.com>
Subject: Re: [PATCH 1/2 v5] x86/kdump: always reserve the low 1MiB when the crashkernel option is specified

lijiang <lijiang@...hat.com> writes:

>  * Returns the length of the argument (regardless of if it was
>  * truncated to fit in the buffer), or -1 on not found.
>  */
> static int
> __cmdline_find_option(const char *cmdline, int max_cmdline_size,
>                       const char *option, char *buffer, int bufsize)
>
>
> According to the above code comment, it should be better like this:
>
> +       if (cmdline_find_option(boot_command_line, "crashkernel",
> +                               NULL, 0) > 0) {
>
> After i test, i will post again.
>

This seems reasonable as we are dealing with x86 only code.

It wound be nice if someone could generalize cmdline_find_option to be
arch independent so that crash_core.c:parse_crashkernel could use it.
I don't think for this patchset, but it looks like an overdue cleanup.

We run the risk with parse_crashkernel using strstr and this using
another algorithm of having different kernel command line parsers
giving different results and disagreeing if "crashkernel=" is present
or not on the kernel command line.

Eric


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ