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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 9 Jul 2023 20:15:53 -0500
From:   Mario Limonciello <mario.limonciello@....com>
To:     Randy Dunlap <rdunlap@...radead.org>,
        Raul E Rangel <rrangel@...omium.org>,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Petr Mladek <pmladek@...e.com>
Cc:     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

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)?

I read that as "it's intention is to disable the default console (tty0)".

IE if I add console=ttyS0,115200,n8 to my kernel command line then I 
don't get the output on tty0 anymore.  If I want it on both then I do

console=ttyS0,115200,n8 console=tty0.

> 
>> flag to the earlycon handler, we enable the earlycon_acpi_spcr_enable
>> variable when an SPCR table is present. This means that we
>> inadvertently enable the earlycon.
>>
>> This change makes it so we only proxy the console= command if it's
>> value is not empty. This way we can correctly handle both cases.
>>
>> Signed-off-by: Raul E Rangel <rrangel@...omium.org>
>> ---
>>
>>   init/main.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/init/main.c b/init/main.c
>> index aa21add5f7c54..f72bf644910c1 100644
>> --- a/init/main.c
>> +++ b/init/main.c
>> @@ -738,8 +738,7 @@ static int __init do_early_param(char *param, char *val,
>>   	for (p = __setup_start; p < __setup_end; p++) {
>>   		if ((p->early && parameq(param, p->str)) ||
>>   		    (strcmp(param, "console") == 0 &&
>> -		     strcmp(p->str, "earlycon") == 0)
>> -		) {
>> +		     strcmp(p->str, "earlycon") == 0 && val && val[0])) {
>>   			if (p->setup_func(val) != 0)
>>   				pr_warn("Malformed early option '%s'\n", param);
>>   		}
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ