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:	Fri, 04 May 2012 09:00:08 -0400
From:	Prarit Bhargava <prarit@...hat.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	john stultz <johnstul@...ibm.com>,
	Don Zickus <dzickus@...hat.com>,
	Larry Woodman <lwoodman@...hat.com>, gregkh@...uxfoundation.org
Subject: Re: [RFC PATCH] tty, add kref to sysrq handlers



On 04/27/2012 01:39 PM, Alan Cox wrote:
>> If the lock were removed, however, there is one _unlikely_ circumstance in
>> which the array would be left unprotected.  That would be the situation in
>> which a module was loaded and the sysrq handler was registered during the
>> execution of the module.  Again, the possibility of the scenario is very
>> small and given the existing usage of unregister_sysrq_key() in the tree
>> it seems like removing the lock is sufficient.
> 
> It's asking for later disasters I think.
> 
> I'm not sure I see we need a kref - that looks like overkill, and its
> probably even more elegantly done with RCU ?

Alan,

Thanks for the suggestions.  As always they are much appreciated.

I looked into this, and unfortunately the RCU implementation in the kernel is
dynamic-list based.  I could do some funky stuff to make it work with an array
or even implement an RCU for arrays but I'm wondering if that is wasted code.

Most arrays in the kernel that require RCU-like locking seem to use seqlocks.
The problem with any lock, unfortunately, is that I would have to still block
irqs, which is exactly what I'm trying to avoid.

I'll submit my patch as a real PATCH and see what everyone thinks of it ...

P.
--
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