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: <20211123095106.dobqw2wfz2o2ofwc@pengutronix.de>
Date:   Tue, 23 Nov 2021 10:51:06 +0100
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     Sherry Sun <sherry.sun@....com>
Cc:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "jirislaby@...nel.org" <jirislaby@...nel.org>,
        "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] tty: serial: imx: clear RTSD status before suspend

On Tue, Nov 23, 2021 at 08:41:18AM +0000, Sherry Sun wrote:
> Hi Uwe,
> 
> > -----Original Message-----
> > From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> > Sent: 2021年11月23日 15:42
> > To: Sherry Sun <sherry.sun@....com>
> > Cc: gregkh@...uxfoundation.org; jirislaby@...nel.org; linux-
> > serial@...r.kernel.org; linux-kernel@...r.kernel.org; dl-linux-imx <linux-
> > imx@....com>
> > Subject: Re: [PATCH] tty: serial: imx: clear RTSD status before suspend
> > 
> > On Tue, Nov 23, 2021 at 03:03:49PM +0800, Sherry Sun wrote:
> > > From: Fugang Duan <fugang.duan@....com>
> > >
> > > Clear RTSD status before suspend due to the port also use RTS pin as
> > > wakeup source, need to clear the flag first.
> > 
> > I'd write:
> > 
> > 	Clear RTSD status before enabling the irq event for RTSD.
> 
> Thanks for the suggestion, I will reorganize the commit message and send V2.
> 
> > 
> > That this happens in the context of suspend isn't that important.
> 
> Sorry I didn't get the point here, can you please explain more?
> Per my understanding, the wakeup source interrupt is handled in the
> suspend context, so clear the flag in the suspend context is also
> necessary.

But the actual problem is that RTSD is enabled without first clearing it
and not that RTSD isn't cleared in suspend.

So my initial reaction after reading the commit log header "clear RTSD
status before suspend" was: WTH, why do we need clearing RTSD before
suspend. Shouldn't the RTSD state kept over suspend?

In contrast clearing an event before the respecive irq is enabled is
more obviously correct. And if the irq source is enabled as part of
suspend or open isn't that relevant for the subject line.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ