On 03/30, Eric Biggers wrote:
> On Mon, Mar 30, 2020 at 12:25:24PM -0700, Jaegeuk Kim wrote:
> > From: Jaegeuk Kim <[email protected]>
> >
> > This patch gives more information of encryption policy.
> >
> > Signed-off-by: Jaegeuk Kim <[email protected]>
> > Change-Id: I04a6826aa4497554ce79d884d495b3dda1b64fac
> > ---
> > tools/f2fscrypt.c | 34 ++++++++++++++++++++++++++++++++++
> > 1 file changed, 34 insertions(+)
> >
> > diff --git a/tools/f2fscrypt.c b/tools/f2fscrypt.c
> > index fe3e0ff..bb3e70f 100644
> > --- a/tools/f2fscrypt.c
> > +++ b/tools/f2fscrypt.c
>
> I'm a little confused why the f2fscrypt tool even exists? Who is using it?
> It
> looks like this code was all copied from e4crypt, which is no longer being
> maintained either as there are now better filesystem-independent tools:
>
> - https://github.com/google/fscrypt
> - https://github.com/google/fscryptctl
> - https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/tree/io/encrypt.c
>
> Would one of those work for you instead?
I'm using it occasionally in Android. I think it'd be great to add it in f2fs_io
likewise xfs_io tho, it'd be also okay to add one of projects in AOSP, if you
have some bandwidth. If you have any plan, I'd okay to remove f2fscrypt in
f2fs-tools.
>
> > @@ -63,6 +63,8 @@
> > #define F2FS_ENCRYPTION_MODE_AES_256_GCM 2
> > #define F2FS_ENCRYPTION_MODE_AES_256_CBC 3
> > #define F2FS_ENCRYPTION_MODE_AES_256_CTS 4
> > +#define F2FS_ENCRYPTION_MODE_ADIANTUM 9
> > +#define F2FS_ENCRYPTION_MODE_PRIVATE 127
>
> This doesn't match the list of encryption modes from the UAPI header.
Will fix.
>
> > +static const char *get_crypt_mode(int mode)
> > +{
> > + int i;
> > +
> > + for (i = 0; i < (sizeof(enc_mode_str) / sizeof(enc_mode_str[0])); ++i) {
> > + if (mode == enc_mode_str[i].mode) {
> > + return enc_mode_str[i].name;
> > + }
> > + }
> > + return "N/A";
> > +}
>
> If the mode number is unrecognized, it should show the number.
Will fix.
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel