All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add support for Encryption and Casefolding in F2FS
@ 2020-11-17  4:03 ` Daniel Rosenberg via Linux-f2fs-devel
  0 siblings, 0 replies; 49+ messages in thread
From: Daniel Rosenberg @ 2020-11-17  4:03 UTC (permalink / raw)
  To: Theodore Y . Ts'o, Jaegeuk Kim, Eric Biggers, Andreas Dilger,
	Chao Yu, Alexander Viro, Richard Weinberger, linux-fscrypt,
	linux-ext4, linux-f2fs-devel
  Cc: linux-kernel, linux-fsdevel, linux-mtd, Gabriel Krisman Bertazi,
	kernel-team, Daniel Rosenberg

These patches are on top of the torvalds tree.

F2FS currently supports casefolding and encryption, but not at
the same time. These patches aim to rectify that. In a later follow up,
this will be added for Ext4 as well. I've included one ext4 patch from
the previous set since it isn't in the f2fs branch, but is needed for the
fscrypt changes.

The f2fs-tools changes have already been applied.

Since both fscrypt and casefolding require their own dentry operations,
I've moved the responsibility of setting the dentry operations from fscrypt
to the filesystems and provided helper functions that should work for most
cases.

These are a follow-up to the previously sent patch set
"[PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches"

v2:
Simplified generic dentry_op function
Passed through errors in f2fs_match_ci_name

Daniel Rosenberg (3):
  libfs: Add generic function for setting dentry_ops
  fscrypt: Have filesystems handle their d_ops
  f2fs: Handle casefolding with Encryption

 fs/crypto/fname.c       |  4 --
 fs/crypto/hooks.c       |  1 -
 fs/ext4/dir.c           |  7 ---
 fs/ext4/ext4.h          |  4 --
 fs/ext4/namei.c         |  1 +
 fs/ext4/super.c         |  5 ---
 fs/f2fs/dir.c           | 96 +++++++++++++++++++++++++++++++----------
 fs/f2fs/f2fs.h          | 11 +++--
 fs/f2fs/hash.c          | 11 ++++-
 fs/f2fs/inline.c        |  4 ++
 fs/f2fs/namei.c         |  1 +
 fs/f2fs/recovery.c      | 12 +++++-
 fs/f2fs/super.c         |  7 ---
 fs/libfs.c              | 60 ++++++++++++++++++++++++++
 fs/ubifs/dir.c          |  1 +
 include/linux/fs.h      |  1 +
 include/linux/fscrypt.h |  5 ++-
 17 files changed, 170 insertions(+), 61 deletions(-)

-- 
2.29.2.299.gdc1121823c-goog


^ permalink raw reply	[flat|nested] 49+ messages in thread
* Re: [PATCH v2 3/3] f2fs: Handle casefolding with Encryption
@ 2020-11-17 12:55 kernel test robot
  0 siblings, 0 replies; 49+ messages in thread
From: kernel test robot @ 2020-11-17 12:55 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3487 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20201117040315.28548-4-drosen@google.com>
References: <20201117040315.28548-4-drosen@google.com>
TO: Daniel Rosenberg <drosen@google.com>

Hi Daniel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on f2fs/dev-test]
[also build test WARNING on ext4/dev linus/master v5.10-rc4 next-20201117]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Daniel-Rosenberg/Add-support-for-Encryption-and-Casefolding-in-F2FS/20201117-120753
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
compiler: aarch64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> fs/f2fs/dir.c:206:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
     dentry_page = ERR_CAST(res);
     ^
   fs/f2fs/f2fs.h:2200:15: warning: Local variable valid_node_count shadows outer function [shadowFunction]
    unsigned int valid_node_count, user_block_count;
                 ^
   fs/f2fs/f2fs.h:2296:28: note: Shadowed declaration
   static inline unsigned int valid_node_count(struct f2fs_sb_info *sbi)
                              ^
   fs/f2fs/f2fs.h:2200:15: note: Shadow variable
    unsigned int valid_node_count, user_block_count;
                 ^

vim +206 fs/f2fs/dir.c

6b4ea0160ae236a Jaegeuk Kim      2012-11-14  191  
2c2eb7a300cd7c6 Daniel Rosenberg 2019-07-23  192  static struct f2fs_dir_entry *find_in_block(struct inode *dir,
2c2eb7a300cd7c6 Daniel Rosenberg 2019-07-23  193  				struct page *dentry_page,
43c780ba26244e4 Eric Biggers     2020-05-07  194  				const struct f2fs_filename *fname,
17f930e0a649e15 Chao Yu          2020-09-26  195  				int *max_slots)
4e6ebf6d4935914 Jaegeuk Kim      2014-10-13  196  {
4e6ebf6d4935914 Jaegeuk Kim      2014-10-13  197  	struct f2fs_dentry_block *dentry_blk;
7b3cd7d6f026784 Jaegeuk Kim      2014-10-18  198  	struct f2fs_dentry_ptr d;
6f0a1d1d8d24e7e Daniel Rosenberg 2020-11-17  199  	struct f2fs_dir_entry *res;
4e6ebf6d4935914 Jaegeuk Kim      2014-10-13  200  
bdbc90fa55af632 Yunlong Song     2018-02-28  201  	dentry_blk = (struct f2fs_dentry_block *)page_address(dentry_page);
7b3cd7d6f026784 Jaegeuk Kim      2014-10-18  202  
2c2eb7a300cd7c6 Daniel Rosenberg 2019-07-23  203  	make_dentry_ptr_block(dir, &d, dentry_blk);
6f0a1d1d8d24e7e Daniel Rosenberg 2020-11-17  204  	res = f2fs_find_target_dentry(&d, fname, max_slots);
6f0a1d1d8d24e7e Daniel Rosenberg 2020-11-17  205  	if (IS_ERR(res)) {
6f0a1d1d8d24e7e Daniel Rosenberg 2020-11-17 @206  		dentry_page = ERR_CAST(res);
6f0a1d1d8d24e7e Daniel Rosenberg 2020-11-17  207  		res = NULL;
6f0a1d1d8d24e7e Daniel Rosenberg 2020-11-17  208  	}
6f0a1d1d8d24e7e Daniel Rosenberg 2020-11-17  209  	return res;
4e6ebf6d4935914 Jaegeuk Kim      2014-10-13  210  }
4e6ebf6d4935914 Jaegeuk Kim      2014-10-13  211  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2020-11-18  6:28 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-17  4:03 [PATCH v2 0/3] Add support for Encryption and Casefolding in F2FS Daniel Rosenberg
2020-11-17  4:03 ` Daniel Rosenberg
2020-11-17  4:03 ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-11-17  4:03 ` [PATCH v2 1/3] libfs: Add generic function for setting dentry_ops Daniel Rosenberg
2020-11-17  4:03   ` Daniel Rosenberg
2020-11-17  4:03   ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-11-17 17:33   ` Theodore Y. Ts'o
2020-11-17 17:33     ` Theodore Y. Ts'o
2020-11-17 17:33     ` [f2fs-dev] " Theodore Y. Ts'o
2020-11-17 18:16   ` Eric Biggers
2020-11-17 18:16     ` Eric Biggers
2020-11-17 18:16     ` [f2fs-dev] " Eric Biggers
2020-11-17 18:36     ` Eric Biggers
2020-11-17 18:36       ` Eric Biggers
2020-11-17 18:36       ` Eric Biggers
2020-11-17  4:03 ` [PATCH v2 2/3] fscrypt: Have filesystems handle their d_ops Daniel Rosenberg
2020-11-17  4:03   ` Daniel Rosenberg
2020-11-17  4:03   ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-11-17 14:03   ` Theodore Y. Ts'o
2020-11-17 14:03     ` Theodore Y. Ts'o
2020-11-17 14:03     ` [f2fs-dev] " Theodore Y. Ts'o
2020-11-17 17:04     ` Jaegeuk Kim
2020-11-17 17:04       ` Jaegeuk Kim
2020-11-17 17:04       ` [f2fs-dev] " Jaegeuk Kim
2020-11-17 17:34       ` Theodore Y. Ts'o
2020-11-17 17:34         ` Theodore Y. Ts'o
2020-11-17 17:34         ` [f2fs-dev] " Theodore Y. Ts'o
2020-11-17 18:31   ` Eric Biggers
2020-11-17 18:31     ` Eric Biggers
2020-11-17 18:31     ` [f2fs-dev] " Eric Biggers
2020-11-17  4:03 ` [PATCH v2 3/3] f2fs: Handle casefolding with Encryption Daniel Rosenberg
2020-11-17  4:03   ` Daniel Rosenberg
2020-11-17  4:03   ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-11-17 14:06   ` Dan Carpenter
2020-11-17 14:06     ` [kbuild] " Dan Carpenter
2020-11-17 18:50   ` Eric Biggers
2020-11-17 18:50     ` Eric Biggers
2020-11-17 18:50     ` [f2fs-dev] " Eric Biggers
2020-11-18  6:22     ` Daniel Rosenberg
2020-11-18  6:22       ` Daniel Rosenberg
2020-11-18  6:22       ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-11-18  6:27       ` Eric Biggers
2020-11-18  6:27         ` Eric Biggers
2020-11-18  6:27         ` [f2fs-dev] " Eric Biggers
2020-11-18  1:03   ` kernel test robot
2020-11-17 18:53 ` [PATCH v2 0/3] Add support for Encryption and Casefolding in F2FS Eric Biggers
2020-11-17 18:53   ` Eric Biggers
2020-11-17 18:53   ` [f2fs-dev] " Eric Biggers
  -- strict thread matches above, loose matches on Subject: below --
2020-11-17 12:55 [PATCH v2 3/3] f2fs: Handle casefolding with Encryption kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.