[f2fs-dev] [PATCH] f2fs: avoid cpu lockup

2017-07-14 Thread Jaegeuk Kim
Before retrying to flush data or dentry pages, we need to release cpu in order to prevent watchdog. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 56bbf592e487..c96913c5

Re: [f2fs-dev] [PATCH 4/6] fscrypt: verify that the correct master key was supplied

2017-07-14 Thread Eric Biggers
Hi Jeff, On Fri, Jul 14, 2017 at 01:34:48PM -0400, Jeffrey Walton wrote: > On Wed, Jul 12, 2017 at 5:00 PM, Eric Biggers wrote: > > From: Eric Biggers > > > > > > Solve the problem for v2 encryption policies by storing a "hash" of the > > master encryption key in the encryption xattr and ver

Re: [f2fs-dev] [PATCH 4/6] fscrypt: verify that the correct master key was supplied

2017-07-14 Thread Jeffrey Walton
On Wed, Jul 12, 2017 at 5:00 PM, Eric Biggers wrote: > From: Eric Biggers > > > Solve the problem for v2 encryption policies by storing a "hash" of the > master encryption key in the encryption xattr and verifying it before > accepting the user-provided key. > ... Forgive my ignorance... Doe

Re: [f2fs-dev] [PATCH 3/6] fscrypt: use HKDF-SHA512 to derive the per-inode encryption keys

2017-07-14 Thread Michael Halcrow via Linux-f2fs-devel
On Fri, Jul 14, 2017 at 09:24:40AM -0700, Michael Halcrow wrote: > On Wed, Jul 12, 2017 at 02:00:32PM -0700, Eric Biggers wrote: > > From: Eric Biggers > > > > By design, the keys which userspace provides in the keyring are not used > > to encrypt data directly. Instead, a KDF (Key Derivation Fu

Re: [f2fs-dev] [PATCH 4/6] fscrypt: verify that the correct master key was supplied

2017-07-14 Thread Michael Halcrow via Linux-f2fs-devel
On Wed, Jul 12, 2017 at 02:00:33PM -0700, Eric Biggers wrote: > From: Eric Biggers > > Currently, while a fscrypt master key is required to have a certain > description in the keyring, its payload is never verified to be correct. > While sufficient for well-behaved userspace, this is insecure in

Re: [f2fs-dev] [PATCH 3/6] fscrypt: use HKDF-SHA512 to derive the per-inode encryption keys

2017-07-14 Thread Michael Halcrow via Linux-f2fs-devel
On Wed, Jul 12, 2017 at 02:00:32PM -0700, Eric Biggers wrote: > From: Eric Biggers > > By design, the keys which userspace provides in the keyring are not used > to encrypt data directly. Instead, a KDF (Key Derivation Function) is > used to derive a unique encryption key for each inode, given a

Re: [f2fs-dev] [PATCH 3/6] fscrypt: use HKDF-SHA512 to derive the per-inode encryption keys

2017-07-14 Thread Stephan Müller
Am Donnerstag, 13. Juli 2017, 20:10:57 CEST schrieb Eric Biggers: Hi Eric, > Hi Stephan, > > On Thu, Jul 13, 2017 at 04:54:55PM +0200, Stephan Müller wrote: > > Am Mittwoch, 12. Juli 2017, 23:00:32 CEST schrieb Eric Biggers: > > > > Hi Herbert, > > > > This patch adds a second KDF to the kerne

Re: [f2fs-dev] [PATCH 2/6] fscrypt: rename ->ci_master_key to ->ci_master_key_descriptor

2017-07-14 Thread Michael Halcrow via Linux-f2fs-devel
On Wed, Jul 12, 2017 at 02:00:31PM -0700, Eric Biggers wrote: > From: Eric Biggers > > In struct fscrypt_info, ->ci_master_key is the master key descriptor, > not the master key itself. In preparation for introducing a struct > fscrypt_master_key and making ->ci_master_key point to it, rename th

[f2fs-dev] [PATCH] f2fs: let __get_victim successfully get a segno in corner case

2017-07-14 Thread Yunlong Song
Suppose that the valid blocks of each section are all over sbi->fggc_threshold, and even has_not_enough_free_secs is true, f2fs_gc cannot do its job since the no_fggc_candidate always returns true. As a result, the reserved segments can be used up, and finally there is no free segment at all, and g