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: <YZ4g+U7PZ4bdjVjm@kroah.com>
Date:   Wed, 24 Nov 2021 12:24:41 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Sherry Sun <sherry.sun@....com>
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()

On Wed, Nov 24, 2021 at 10:56:43AM +0000, Sherry Sun wrote:
> 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.

Then why submit it?

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

recommended by what?  The hardware designers?

> 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().

Please document this in the changelog, otherwise we have no idea why
this is needed.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ