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  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:	Thu, 28 Oct 2010 11:10:20 +0200
From:	Andi Kleen <>
To:	James Bottomley <>
Cc:	"Nicholas A. Bellinger" <>,
	Mike Anderson <>,
	linux-kernel <>,
	linux-scsi <>,
	Vasu Dev <>,
	Tim Chen <>,
	Matthew Wilcox <>,
	Mike Christie <>,
	Jens Axboe <>,
	James Smart <>,
	Andrew Vasquez <>,
	FUJITA Tomonori <>,
	Hannes Reinecke <>,
	Joe Eykholt <>,
	Christoph Hellwig <>,
	Jon Hawley <>,
	Brian King <>,
	Christof Schmitt <>,
	Tejun Heo <>,
	Andrew Morton <>,
	"H. Peter Anvin" <>,
Subject: Re: [ANNOUNCE] Status of unlocked_qcmds=1 operation for .37

On Wed, Oct 27, 2010 at 09:27:38AM -0500, James Bottomley wrote:
> On Wed, 2010-10-27 at 09:53 +0200, Andi Kleen wrote:
> > > This sounds like a pretty reasonable compromise that I think is slightly
> > > less risky for the LLDs with the ghosts and cob-webs hanging off of
> > > them.
> > 
> > They won't get tested either next release cycle. Essentially
> > near nobody uses them.
> > 
> > > 
> > > What do you think..?
> > 
> > Standard linux practice is to simply push the locks down. That's a pretty
> > mechanical operation and shouldn't be too risky
> > 
> > With some luck you could even do it with coccinelle.
> Precisely ... if we can do the push down now as a mechanical
> transformation we can put it in the current merge window as a low risk
> API change.  This gives us optimal exposure to the rc sequence to sort
> out any problems that arise (or drivers that got missed) with the lowest
> risk of such problems actually arising.  Given the corner cases and the
> late arrival of fixes, the serial number changes are just too risky for
> the current merge window.  Having an API that changes depending on a
> flag is also a high risk process because it's prone to further sources
> of error.

Here's a coccinelle script I came up with that does the push down.
It still adds a bogus empty line in front of the irqflags declaration
which I haven't managed to avoid yet. Other than the it seems
to DTRT on the SCSI drivers I tried.


@ rule1 @
struct scsi_host_template t;
identifier qc;
t.queuecommand = qc;

@ rule2 @
identifier rule1.qc;
identifier cmnd;
expression E;
statement S, S2;
int qc(struct scsi_cmnd *cmnd, ...) 
	... when != S
+	unsigned long irqflags;

+	spin_lock_irqsave(&cmnd->device->host->hostlock, irqflags);
+	spin_unlock_irqrestore(&cmnd->device->host->hostlock, irqflags);
	return E;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists