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, 6 Jan 2008 10:44:35 -0800 (PST)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	James Bottomley <James.Bottomley@...senPartnership.com>
cc:	Peter Osterlund <petero2@...ia.com>,
	Matthew Wilcox <matthew@....cx>, Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jens Axboe <jens.axboe@...cle.com>,
	Al Viro <viro@...IV.linux.org.uk>
Subject: Re: [patch] scsi: revert "[SCSI] Get rid of scsi_cmnd->done"



On Sun, 6 Jan 2008, Linus Torvalds wrote:
> 
> That said:
> 
> > pktcdvd shouldn't be mucking with the size of the underlying CD/DVD ...
> 
> I'm not sure if it should be mucking with the size or not, but it 
> definitely shouldn't be mucking with the block-size, because that can 
> indeed cause huge problems. 

Hmm. Looking closer, it's probably ok in that case, because it does do a 
"bd_claim()" to make sure that it has exclusive access, so while there may 
be other openers around, at least those other openers won't be filesystem 
mounts or anything that opened with O_EXCL.

So changing the blocksize is probably ok in this case.

That still leaves the question whether pktcdvd *should* muck with the base 
device at all, and I'm not at all sure about that.  But I'm no longer sure 
that the pktcdvd code is necessarily *clearly* broken, now it's more of a 
"should it really do that?" thing.

So I still suspect that this:

> -	set_capacity(pd->disk, lba << 2);
> -	set_capacity(pd->bdev->bd_disk, lba << 2);
> -	bd_set_size(pd->bdev, (loff_t)lba << 11);
> +	set_capacity(pd->disk, get_capacity(pd->bdev->bd_disk));

is likely a good thing to do (in conjunction with my patch that made 
i_size be "reliable" after an open), but there may be some reason why 
pktcdvd really wants to control the size rather than be on the receiving 
end of the size.

Peter, this is your decision. Apparently my one-liner fixes the immediate 
bug (but it's not really a regression either - I think the i_size issue 
has been there since pretty much day #1), and what pktcdvd does is 
somewhat less critical an issue?

			Linus
--
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