Re: [f2fs-dev] [PATCH v7 10/16] fscrypt: v2 encryption policy support

2019-07-29 Thread Eric Biggers
On Sun, Jul 28, 2019 at 05:17:30PM -0400, Theodore Y. Ts'o wrote: > On Fri, Jul 26, 2019 at 03:41:35PM -0700, Eric Biggers wrote: > > @@ -319,6 +329,31 @@ int fscrypt_ioctl_add_key(struct file *filp, void > > __user *_uarg) > > if (!capable(CAP_SYS_ADMIN)) > > goto

Re: [f2fs-dev] [PATCH v7 10/16] fscrypt: v2 encryption policy support

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:35PM -0700, Eric Biggers wrote: > @@ -319,6 +329,31 @@ int fscrypt_ioctl_add_key(struct file *filp, void __user > *_uarg) > if (!capable(CAP_SYS_ADMIN)) > goto out_wipe_secret; > > + if (arg.key_spec.type != FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR)

[f2fs-dev] [PATCH v7 10/16] fscrypt: v2 encryption policy support

2019-07-26 Thread Eric Biggers
From: Eric Biggers Add a new fscrypt policy version, "v2". It has the following changes from the original policy version, which we call "v1" (*): - Master keys (the user-provided encryption keys) are only ever used as input to HKDF-SHA512. This is more flexible and less error-prone, and