Re: [CFT][PATCH] loopback fixes for 2.3

From: Alexander Viro (aviro@redhat.com)
Date: Sat Feb 12 2000 - 18:12:34 EST


On Sat, 12 Feb 2000, Andi Kleen wrote:

> On Sat, Feb 12, 2000 at 12:00:08PM +0100, Alexander Viro wrote:
> > --- linux-2.3.44-pre8/drivers/block/loop.c Thu Feb 10 16:42:11 2000
> > +++ linux-bird.vm/drivers/block/loop.c Sat Feb 12 03:41:27 2000
> > @@ -40,6 +40,10 @@
> > * it passes the underlying device's block number instead of the
> > * offset. This makes it change for a given block when the file is
> > * moved/restored/copied and also doesn't work over NFS.
> > + * AV, Feb 11, 2000: for files we pass the page index now. It should fix the
> > + * problem above. Since the granularity is PAGE_CACHE_SIZE now it seems to
> > + * be correct way. OTOH, taking the thing from x86 to Alpha may become
> > + * interesting, so we might want to rethink it.
>
> You cannot do that. That will break all encrypted files that use the
> passed index as IV. It is already part of the disk format. The only
> way to change it is to add new vectors to loop_func_table and keep
> the absolute offset for the old files. Then new encryption modules
> could use the changed format, but old ones would still work with the
> known limitations.

Oh, please. Decrypt the thing with old kernel and reencrypt it with new one.
Problem solved. Or use the trivial userland program to switch the format -
FIBMAP is alive and well, so you can get the disk block number from userland.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:23 EST