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:   Tue, 17 Mar 2020 14:10:32 +0800
From:   Baolin Wang <baolin.wang7@...il.com>
To:     Chunyan Zhang <zhang.lyra@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>, linux-serial@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>,
        Orson Zhai <orsonzhai@...il.com>,
        Chunyan Zhang <chunyan.zhang@...soc.com>
Subject: Re: [PATCH 1/3] serial: sprd: check console via stdout-path in addition

On Mon, Mar 16, 2020 at 6:19 PM Chunyan Zhang <zhang.lyra@...il.com> wrote:
>
> From: Chunyan Zhang <chunyan.zhang@...soc.com>
>
> The SPRD serial driver need to know which serial port would be used as
> console in an early period during initialization, the purpose is to
> keep the console port alive as possible even if there's some error
> caused by no clock configured under serial devicetree nodes. But with
> the patch [1], the console port couldn't be identified if missing
> console command line.
>
> So this patch adds using another interface to do check by reading
> stdout-path.
>
> [1] https://lore.kernel.org/lkml/20190826072929.7696-4-zhang.lyra@gmail.com/
>
> Signed-off-by: Chunyan Zhang <chunyan.zhang@...soc.com>

Reviewed-by: Baolin Wang <baolin.wang7@...il.com>

> ---
>  drivers/tty/serial/sprd_serial.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
> index 3d3c70634589..18706333f146 100644
> --- a/drivers/tty/serial/sprd_serial.c
> +++ b/drivers/tty/serial/sprd_serial.c
> @@ -1147,7 +1147,8 @@ static bool sprd_uart_is_console(struct uart_port *uport)
>  {
>         struct console *cons = sprd_uart_driver.cons;
>
> -       if (cons && cons->index >= 0 && cons->index == uport->line)
> +       if ((cons && cons->index >= 0 && cons->index == uport->line) ||
> +           of_console_check(uport->dev->of_node, SPRD_TTY_NAME, uport->line))
>                 return true;
>
>         return false;
> --
> 2.20.1
>


-- 
Baolin Wang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ