Skip to contentSkip to conversation

linux-next: manual merge of the vfs tree with the ext4 tree

DISCUSSION Stephen Rothwell 3 participants 6 messages Apr 7, 2015 – Apr 14, 2015 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/ext4/inode.c between commit 72b8e0f9fa8a ("ext4: remove unused header files") from the ext4 tree and commit e2e40f2c1ed4 ("fs: move struct kiocb to fs.h") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 38 lines
Cheers,
Stephen Rothwell                    [email protected]

diff --cc fs/ext4/inode.c
index 7eb70b7a5c19,42c942a950e1..000000000000
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@@ -35,12 -36,10 +35,11 @@@
  #include <linux/kernel.h>
  #include <linux/printk.h>
  #include <linux/slab.h>
- #include <linux/aio.h>
 -#include <linux/ratelimit.h>
  #include <linux/bitops.h>
 +#include <linux/prefetch.h>
  
  #include "ext4_jbd2.h"
 +#include "ext4_crypto.h"
  #include "xattr.h"
  #include "acl.h"
  #include "truncate.h"
@@@ -3136,14 -3033,11 +3135,14 @@@ static ssize_t ext4_ext_direct_IO(struc
  		get_block_func = ext4_get_block_write;
  		dio_flags = DIO_LOCKING;
  	}
 +#ifdef CONFIG_EXT4_FS_ENCRYPTION
 +	BUG_ON(ext4_encrypted_inode(inode) && S_ISREG(inode->i_mode));
 +#endif
  	if (IS_DAX(inode))
- 		ret = dax_do_io(rw, iocb, inode, iter, offset, get_block_func,
+ 		ret = dax_do_io(iocb, inode, iter, offset, get_block_func,
  				ext4_end_io_dio, dio_flags);
  	else
- 		ret = __blockdev_direct_IO(rw, iocb, inode,
+ 		ret = __blockdev_direct_IO(iocb, inode,
  					   inode->i_sb->s_bdev, iter, offset,
  					   get_block_func,
  					   ext4_end_io_dio, NULL, dio_flags);
#1 lore raw
Quoted 3 lines · Stephen Rothwell

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/ext4/inode.c between commit 72b8e0f9fa8a ("ext4: remove unused header files") from the ext4 tree and commit e2e40f2c1ed4 ("fs: move struct kiocb to fs.h") from the vfs tree.

FYI, the ext4 tree seems to have the crypto support, which I don't think is ready for 4.1 with all the implications of it..

#2 lore raw

Hi Christoph,

Quoted 8 lines · On Tue, 7 Apr 2015 09:02:14 +0200 Christoph Hellwig <[email protected]> wrote:
Quoted 3 lines · Stephen Rothwell

Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/ext4/inode.c between commit 72b8e0f9fa8a ("ext4: remove unused header files") from the ext4 tree and commit e2e40f2c1ed4 ("fs: move struct kiocb to fs.h") from the vfs tree.

FYI, the ext4 tree seems to have the crypto support, which I don't think is ready for 4.1 with all the implications of it..

Actually I was going to ping Ted about that ...

Ted,

A few of the files added by the ext4 crypto support do not have copyright notices or license acknowledgements ... and there was one place I noticed that has just a template for function documentation that is not very useful. I didn't look further, but was wondering if it had leaked out ...

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#3 lore raw
In reply to Christoph Hellwig
Quoted 2 lines · Christoph Hellwig

FYI, the ext4 tree seems to have the crypto support, which I don't think is ready for 4.1 with all the implications of it..

What sort of implications are you concerned about? We're no longer exposing anything via the xattr interface, and all of the changes are not contained strictly within the ext4 tree.

There are still are some cleanups which I'm still in the process of applying, but I considered it more likely than not something that was ready for 4.1, so that's why I let it go into the ext4 dev branch for testing in linux-next.

Cheers,

- Ted

#4 lore raw
Quoted 4 lines · Theodore Ts'o
Quoted 2 lines · Christoph Hellwig

FYI, the ext4 tree seems to have the crypto support, which I don't think is ready for 4.1 with all the implications of it..

Quoted 8 lines

What sort of implications are you concerned about? We're no longer exposing anything via the xattr interface, and all of the changes are not contained strictly within the ext4 tree.

There are still are some cleanups which I'm still in the process of applying, but I considered it more likely than not something that was ready for 4.1, so that's why I let it go into the ext4 dev branch for testing in linux-next.

A far as I can tell the patches were just posted last week, and it's still under very active review. Also for something that while only implemented in one filesystem has pretty broad API implications I'd really expect a generalist VFS review (I plan to get to it ASAP..).

#5 lore raw
Quoted 3 lines · Christoph Hellwig

Also for something that while only
implemented in one filesystem has pretty broad API implications I'd really expect a generalist VFS review (I plan to get to it ASAP..).

There really isn't much of an API. We have an ioctl to set the encryption policy (which currently is only which encryption key and the encryption modes to be used) on an empty directory, an ioctl to fetch the encryption policy, and an ioctl to get a per-file system password salt[1] (to protect against rainbow tables).

We *know* that the API will be need to be extended to support more complicated encryption policies (i.e., the use of public key, files that can be read by possessors of more than one key, etc.), but we also know we're not smart enough to figure out what that API will look like right now. So that is something that will have to be extended later, almost certainly with a new ioctl.

So I've designed the existing interface to be things that can be easily supported into the future, and if the existing interfaces are only supported by ext4, and someone else wants to design a new system call, and argue about x509 vs GPG certificates for the future use of public key crypto, that's fine. I just don't want the patches to be delayed while the interface bikeshedding party is going on. :-)

- Ted

[1] Note that the use of the password salt, and the string-to-key algorithm specified by NIST SP800-132, is purely optional. It's what the e4crypt userspace tool happens to use, but if you want to use your own string-to-key algorithm, or just use bare AES keys, a userspace tool can always do that.