Linux FSCRYPT development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Chris Mason <clm@fb.com>
Cc: linux-fscrypt@vger.kernel.org
Subject: Re: max fsverity descriptor size?
Date: Wed, 2 Dec 2020 10:12:51 -0800	[thread overview]
Message-ID: <X8fZI93Agr4f4Lwh@sol.localdomain> (raw)
In-Reply-To: <7F52BBF2-46A8-4854-9B68-1DC3EFA12EF0@fb.com>

+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.

- Eric

       reply	other threads:[~2020-12-02 18:13 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 ` Eric Biggers [this message]
2020-12-02 18:33   ` max fsverity descriptor size? Chris Mason
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=X8fZI93Agr4f4Lwh@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=clm@fb.com \
    --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