From: "Chris Mason" <clm@fb.com>
To: Eric Biggers <ebiggers@kernel.org>, Boris Burkov <borisb@fb.com>
Cc: <linux-fscrypt@vger.kernel.org>
Subject: Re: max fsverity descriptor size?
Date: Wed, 02 Dec 2020 13:33:54 -0500 [thread overview]
Message-ID: <1618E915-F81F-4175-8830-6FFD7B3B9F6C@fb.com> (raw)
In-Reply-To: <X8fZI93Agr4f4Lwh@sol.localdomain>
On 2 Dec 2020, at 13:12, Eric Biggers wrote:
> +linux-fscrypt
>
> On Wed, Dec 02, 2020 at 09:01:52AM -0500, Chris Mason wrote:
>> Hi Eric,
>>
>> I’m working on fsverity support in btrfs and wanted to check on the
>> max size
>> of the descriptor. I can go up to any size, just wanted to make sure
>> I had
>> things correct in the disk format.
>>
>> -chris
>
> The implementations of fs-verity in ext4 and f2fs store the built-in
> signature
> (if there is one) appended to the 'struct fsverity_descriptor', and
> limit the
> total size of those two things combined to 16384 bytes. See
> FS_VERITY_MAX_DESCRIPTOR_SIZE in fs/verity/fsverity_private.h.
>
> Note that there's nothing special about this particular number; it's
> just an
> implementation limit to prevent userspace doing weird things with
> megabytes
> "signatures".
>
> If btrfs will be storing built-in signatures in the same way, it
> probably should
> use the same limit. Preferably it would be done in a way such that
> it's
> possible to increase the limit later if it's ever needed.
>
+Boris
Thanks Eric, the current btrfs code is just putting it in the btree, but
I’ve got it setup so we won’t run into trouble if it spans multiple
btree blocks.
Looks like the fs/verity/*.c are in charge of validating against the max
size? I’m not finding specific checks in ext4.
-chris
next prev parent reply other threads:[~2020-12-02 18:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7F52BBF2-46A8-4854-9B68-1DC3EFA12EF0@fb.com>
2020-12-02 18:12 ` max fsverity descriptor size? Eric Biggers
2020-12-02 18:33 ` Chris Mason [this message]
2020-12-02 18:44 ` Eric Biggers
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=1618E915-F81F-4175-8830-6FFD7B3B9F6C@fb.com \
--to=clm@fb.com \
--cc=borisb@fb.com \
--cc=ebiggers@kernel.org \
--cc=linux-fscrypt@vger.kernel.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