From: Eric Biggers <ebiggers@kernel.org>
To: Alberto Garcia <berto@igalia.com>
Cc: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>,
Baokun Li <libaokun@linux.alibaba.com>
Subject: Re: [PATCH v2] e2fsck: set the encrypt feature if the filesystem has encrypted inodes
Date: Mon, 16 Nov 2026 22:17:56 +0000 [thread overview]
Message-ID: <20261116221756.GF229817@google.com> (raw)
In-Reply-To: <20261116191853.GB229817@google.com>
On Mon, Nov 16, 2026 at 07:18:53PM +0000, Eric Biggers wrote:
> On Mon, Nov 16, 2026 at 03:28:11PM +0100, Alberto Garcia wrote:
> > A filesystem without the encrypt feature can still contain encrypted
> > inodes, either due to corruption or because the image was crafted that
> > way.
> >
> > e2fsck currently accepts such inodes without complaint. Since those
> > inodes can be decrypted, this should be fixed by setting the encrypt
> > feature on the filesystem.
> >
> > Note that the Linux kernel does not currently support encryption when
> > the block size is larger than the page size. After this change, such
> > a filesystem will be rejected at mount time (see the kernel commit
> > 709f0f1f1bf5, "ext4: add checks for large folio incompatibilities
> > when BS > PS"). However, since this depends on the page size of the
> > machine where the filesystem is mounted, and the kernel could lift
> > that limitation in the future, e2fsck does not take it into account.
> >
> > Fix this by adding a new problem (PR_1_ENCRYPT_FEATURE) and a
> > regression test.
> >
> > Signed-off-by: Alberto Garcia <berto@igalia.com>
>
> Reviewed-by: Eric Biggers <ebiggers@kernel.org>
>
As I mentioned on v1 though, it would be nice if the function comment of
add_encrypted_file() were to be updated to mention the new behavior.
- Eric
prev parent reply other threads:[~2026-11-16 22:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 14:28 [PATCH v2] e2fsck: set the encrypt feature if the filesystem has encrypted inodes Alberto Garcia
2026-11-16 19:18 ` Eric Biggers
2026-11-16 22:17 ` Eric Biggers [this message]
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=20261116221756.GF229817@google.com \
--to=ebiggers@kernel.org \
--cc=berto@igalia.com \
--cc=libaokun@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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