From: Artem Bityutskiy <dedekind1@gmail.com>
To: Joel Reardon <joel@clambassador.com>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] UBIFS: compute KSA size and store in superblock
Date: Wed, 30 May 2012 18:18:41 +0300 [thread overview]
Message-ID: <1338391121.2536.94.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205301531220.6465@eristoteles.iwoars.net>
[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]
Hi,
On Wed, 2012-05-30 at 15:32 +0200, Joel Reardon wrote:
> @@ -389,6 +408,7 @@ static int validate_sb(struct ubifs_info *c, struct ubifs_sb_node *sup)
> */
> min_leb_cnt = UBIFS_SB_LEBS + UBIFS_MST_LEBS + c->log_lebs;
> min_leb_cnt += c->lpt_lebs + c->orph_lebs + c->jhead_cnt + 6;
> + min_leb_cnt += c->ksa_lebs;
You need to validate that:
1. if use_ubifsec is true, then ksa_lebs is not zero.
2. ksa_lebs is sane - not too small, not too large.
> diff --git a/fs/ubifs/ubifs-media.h b/fs/ubifs/ubifs-media.h
> index 90f348c..1dda25d 100644
> --- a/fs/ubifs/ubifs-media.h
> +++ b/fs/ubifs/ubifs-media.h
> @@ -618,10 +618,13 @@ struct ubifs_pad_node {
> * @rp_uid: reserve pool UID
> * @rp_gid: reserve pool GID
> * @rp_size: size of the reserved pool in bytes
> - * @padding2: reserved for future, zeroes
Do not remove this comment.
> * @time_gran: time granularity in nanoseconds
> * @uuid: UUID generated when the file system image was created
> * @ro_compat_version: UBIFS R/O compatibility version
> + * @crypto_lebs: number of LEBS being used to store keys
> + * @use_ubifsec: the LSB signifies whether the file system should use secure
> + * deletion
> + * @padding2: reserved for future, zeroes
> */
> struct ubifs_sb_node {
> struct ubifs_ch ch;
> @@ -649,7 +652,9 @@ struct ubifs_sb_node {
> __le32 time_gran;
> __u8 uuid[16];
> __le32 ro_compat_version;
> - __u8 padding2[3968];
> + __le32 ksa_lebs;
> + __u8 use_ubifsec;
> + __u8 padding2[3963];
> } __packed;
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-05-30 15:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 13:10 [PATCH] " Joel Reardon
2012-05-25 13:24 ` Artem Bityutskiy
2012-05-26 11:21 ` Joel Reardon
2012-05-26 13:31 ` Artem Bityutskiy
2012-05-30 13:32 ` [PATCH v2] " Joel Reardon
2012-05-30 15:18 ` Artem Bityutskiy [this message]
2012-05-31 10:12 ` Joel Reardon
2012-05-31 10:19 ` Artem Bityutskiy
2012-05-31 10:36 ` Artem Bityutskiy
2012-06-06 10:03 ` [PATCH v3] " Joel Reardon
2012-06-06 14:30 ` Artem Bityutskiy
2012-06-06 18:52 ` [PATCH v4] " Joel Reardon
2012-06-07 9:10 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338391121.2536.94.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=joel@clambassador.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome