Re: [RFC PATCH v2 7/8] fscrypt: wire up fscrypt to use blk-crypto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[reduced CC list, since I don't think this is interesting outside ext4]

On Jun 13, 2019, at 12:55 PM, Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
> 
> What it really enables is a cryptosystem and on-disk format change where, for
> the purpose of working better with inline encryption, file contents are
> encrypted with the master key directly (or for v2 encryption policies it will be
> a per-mode derived key as it really should be, once we can actually get the v2
> encryption policy support reviewed and merged), and the inode numbers are added
> to the IVs.  As we know, when ext4 support is added, this will also preclude the
> filesystem from being resized.

Just as an aside, I thought that the inode number would *not* be added to the IV,
exactly so that ext4 filesystem resize would work?

I guess it shouldn't *strictly* preventing filesystem resizing, only the case of
shrinking the filesystem and having to relocate encrypted inodes.  Expanding the
filesystem shouldn't have that problem at all, nor should shrinking if there isn't
a need to relocate the encrypted inodes.  Moving encrypted blocks should be OK,
since the logical block numbers (and hence derived block IV) would stay the same.

Something like https://patchwork.ozlabs.org/patch/960766/ "Add block_high_watermark
sysfs tunable" would allow pre-migrating encrypted files in userspace via data copy
(read/decrypt+write/encrypt) before doing the resize, if necessary, so that files
do not use inode numbers that will be cut off the end of the filesystem.

Cheers, Andreas





Attachment: signature.asc
Description: Message signed with OpenPGP


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux