linux/fs/ubifs
Sascha Hauer 1e76592f2c ubifs: Do not update inode size in-place in authenticated mode
In authenticated mode we cannot fixup the inode sizes in-place
during recovery as this would invalidate the hashes and HMACs
we stored for this inode.

Instead, we just write the updated inodes to the journal. We can
only do this after ubifs_rcvry_gc_commit() is done though, so for
authenticated mode call ubifs_recover_size() after
ubifs_rcvry_gc_commit() and not vice versa as normally done.

Calling ubifs_recover_size() after ubifs_rcvry_gc_commit() has the
drawback that after a commit the size fixup information is gone, so
when a powercut happens while recovering from another powercut
we may lose some data written right before the first powercut.
This is why we only do this in authenticated mode and leave the
behaviour for unauthenticated mode untouched.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
2018-10-23 13:48:57 +02:00
..
auth.c ubifs: Add helper functions for authentication support 2018-10-23 13:48:33 +02:00
budget.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
commit.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
compress.c UBIFS: extend debug/message capabilities 2015-03-25 11:08:41 +02:00
crypto.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
debug.c ubifs: Format changes for authentication support 2018-10-23 13:48:29 +02:00
debug.h ubifs: Rework ubifs_assert() 2018-08-15 00:25:21 +02:00
dir.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
file.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
find.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
gc.c ubifs: Add auth nodes to garbage collector journal head 2018-10-23 13:48:40 +02:00
io.c ubifs: Create functions to embed a HMAC in a node 2018-10-23 13:48:37 +02:00
ioctl.c fs, fscrypt: add an S_ENCRYPTED inode flag 2017-10-18 19:52:36 -04:00
journal.c ubifs: Add authentication nodes to journal 2018-10-23 13:48:39 +02:00
Kconfig ubifs: Add helper functions for authentication support 2018-10-23 13:48:33 +02:00
key.h ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
log.c ubifs: Add authentication nodes to journal 2018-10-23 13:48:39 +02:00
lprops.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
lpt_commit.c ubifs: authentication: Authenticate LPT 2018-10-23 13:48:47 +02:00
lpt.c ubifs: Create hash for default LPT 2018-10-23 13:48:56 +02:00
Makefile ubifs: Add helper functions for authentication support 2018-10-23 13:48:33 +02:00
master.c ubfis: authentication: Authenticate master node 2018-10-23 13:48:52 +02:00
misc.c ubifs: Allow setting assert action as mount parameter 2018-08-15 00:25:21 +02:00
misc.h ubifs: authentication: Add hashes to index nodes 2018-10-23 13:48:39 +02:00
orphan.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
recovery.c ubifs: Do not update inode size in-place in authenticated mode 2018-10-23 13:48:57 +02:00
replay.c ubifs: Authenticate replayed journal 2018-10-23 13:48:40 +02:00
sb.c ubifs: Add hashes and HMACs to default filesystem 2018-10-23 13:48:57 +02:00
scan.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
shrinker.c ubifs: Pass struct ubifs_info to ubifs_assert() 2018-08-15 00:25:21 +02:00
super.c ubifs: Do not update inode size in-place in authenticated mode 2018-10-23 13:48:57 +02:00
tnc_commit.c ubifs: authentication: Add hashes to index nodes 2018-10-23 13:48:39 +02:00
tnc_misc.c ubifs: authentication: Add hashes to index nodes 2018-10-23 13:48:39 +02:00
tnc.c ubifs: authentication: Add hashes to index nodes 2018-10-23 13:48:39 +02:00
ubifs-media.h ubifs: Format changes for authentication support 2018-10-23 13:48:29 +02:00
ubifs.h ubifs: Do not update inode size in-place in authenticated mode 2018-10-23 13:48:57 +02:00
xattr.c Revert "ubifs: xattr: Don't operate on deleted inodes" 2018-09-20 21:37:41 +02:00