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]
Message-ID: <DB9PR04MB841142300744686983652AB992619@DB9PR04MB8411.eurprd04.prod.outlook.com>
Date:   Wed, 24 Nov 2021 10:56:43 +0000
From:   Sherry Sun <sherry.sun@....com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     "jirislaby@...nel.org" <jirislaby@...nel.org>,
        "u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH V2] tty: serial: imx: disable UCR4_OREN in .stop_rx()
 instead of .shutdown()

Hi Greg,

> -----Original Message-----
> From: Greg KH <gregkh@...uxfoundation.org>
> Sent: 2021年11月24日 17:59
> To: Sherry Sun <sherry.sun@....com>
> Cc: jirislaby@...nel.org; u.kleine-koenig@...gutronix.de; linux-
> serial@...r.kernel.org; linux-kernel@...r.kernel.org; dl-linux-imx <linux-
> imx@....com>
> Subject: Re: [PATCH V2] tty: serial: imx: disable UCR4_OREN in .stop_rx()
> instead of .shutdown()
> 
> On Tue, Nov 23, 2021 at 06:51:22PM +0800, Sherry Sun wrote:
> > From: Fugang Duan <fugang.duan@....com>
> >
> > Disable the UCR4_OREN bit in .stop_rx() before the uart receiver is
> > disabled maybe better than in the .shutdown() function.
> 
> Why is it better?  What does this "fix"?

Since I am not clear about the history of this patch, so I haven't found any obvious issues without this patch so far.

But after discussing with the IP owner, it is still recommended to disable the receiver-related interrupts like OREN before disabling the receiver.

If not, when we have the overrun error during the receiver disable process, the overrun interrupt will keep trigging until we disable the OREN interrupt in the .shutdown(), because the ORE status can only be cleared when read the rx FIFO or reset the controller.  Although the called time between the receiver disable and OREN disable in .shutdown() is very short, there is still the risk of endless interrupt during this short period of time. So had better to disable OREN before the receiver been disabled in .stop_rx().

Best regards
Sherry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ