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
| ||
|
Date: Wed, 15 Nov 2006 17:03:34 -0500 From: "linux-os \(Dick Johnson\)" <linux-os@...logic.com> To: "Phillip Susi" <psusi@....rr.com> Cc: "Yakov Lerner" <iler.ml@...il.com>, "Kernel" <linux-kernel@...r.kernel.org> Subject: Re: locking sectors of raw disk (raw read-write test of mounted disk) On Wed, 15 Nov 2006, Phillip Susi wrote: > No, you can not tamper with the underlying data while the kernel has it > mounted. > > Yakov Lerner wrote: >> I'd like to make read-write test of the raw disk, and disk has >> mounted partitions. Is it possible to lock range of sectors >> of the raw device so that any kernel code that wants to write >> to this range will sleep ? (so that test >> { lock range; read /dev/hda->buf; write buf->/dev/hda; unlock } >> won't corrupt the filesysyem ?) >> >> Thanks >> Yakov > Well certainly if the low-level driver was modified, or a new one created, so that one could lock/unlock a range of sectors, then that would be possible. You would need to save (somewhere) the original sector data, then put it back before unlocking that range. You couldn't save the original data in a file on the disk, because that file-data may (someday) extend into the locked region and you have a deadlock. In the "good old days" when a SCSI format block command actually worked, we could repair bad sectors by doing just that. We would lock the block, save whatever data was readable in that block, format that block, write the data back, then release the lock. Cheers, Dick Johnson Penguin : Linux version 2.6.16.24 on an i686 machine (5592.72 BogoMips). New book: http://www.AbominableFirebug.com/ _ .. **************************************************************** The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@...logic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them. Thank you. - 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