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: <cae5cf32-4ad1-0dbf-1b61-c57dd5549798@infradead.org>
Date:   Mon, 10 Jul 2023 08:41:41 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Raul Rangel <rrangel@...omium.org>
Cc:     Mario Limonciello <mario.limonciello@....com>,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Petr Mladek <pmladek@...e.com>, kramasub@...omium.org,
        Alexander Potapenko <glider@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Ard Biesheuvel <ardb@...nel.org>,
        "Jason A. Donenfeld" <Jason@...c4.com>,
        Li Zhe <lizhe.67@...edance.com>,
        "Liam R. Howlett" <Liam.Howlett@...cle.com>,
        Mark Rutland <mark.rutland@....com>,
        Will Deacon <will@...nel.org>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Zhou jie <zhoujie@...china.com>
Subject: Re: [PATCH] init: Don't proxy console= to earlycon

Hi,

On 7/10/23 08:30, Raul Rangel wrote:
> On Sun, Jul 9, 2023 at 8:43 PM Randy Dunlap <rdunlap@...radead.org> wrote:
>>
>>
>>
>> On 7/9/23 18:15, Mario Limonciello wrote:
>>> On 7/9/23 18:46, Randy Dunlap wrote:
>>>>
>>>>
>>>> On 7/7/23 18:17, Raul E Rangel wrote:
>>>>> Right now we are proxying the `console=XXX` command line args to the
>>>>> param_setup_earlycon. This is done because the following are
>>>>> equivalent:
>>>>>
>>>>>      console=uart[8250],mmio,<addr>[,options]
>>>>>      earlycon=uart[8250],mmio,<addr>[,options]
>>>>>
>>>>> In addition, when `earlycon=` or just `earlycon` is specified on the
>>>>> command line, we look at the SPCR table or the DT to extract the device
>>>>> options.
>>>>>
>>>>> When `console=` is specified on the command line, it's intention is to
>>>>> disable the console. Right now since we are proxying the `console=`
>>>>
>>>> How do you figure this (its intention is to disable the console)?
>>>
> 
> https://www.kernel.org/doc/html/v6.1/admin-guide/kernel-parameters.html
> says the following:

> console=

[many lines deleted here in kernel-parameters.txt]

>     { null | "" }
>             Use to disable console output, i.e., to have kernel
>             console messages discarded.
>             This must be the only console= parameter used on the
>             kernel command line.
> 

OK, I see what you are referring to: "console=" without any following parameters,
not the general "console=" command line parameter.

Thanks for the clarification.

>         earlycon=       [KNL] Output early console device and options.
> 
>             When used with no options, the early console is
>             determined by stdout-path property in device tree's
>             chosen node or the ACPI SPCR table if supported by
>             the platform.
> 
> The reason this bug showed up is that ChromeOS has set `console=` for a
> very long time:
> https://chromium.googlesource.com/chromiumos/platform/crosutils/+/main/build_kernel_image.sh#282
> I'm not sure on the exact history, but AFAIK, we don't have the ttyX devices.
> 
> Coreboot recently added support for the ACPI SPCR table which in
> combination with the
> `console=` arg, we are now seeing earlycon enabled when it shouldn't be.
> 
>>> I read that as "it's intention is to disable the default console (tty0)".
>>
>> Yes, that "default" word should be there IMO.
>>
>> Does this patch affect behavior if someone uses
>>         console=tty0
>> i.e., the default?
>>
> 
> No, it shouldn't. This change makes it so that the
> param_setup_earlycon function gets
> skipped if there is no value.
> See https://chromium.googlesource.com/chromiumos/third_party/kernel/+/v6.1/drivers/tty/serial/earlycon.c#223


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ