From: Hyunchul Lee <hyc.lee@gmail.com>
To: Zhan Xusheng <zhanxusheng1024@gmail.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>,
ntfs@lists.linux.dev, linux-kernel@vger.kernel.org,
Zhan Xusheng <zhanxusheng@xiaomi.com>
Subject: Re: [PATCH 0/2] ntfs: enforce the encrypted-file policy on the read paths
Date: Mon, 12 Oct 2026 19:01:01 +0900 [thread overview]
Message-ID: <asyv3dcrnMUlisTp@hyunchul-PC02> (raw)
In-Reply-To: <20261012062040.3826828-1-zhanxusheng@xiaomi.com>
This whole series look good to me.
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
On Mon, Oct 12, 2026 at 02:20:38PM +0800, Zhan Xusheng wrote:
> From: Zhan Xusheng <zhanxusheng@xiaomi.com>
>
> EFS-encrypted attributes are refused with -EOPNOTSUPP in exactly one
> place, ntfs_read_folio(), because decryption is not implemented. Two
> read paths get there without passing that test and return the raw
> on-disk ciphertext instead, so the same read returns either ciphertext
> or -EOPNOTSUPP depending on which path serves it.
>
> Patch 1 is readahead, which marks the folios uptodate so ->read_folio
> is never called. read(), mmap(), splice() and fadvise() all populate
> the page cache this way, so one test closes all four.
>
> Patch 2 is direct I/O, which bypasses the page cache entirely and has
> no such backstop.
>
> Both commits are in v7.1. I have not added Cc: stable; returning
> ciphertext rather than an error is a correctness bug but not a
> privilege boundary crossing, so that call is better made by the
> maintainers.
>
> Found by reading the code. I have no EFS-encrypted NTFS volume, so
> there is no reproducer; the paths were traced in the source.
>
> Zhan Xusheng (2):
> ntfs: do not read ahead encrypted files
> ntfs: reject direct I/O reads of encrypted files
>
> fs/ntfs/aops.c | 7 ++++---
> fs/ntfs/file.c | 4 ++--
> 2 files changed, 6 insertions(+), 5 deletions(-)
>
>
> base-commit: d6d3455d8751854e0d1820f14184682e23ac4475
> --
> 2.43.0
>
--
Thanks,
Hyunchul
next prev parent reply other threads:[~2026-10-12 10:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 6:20 Zhan Xusheng
2026-10-12 6:20 ` [PATCH 1/2] ntfs: do not read ahead encrypted files Zhan Xusheng
2026-10-12 8:49 ` liubaolin
2026-10-12 6:20 ` [PATCH 2/2] ntfs: reject direct I/O reads of " Zhan Xusheng
2026-10-12 8:49 ` liubaolin
2026-10-12 8:50 ` [PATCH 0/2] ntfs: enforce the encrypted-file policy on the read paths liubaolin
2026-10-12 10:01 ` Hyunchul Lee [this message]
2026-10-12 11:58 ` Namjae Jeon
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=asyv3dcrnMUlisTp@hyunchul-PC02 \
--to=hyc.lee@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs@lists.linux.dev \
--cc=zhanxusheng1024@gmail.com \
--cc=zhanxusheng@xiaomi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®