All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/6] fscrypt preparations for encryption+casefolding
@ 2020-01-20 22:31 ` Eric Biggers
  0 siblings, 0 replies; 36+ messages in thread
From: Eric Biggers @ 2020-01-20 22:31 UTC (permalink / raw)
  To: linux-fscrypt
  Cc: Daniel Rosenberg, kernel-team, linux-kernel, linux-f2fs-devel,
	linux-fsdevel, linux-ext4, Gabriel Krisman Bertazi, linux-mtd,
	Richard Weinberger

This is a cleaned up and fixed version of the fscrypt patches to prepare
for directories that are both encrypted and casefolded.

Patches 1-3 start deriving a SipHash key for the new dirhash method that
will be used by encrypted+casefolded directories.  To avoid unnecessary
overhead, we only do this if the directory is actually casefolded.

Patch 4 fixes a bug in UBIFS where it didn't gracefully handle invalid
hash values in fscrypt no-key names.  This is an existing bug, but the
new fscrypt no-key name format (patch 6) made it much easier to trigger;
it started being hit by 'kvm-xfstests -c ubifs -g encrypt'.

Patch 5 updates UBIFS to make it ready for the new fscrypt no-key name
format that always includes the dirhash.

Patch 6 modifies the fscrypt no-key names to always include the dirhash,
since with the new dirhash method the dirhash will no longer be
computable from the ciphertext filename without the key.  It also fixes
a longstanding issue where there could be collisions in the no-key
names, due to not using a proper cryptographic hash to abbreviate names.

For more information see the main patch series, which includes the
filesystem-specific changes:
https://lkml.kernel.org/linux-fscrypt/20200117214246.235591-1-drosen@google.com/T/#u

This applies to fscrypt.git#master.

Changed v4 => v5:
  - Fixed UBIFS encryption to work with the new no-key name format.

Daniel Rosenberg (3):
  fscrypt: don't allow v1 policies with casefolding
  fscrypt: derive dirhash key for casefolded directories
  fscrypt: improve format of no-key names

Eric Biggers (3):
  fscrypt: clarify what is meant by a per-file key
  ubifs: don't trigger assertion on invalid no-key filename
  ubifs: allow both hash and disk name to be provided in no-key names

 Documentation/filesystems/fscrypt.rst |  40 +++--
 fs/crypto/Kconfig                     |   1 +
 fs/crypto/fname.c                     | 239 ++++++++++++++++++++------
 fs/crypto/fscrypt_private.h           |  19 +-
 fs/crypto/hooks.c                     |  44 +++++
 fs/crypto/keysetup.c                  |  81 ++++++---
 fs/crypto/keysetup_v1.c               |   4 +-
 fs/crypto/policy.c                    |   7 +
 fs/inode.c                            |   3 +-
 fs/ubifs/dir.c                        |   6 +-
 fs/ubifs/journal.c                    |   4 +-
 fs/ubifs/key.h                        |   1 -
 include/linux/fscrypt.h               |  94 +++-------
 13 files changed, 365 insertions(+), 178 deletions(-)

-- 
2.25.0


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

end of thread, other threads:[~2020-01-24 20:14 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-20 22:31 [PATCH v5 0/6] fscrypt preparations for encryption+casefolding Eric Biggers
2020-01-20 22:31 ` Eric Biggers
2020-01-20 22:31 ` [f2fs-dev] " Eric Biggers
2020-01-20 22:31 ` [PATCH v5 1/6] fscrypt: don't allow v1 policies with casefolding Eric Biggers
2020-01-20 22:31   ` Eric Biggers
2020-01-20 22:31   ` [f2fs-dev] " Eric Biggers
2020-01-20 22:31 ` [PATCH v5 2/6] fscrypt: derive dirhash key for casefolded directories Eric Biggers
2020-01-20 22:31   ` Eric Biggers
2020-01-20 22:31   ` [f2fs-dev] " Eric Biggers
2020-01-20 22:31 ` [PATCH v5 3/6] fscrypt: clarify what is meant by a per-file key Eric Biggers
2020-01-20 22:31   ` Eric Biggers
2020-01-20 22:31   ` [f2fs-dev] " Eric Biggers
2020-01-22  1:16   ` Daniel Rosenberg
2020-01-22  1:16     ` Daniel Rosenberg
2020-01-22  1:16     ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel
2020-01-20 22:31 ` [PATCH v5 4/6] ubifs: don't trigger assertion on invalid no-key filename Eric Biggers
2020-01-20 22:31   ` Eric Biggers
2020-01-20 22:31   ` [f2fs-dev] " Eric Biggers
2020-01-22  0:30   ` Eric Biggers
2020-01-22  0:30     ` Eric Biggers
2020-01-22  0:30     ` [f2fs-dev] " Eric Biggers
2020-01-24 20:14     ` Eric Biggers
2020-01-24 20:14       ` Eric Biggers
2020-01-24 20:14       ` [f2fs-dev] " Eric Biggers
2020-01-20 22:32 ` [PATCH v5 5/6] ubifs: allow both hash and disk name to be provided in no-key names Eric Biggers
2020-01-20 22:32   ` Eric Biggers
2020-01-20 22:32   ` [f2fs-dev] " Eric Biggers
2020-01-20 22:32 ` [PATCH v5 6/6] fscrypt: improve format of " Eric Biggers
2020-01-20 22:32   ` Eric Biggers
2020-01-20 22:32   ` [f2fs-dev] " Eric Biggers
2020-01-22 23:06 ` [PATCH v5 0/6] fscrypt preparations for encryption+casefolding Eric Biggers
2020-01-22 23:06   ` Eric Biggers
2020-01-22 23:06   ` [f2fs-dev] " Eric Biggers
2020-01-23 21:35   ` Daniel Rosenberg
2020-01-23 21:35     ` Daniel Rosenberg
2020-01-23 21:35     ` [f2fs-dev] " Daniel Rosenberg via Linux-f2fs-devel

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.