lkml.org 
[lkml]   [2019]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2 v5] x86/kdump: always reserve the low 1MiB when the crashkernel option is specified
lijiang <lijiang@redhat.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


\
 
 \ /
  Last update: 2019-10-25 05:41    [W:0.082 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site