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]
Date:	Wed, 04 Aug 2010 07:03:27 -0500
From:	Jason Wessel <jason.wessel@...driver.com>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
CC:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	David Airlie <airlied@...ux.ie>,
	David Miller <davem@...emloft.net>,
	Fenghua Yu <fenghua.yu@...el.com>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Russell King <linux@....linux.org.uk>,
	Tony Luck <tony.luck@...el.com>
Subject: Re: [PATCH 1/3] Input: sysrq - drop tty argument from sysrq ops handlers

On 08/04/2010 03:33 AM, Benjamin Herrenschmidt wrote:
> On Wed, 2010-08-04 at 00:59 -0700, Dmitry Torokhov wrote:
>   
>> Noone is using tty argument so let's get rid of it.
>>     
>
> While talking about sysrq...
>
> I noticed that serial drivers call sysrq with the uart lock held.
>
>   

The usb serial has the same kind of problem with all sorts of locks.  I
had resorted to using a tasklet or workqueue to get the sysrq to execute
just outside the usb serial driver context.  This work never made it
upstream because it was part of another series, but the reference is:
http://lkml.org/lkml/2010/3/9/17

For the standard serial you might be able to get away with dropping the
lock for the sysrq.

Did you have a particular way to trigger the problem or was it just
completely random, because I don't know that I have observed this
behavior with the typical 8250 driver.

Jason.

> I've seen deadlocks caused by that, for example, when entering the
> debugger, it waits forever for a CPU which is itself waiting on the UART
> lock.
>
> I have a patch to drop the lock in serial_core.h, I'll post that
> tomorrow hopefully, just checking if there's any objection there ? The
> serial drivers might need to be audited a bit to make sure they cope
> with the lock being dropped and re-acquired around the sysrq call.
>
> Cheers,
> Ben.
>  
>
>   

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ