[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: loop-aes does not work with sector sizes != 512 byte
Jari Ruusu wrote:
> Peter Niemayer wrote:
> > I tried your loop-device with AES encryption, and while it seems to
> > be a really nice tool it is lacking one important ability: One cannot
> > use it on media with a sector size != 512 byte - such as CD-ROMs,
> > MO-Media etc. (while one can read the raw data or mkfs the device,
> > mounting fails miserably).
>
> It does not limit sector size to 512. Some people use it with CD-ROMs just
> fine.
At least ext2 or fat filesystems on MO-media (that use 2048 sectors)
never work, mounting such always fails. As it works perfectly on
the same MO-drives when using media with 512 byte sectors, there has
to be something wrong...
During my tests I found that while I can losetup/mkfs/fsck the 2048byte media
perfectly, a mount afterwards fails. So it seems that while mkfs/fsck never
try to read something != 2048 byte blocks mount does something based
on a false sector size assumption.
> IV is computed using 512 byte units, and that has nothing to do with hard
> sector size.
Ok, so what can I do to help hunting down the cause of the problem?
While I'm quite familiar with C/gdb etc., I've only very little experience
with the internal structures used by linux block devices. I could use
kgdb if necessary... but maybe it's only a simple difference in what
fsck and mount do to find out the underlying devices block size...
Any idea where to start?
Regards,
Peter Niemayer
-
Linux-crypto: cryptography in and on the Linux system
Archive: http://mail.nl.linux.org/linux-crypto/