All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Martins <loemra.dev@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] btrfs-progs: check: recognize verity item keys in original mode
Date: Tue, 24 Mar 2026 16:05:16 -0700	[thread overview]
Message-ID: <20260324230519.57167-1-loemra.dev@gmail.com> (raw)
In-Reply-To: <298ed1b9-72e3-45ac-9d3c-41cb3cf50029@gmx.com>

On Wed, 25 Mar 2026 09:19:00 +1030 Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:

> 
> 
> 在 2026/3/25 05:22, Leo Martins 写道:
> > Commit 4e88bb6e ("btrfs-progs: enhance detection on unknown inode keys")
> > added stricter validation for inode keys in the original mode checker,
> > flagging unknown key types as errors. However, it did not add cases for
> > BTRFS_VERITY_DESC_ITEM_KEY (36) and BTRFS_VERITY_MERKLE_ITEM_KEY (37),
> > causing any filesystem with fs-verity enabled files to fail the check
> > with:
> > 
> >    ERROR: unknown key (257 36 0) found in leaf 30621696
> > 
> > Add the missing switch cases so that verity metadata items are
> > recognized and silently skipped during the check, matching the behavior
> > of lowmem mode which already handles them.
> 
> Unfortunately I noticed that, lowmem mode doesn't have such handling either.
> 
> As I created a test case with verity items, and CI failed due to false 
> alerts from CI.
> 
> I'll send out a small fix for the lowmem mode, along with the test case.
> 
> Thanks,
> Qu

Good catch, not sure how I missed that, thanks!

> 
> > 
> > Signed-off-by: Leo Martins <loemra.dev@gmail.com>
> > ---
> >   check/main.c | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/check/main.c b/check/main.c
> > index c96969fd..4fdd8867 100644
> > --- a/check/main.c
> > +++ b/check/main.c
> > @@ -1895,6 +1895,9 @@ static int process_one_leaf(struct btrfs_root *root, struct extent_buffer *eb,
> >   		case BTRFS_XATTR_ITEM_KEY:
> >   			ret = process_xattr_item(eb, i, &key, active_node);
> >   			break;
> > +		case BTRFS_VERITY_DESC_ITEM_KEY:
> > +		case BTRFS_VERITY_MERKLE_ITEM_KEY:
> > +			break;
> >   		default:
> >   			error("unknown key (%llu %u %llu) found in leaf %llu",
> >   			      key.objectid, key.type, key.offset, eb->start);

  reply	other threads:[~2026-03-24 23:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 18:52 [PATCH] btrfs-progs: check: recognize verity item keys in original mode Leo Martins
2026-03-24 21:05 ` Qu Wenruo
2026-03-24 22:49 ` Qu Wenruo
2026-03-24 23:05   ` Leo Martins [this message]
2026-03-24 22:49 ` Qu Wenruo

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=20260324230519.57167-1-loemra.dev@gmail.com \
    --to=loemra.dev@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.