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:	Sun, 11 Oct 2009 08:29:17 -0700
From:	Arjan van de Ven <arjan@...radead.org>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	John Kacur <jkacur@...hat.com>, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	Christoph Hellwig <hch@...radead.org>,
	Jonathan Corbet <corbet@....net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Vincent Sanders <vince@...tec.co.uk>,
	linux-scsi@...r.kernel.org
Subject: Re: [PATCH RFC] [PATCH] drivers/scsi/ch.c: Remove BKL in ch_open

On Sun, 11 Oct 2009 15:37:09 +0100
Alan Cox <alan@...rguk.ukuu.org.uk> wrote:

> On Sun, 11 Oct 2009 15:45:16 +0200 (CEST)
> John Kacur <jkacur@...hat.com> wrote:
> 
> [linux-scsi cc'd]
> 
> > Locking in ch_open is covered by the spin_lock, it serializes the
> > calls to idr_find and scsi_device_get. The BKL appears redundant to
> > me here.
> 
> I'm not so sure. In fact there are some quite umm interesting
> questions about this code, and some of them are shared with other
> modules too.
> 
> Consider the following sequence
> 
> 		CPU1				CPU2
> 	register_chrdev
> 		ok
> 						open device
> 						takes lock


but open does not take the BKL, so the BKL is not protecting you at
all against this..



-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
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