Re: [PATCH v7 16/16] fscrypt: document the new ioctls and policy version

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:41PM -0700, Eric Biggers wrote: > +- The kernel cannot magically wipe copies of the master key(s) that > + userspace might have as well. Therefore, userspace must wipe all > + copies of the master key(s) it makes as well. Naturally, the same > + also applies to al

Re: [PATCH v7 13/16] ext4: wire up new fscrypt ioctls

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:38PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Wire up the new ioctls for adding and removing fscrypt keys to/from the > filesystem, and the new ioctl for retrieving v2 encryption policies. > > FS_IOC_REMOVE_ENCRYPTION_KEY also required making ext4_drop_in

Re: [PATCH v7 12/16] fscrypt: require that key be added when setting a v2 encryption policy

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:37PM -0700, Eric Biggers wrote: > From: Eric Biggers > > By looking up the master keys in a filesystem-level keyring rather than > in the calling processes' key hierarchy, it becomes possible for a user > to set an encryption policy which refers to some key they don'

Re: [PATCH v7 11/16] fscrypt: allow unprivileged users to add/remove keys for v2 policies

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:36PM -0700, Eric Biggers wrote: > diff --git a/fs/crypto/keyring.c b/fs/crypto/keyring.c > index 56e085c2ed8c6..307533d4d7c51 100644 > --- a/fs/crypto/keyring.c > +++ b/fs/crypto/keyring.c > + if (mk->mk_users->keys.nr_leaves_on_tree != 0) { > +

Re: [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)

Re: Backlog support for CAAM?

2019-07-28 Thread Richard Weinberger
- Ursprüngliche Mail - > Right now we're evaluating two options: > -reworking v5 above > -using crypto engine (crypto/crypto_engine.c) > > Ideally crypto engine should be the way to go. > However we need to make sure performance degradation is negligible, > which unfortunately is not case.

Re: [PATCH 0/4] crypto: add amlogic crypto offloader driver

2019-07-28 Thread LABBE Corentin
On Sun, Jul 28, 2019 at 11:48:03AM -0700, Eric Biggers wrote: > Hi Corentin, > > On Thu, Jul 25, 2019 at 07:42:52PM +, Corentin Labbe wrote: > > Hello > > > > This serie adds support for the crypto offloader present on amlogic GXL > > SoCs. > > > > Tested on meson-gxl-s905x-khadas-vim and me

Re: [PATCH v7 09/16] fscrypt: add an HKDF-SHA512 implementation

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:34PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Add an implementation of HKDF (RFC 5869) to fscrypt, for the purpose of > deriving additional key material from the fscrypt master keys for v2 > encryption policies. HKDF is a key derivation function built on

Re: [PATCH v7 08/16] fscrypt: add FS_IOC_GET_ENCRYPTION_KEY_STATUS ioctl

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:33PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Add a new fscrypt ioctl, FS_IOC_GET_ENCRYPTION_KEY_STATUS. Given a key > specified by 'struct fscrypt_key_specifier' (the same way a key is > specified for the other fscrypt key management ioctls), it returns

[PATCH] crypto: caam - defer probing until QMan is available

2019-07-28 Thread Horia Geantă
When QI (Queue Interface) support is enabled on DPAA 1.x platforms, defer probing if dependencies (QMan drivers) are not available yet. Signed-off-by: Horia Geantă --- This patch was previously submitted as part of IOMMU support series: https://patchwork.kernel.org/cover/10928833/ Re-sending sin

Re: [PATCH v7 07/16] fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:32PM -0700, Eric Biggers wrote: > + fscrypt_warn(NULL, > + "%s: %zu inodes still busy after removing key with > description %*phN, including ino %lu (%s)", nit: s/inodes/inode(s)/ > + > +/* > + * Try to remove an fscrypt master encryption key.

Re: [PATCH v7 06/16] fscrypt: add FS_IOC_ADD_ENCRYPTION_KEY ioctl

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:31PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Add a new fscrypt ioctl, FS_IOC_ADD_ENCRYPTION_KEY. This ioctl adds an > encryption key to the filesystem's fscrypt keyring ->s_master_keys, > making any files encrypted with that key appear "unlocked". Note:

Re: [PATCH 0/4] crypto: add amlogic crypto offloader driver

2019-07-28 Thread Eric Biggers
Hi Corentin, On Thu, Jul 25, 2019 at 07:42:52PM +, Corentin Labbe wrote: > Hello > > This serie adds support for the crypto offloader present on amlogic GXL > SoCs. > > Tested on meson-gxl-s905x-khadas-vim and meson-gxl-s905x-libretech-cc > > Regards > Does this new driver pass all the cr

Re: [PATCH] crypto: testmgr - Improve randomization of params for AEAD fuzz testing

2019-07-28 Thread Eric Biggers
Hi Pascal, thanks for the patch! On Wed, Jul 24, 2019 at 11:35:17AM +0200, Pascal van Leeuwen wrote: > The probability of hitting specific input length corner cases relevant > for certain hardware driver(s) (specifically: inside-secure) was found > to be too low. Additionally, for authenc AEADs, t

Re: [PATCH v7 05/16] fscrypt: refactor v1 policy key setup into keysetup_legacy.c

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:30PM -0700, Eric Biggers wrote: > From: Eric Biggers > > In preparation for introducing v2 encryption policies which will find > and derive encryption keys differently from the current v1 encryption > policies, refactor the v1 policy-specific key setup code from keyi

[PATCH] hwrng: timeriomem - add include guard to timeriomem-rng.h

2019-07-28 Thread Masahiro Yamada
Add a header include guard just in case. Signed-off-by: Masahiro Yamada --- include/linux/timeriomem-rng.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/timeriomem-rng.h b/include/linux/timeriomem-rng.h index fd4a6e6ec831..672df7fbf6c1 100644 --- a/include/linux/timerio

Re: [PATCH v7 04/16] fscrypt: add ->ci_inode to fscrypt_info

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:29PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Add an inode back-pointer to 'struct fscrypt_info', such that > inode->i_crypt_info->ci_inode == inode. > > This will be useful for: > > 1. Evicting the inodes when a fscrypt key is removed, since we'll track

Re: [PATCH v7 01/16] fs, fscrypt: move uapi definitions to new header

2019-07-28 Thread Theodore Y. Ts'o
On Fri, Jul 26, 2019 at 03:41:26PM -0700, Eric Biggers wrote: > From: Eric Biggers > > More fscrypt definitions are being added, and we shouldn't use a > disproportionate amount of space in for fscrypt stuff. > So move the fscrypt definitions to a new header . > > For source compatibility with