Re: [PATCH v1 5/6] x86/boot: Allow longer parameter list for earlyprintk

From: Ingo Molnar
Date: Mon Jan 15 2018 - 22:11:32 EST



* Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> Allow longer parameter list for earlyprintk to support new coming
> parameters.
>
> No functional change intended.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> arch/x86/boot/early_serial_console.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/boot/early_serial_console.c b/arch/x86/boot/early_serial_console.c
> index 8cb7b0e8fe98..ef10926ab9e5 100644
> --- a/arch/x86/boot/early_serial_console.c
> +++ b/arch/x86/boot/early_serial_console.c
> @@ -90,7 +90,7 @@ static void early_serial_init(unsigned long port, int baud)
> static void parse_earlyprintk(void)
> {
> int baud = DEFAULT_BAUD;
> - char arg[32];
> + char arg[64];
> int pos = 0;
> unsigned long port = 0;

BTW., what happens if the parsed string is longer than this buffer?

Thanks,

Ingo