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>] [day] [month] [year] [list]
Message-ID: <20200910070836.GB24441@localhost>
Date:   Thu, 10 Sep 2020 09:08:36 +0200
From:   Johan Hovold <johan@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Johan Hovold <johan@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        stable <stable@...r.kernel.org>
Subject: Re: [PATCH 1/2] serial: core: fix port-lock initialisation

On Wed, Sep 09, 2020 at 06:21:58PM +0300, Andy Shevchenko wrote:
> On Wed, Sep 09, 2020 at 04:31:00PM +0200, Johan Hovold wrote:
> > Commit f743061a85f5 ("serial: core: Initialise spin lock before use in
> > uart_configure_port()") tried to work around a breakage introduced by
> > commit a3cb39d258ef ("serial: core: Allow detach and attach serial
> > device for console") by adding a second initialisation of the port lock
> > when registering the port.
> > 
> > As reported by the build robots [1], this doesn't really solve the
> > regression introduced by the console-detach changes and also adds a
> > second redundant initialisation of the lock for normal ports.
> 
> I thought, though doubtfully, it was a regression made by
> 679193b7baf8 ("serial: 8250: Let serial core initialise spin lock")
> and then I completely forgot about [1].

Yes, that driver has had an explicit early initialisation of the lock
and it was indeed the removal of that which triggered the robot's
report. With the initialisation again done during console setup (patch
2/2), that should no longer be an issue (at least not for the console
port...).

> > Start cleaning up this mess by removing the redundant initialisation and
> > making sure that the port lock is again initialised once-only for ports
> > that aren't already in use as a console.
> 
> Thanks for looking into this!
> 
> I agree this is better place for lock initialization.
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Thanks for reviewing.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ