An error occurred while fetching folder content.
ext4: only allow test_dummy_encryption when supported
Eric Biggers authored
commit 5f41fdae

 upstream.

Make the test_dummy_encryption mount option require that the encrypt
feature flag be already enabled on the filesystem, rather than
automatically enabling it.  Practically, this means that "-O encrypt"
will need to be included in MKFS_OPTIONS when running xfstests with the
test_dummy_encryption mount option.  (ext4/053 also needs an update.)

Moreover, as long as the preconditions for test_dummy_encryption are
being tightened anyway, take the opportunity to start rejecting it when
!CONFIG_FS_ENCRYPTION rather than ignoring it.

The motivation for requiring the encrypt feature flag is that:

- Having the filesystem auto-enable feature flags is problematic, as it
  bypasses the usual sanity checks.  The specific issue which came up
  recently is that in kernel versions where ext4 supports casefold but
  not encrypt+casefold (v5.1 through v5.10), the kernel will happily add
  the encrypt flag to a filesystem that has the casefold flag, making it
  unmountable -- but only for subsequent mounts, not the initial one.
  This confused the casefold support detection in xfstests, causing
  generic/556 to fail rather than be skipped.

- The xfstests-bld test runners (kvm-xfstests et al.) already use the
  required mkfs flag, so they will not be affected by this change.  Only
  users of test_dummy_encryption alone will be affected.  But, this
  option has always been for testing only, so it should be fine to
  require that the few users of this option update their test scripts.

- f2fs already requires it (for its equivalent feature flag).
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Reviewed-by: default avatarGabriel Krisman Bertazi <krisman@collabora.com>
Link: https://lore.kernel.org/r/20220519204437.61645-1-ebiggers@kernel.org

Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
a67100f4
Name Last commit Last update
..
9p 9p: only copy valid iattrs in 9P2000.L setattr implementation
adfs Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
affs fs/affs: release old buffer head on error path
afs rxrpc, afs: Fix selection of abort codes
autofs autofs: harden ioctl table
befs [PATCH] reduce boilerplate in fsid handling
bfs bfs: don't use WARNING: string when it's just info.
btrfs btrfs: repair super block num_devices automatically
cachefiles fs/cachefiles: Remove wait_bit_key layout dependency
ceph ceph: fix setting of xattrs on async created inodes
cifs SMB3: EBADF/EIO errors in rename/open caused by race condition in smb2_compound_op
coda docs: filesystems: convert coda.txt to ReST
configfs configfs: fix a race in configfs_{,un}register_subsystem()
cramfs [PATCH] reduce boilerplate in fsid handling
crypto fscrypt: allow 256-bit master keys with AES-256-XTS
debugfs debugfs: lockdown: Allow reading debugfs files that are not world readable
devpts fsnotify: fix fsnotify hooks in pseudo filesystems
dlm dlm: fix missing lkb refcount handling
ecryptfs Revert "ecryptfs: replace BUG_ON with error handling code"
efivarfs efivarfs: revert "fix memory leak in efivarfs_create()"
efs [PATCH] reduce boilerplate in fsid handling
erofs erofs: fix deadlock when shrink erofs slab
exfat exfat: check if cluster num is valid
exportfs exportfs_decode_fh(): negative pinned may become positive without the parent locked
ext2 ext2: correct max file size computing
ext4
f2fs
fat
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hugetlbfs
iomap
isofs
jbd2
jffs2
jfs
kernfs
lockd
minix
nfs
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2
omfs
openpromfs
orangefs
overlayfs
proc
pstore
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs
ubifs
udf
ufs
unicode
vboxsf
verity
xfs
zonefs
Kconfig
Kconfig.binfmt
Makefile
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c
buffer.c
char_dev.c
compat_binfmt_elf.c
coredump.c
d_path.c
dax.c
dcache.c
dcookies.c