Hi Richard, On Wed, Apr 19, 2017 at 03:37:42PM +0200, Richard Weinberger wrote: > > > > Tested only on ext4. > > I hope you classify this patch as RFC then. > We'll have problems when you just develop and test for ext4. :-) > It's a little difficult for people to test stuff on UBIFS without a turn-key solution like kvm-xfstests where they can just run something like 'kvm-xfstests -c ext4,f2fs,ubifs -g encrypt'. I did post patches to add UBIFS support to xfstests and kvm-xfstests a few months ago; maybe you're interested in taking them over and working to get them merged? > > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c > > index c4a389a6027b..14b2a2335a32 100644 > > --- a/fs/ext4/namei.c > > +++ b/fs/ext4/namei.c > > @@ -1257,8 +1257,8 @@ static inline int ext4_match(struct ext4_filename *fname, > > int ret; > > if (de->name_len < 16) > > return 0; > > - ret = memcmp(de->name + de->name_len - 16, > > - fname->crypto_buf.name + 8, 16); > > + ret = memcmp(de->name + de->name_len - 32, > > + fname->crypto_buf.name + 8, 32); > > return (ret == 0) ? 1 : 0; > > } > > name = fname->crypto_buf.name; > > Can the code still be able to read filenames which have been encrypted > using the "old" scheme? > The patch only changes the presentation of long encrypted filenames when accessed without the key. It doesn't change how filenames are encrypted. - Eric -- To unsubscribe from this list: send the line "unsubscribe linux-fscrypt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html