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] [day] [month] [year] [list]
Date:   Thu, 5 Jan 2017 16:59:40 -0500
From:   Theodore Ts'o <tytso@....edu>
To:     Thadeu Lima de Souza Cascardo <cascardo@...onical.com>
Cc:     One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>, linux-serial@...r.kernel.org,
        Russell King <rmk+kernel@...linux.org.uk>
Subject: Re: [PATCH] serial/8250: remove comment about schedule_timeout

On Thu, Jan 05, 2017 at 03:17:45PM -0200, Thadeu Lima de Souza Cascardo wrote:
> Okay. At first, I wanted to simply use msleep there, then realized there
> was the spinlock. I thought I got a good writeup of the history that was
> not in git yet, maybe we should just add a better comment and more
> details in the commit log. How about this as the comment?

Could you look at fixing this, instead?  I was taking a look at the
code, and it so very.... 1990's.  It looks like it was written during
the days before SMP, and then locking was smashed in a very
blunt-force way ---- probably because that's how it happened.  :-)

What we should **really** be doing with autoconfiguration, is instead
of using the spinlock to prevent it from being accessed, is to lock
out any attempt to transmit from the top-half, and remove it from the
linked list of ports to prevent the interrupt handler from accessing
it, make sure that any active interrupt handler has exited (and you
can use the spinlock for the preceeding bits), but then we can safely
do the autoconfiguration without having the deal with the spinlock at
all, afterwards.

It should't be *that* hard to just fix it for real.

Cheers,

						- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ