diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-09-07 14:36:34 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-10-23 13:48:39 +0200 |
commit | 823838a486888cf484e739ab37df14cb04dfddb5 (patch) | |
tree | f9ea86215e41e177e14e31c8a8281734a2811f15 /fs/ubifs/replay.c | |
parent | a384b47e4954a0f834749fcbe1c096c40ff5eb35 (diff) | |
download | linux-823838a486888cf484e739ab37df14cb04dfddb5.tar.gz linux-823838a486888cf484e739ab37df14cb04dfddb5.tar.bz2 linux-823838a486888cf484e739ab37df14cb04dfddb5.zip |
ubifs: Add hashes to the tree node cache
As part of the UBIFS authentication support every branch in the index
gets a hash covering the referenced node. To make that happen the tree
node cache needs hashes over the nodes. This patch adds a hash argument
to ubifs_tnc_add() and ubifs_tnc_add_nm(). The hashes are calculated
from the callers of these functions which actually prepare the nodes.
With this patch all the leaf nodes of the index tree get hashes, but
currently nothing is done with these hashes, this is left for a later
patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/replay.c')
-rw-r--r-- | fs/ubifs/replay.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index 4844538eb926..bccb35f72277 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c @@ -228,7 +228,7 @@ static int apply_replay_entry(struct ubifs_info *c, struct replay_entry *r) err = ubifs_tnc_remove_nm(c, &r->key, &r->nm); else err = ubifs_tnc_add_nm(c, &r->key, r->lnum, r->offs, - r->len, &r->nm); + r->len, NULL, &r->nm); } else { if (r->deletion) switch (key_type(c, &r->key)) { @@ -248,7 +248,7 @@ static int apply_replay_entry(struct ubifs_info *c, struct replay_entry *r) } else err = ubifs_tnc_add(c, &r->key, r->lnum, r->offs, - r->len); + r->len, NULL); if (err) return err; |