OSDN Git Service

ubifs: allow both hash and disk name to be provided in no-key names
authorEric Biggers <ebiggers@google.com>
Mon, 20 Jan 2020 22:32:00 +0000 (14:32 -0800)
committerEric Biggers <ebiggers@google.com>
Wed, 22 Jan 2020 22:49:56 +0000 (14:49 -0800)
commitaec992aab890b2dece2c5c95dbd6953aeecd45cb
treee4886bc5a4b5d1e8f653455f866017ac0d0f637a
parentf0d07a98a070bb5e443df19c3aa55693cbca9341
ubifs: allow both hash and disk name to be provided in no-key names

In order to support a new dirhash method that is a secret-keyed hash
over the plaintext filenames (which will be used by encrypted+casefolded
directories on ext4 and f2fs), fscrypt will be switching to a new no-key
name format that always encodes the dirhash in the name.

UBIFS isn't happy with this because it has assertions that verify that
either the hash or the disk name is provided, not both.

Change it to use the disk name if one is provided, even if a hash is
available too; else use the hash.

Link: https://lore.kernel.org/r/20200120223201.241390-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/ubifs/dir.c
fs/ubifs/journal.c
fs/ubifs/key.h