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:   Wed, 1 Mar 2023 13:33:09 +0200 (EET)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     Lukasz Majczak <lma@...ihalf.com>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Guenter Roeck <groeck@...omium.org>,
        linux-serial <linux-serial@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, upstream@...ihalf.com,
        stable@...r.kernel.org
Subject: Re: [PATCH] serial: core: fix broken console after suspend

On Wed, 1 Mar 2023, Lukasz Majczak wrote:

> Re-enable the console device after suspending, causes its cflags,

Re-enabling

> ispeed and ospeed to be set anew, basing on the values stored in
> uport->cons. The issue is that these values are set only once,
> when parsing console parameters after boot (see uart_set_options()),

Remove "The issue is that" from here and just state:

"These values are set only once when parsing console parameters after boot 
(see uart_set_options())."

> next after configuring a port in uart_port_startup() these parameteres

parameters

> (cflags, ispeed and ospeed) are copied to termios structure and
> the orginal one (stored in uport->cons) are cleared, but there is no place

original

> in code where those fields are checked against 0.
> When kernel calls uart_resume_port() and setups console, it copies cflags,
> ispeed and ospeed values from uart->cons,but those are alread cleared.

missing space after comma.

alread -> already

> The efect is that console is broken.

effect

> This patch address this by preserving the cflags, ispeed and

Too many "this", don't start with "This patch" but go directly to the 
point.


-- 
 i.


> ospeed fields in uart->cons during uart_port_startup().
> 
> Signed-off-by: Lukasz Majczak <lma@...ihalf.com>
> Cc: stable@...r.kernel.org
> ---
>  drivers/tty/serial/serial_core.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> index 2bd32c8ece39..394a05c09d87 100644
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -225,9 +225,6 @@ static int uart_port_startup(struct tty_struct *tty, struct uart_state *state,
>  			tty->termios.c_cflag = uport->cons->cflag;
>  			tty->termios.c_ispeed = uport->cons->ispeed;
>  			tty->termios.c_ospeed = uport->cons->ospeed;
> -			uport->cons->cflag = 0;
> -			uport->cons->ispeed = 0;
> -			uport->cons->ospeed = 0;
>  		}
>  		/*
>  		 * Initialise the hardware port settings.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ