ubifs: authentication: Add hashes to index nodes
authorSascha Hauer <s.hauer@pengutronix.de>
Fri, 7 Sep 2018 12:36:35 +0000 (14:36 +0200)
committerRichard Weinberger <richard@nod.at>
Tue, 23 Oct 2018 11:48:39 +0000 (13:48 +0200)
commit16a26b20d2afd0cf063816725b45b12e78d5bb31
tree3537a8eecd5da38204e443a887f4d1ed9f3cbcbe
parent823838a486888cf484e739ab37df14cb04dfddb5
ubifs: authentication: Add hashes to index nodes

With this patch the hashes over the index nodes stored in the tree node
cache are written to flash and are checked when read back from flash.
The hash of the root index node is stored in the master node.

During journal replay the hashes are regenerated from the read nodes
and stored in the tree node cache. This means the nodes must previously
be authenticated by other means. This is done in a later patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/master.c
fs/ubifs/misc.h
fs/ubifs/replay.c
fs/ubifs/tnc.c
fs/ubifs/tnc_commit.c
fs/ubifs/tnc_misc.c
fs/ubifs/ubifs.h