From: sashiko-bot@kernel.org
To: "Baokun Li" <libaokun@linux.alibaba.com>, linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: Re: [PATCH v2] ext4: skip eof zeroing when the zero range covers the eof block
Date: Thu, 22 Oct 2026 12:48:15 +0000 [thread overview]
Message-ID: <sashiko-outbox-181503@kernel.org> (raw)
In-Reply-To: <20261022122625.1744363-1-libaokun@linux.alibaba.com>
> ext4_zero_range() drops the page cache of the range before allocating,
> to avoid exposing stale cached data. However, the dropped page can be
> read back by the eof zeroing:
>
> fallocate(fd, FALLOC_FL_ZERO_RANGE, 0, 4096)
> ext4_zero_range()
> ext4_truncate_page_cache_block_range(0, 4096)
> truncate_pagecache_range(0, 4095)
> truncate_inode_pages_range()
> delete_from_page_cache_batch() # drops the page
> ext4_alloc_file_blocks(..., 4096)
> ext4_block_zero_eof(512, LLONG_MAX) # not block aligned
> ext4_load_tail_bh()
> __filemap_get_folio(FGP_WRITEBEGIN | FGP_ACCESSED)
> # FGP_CREAT reads the dropped page back
> [ ... ]
>
> Fixes: c4602a1d09ec ("ext4: move zero partial block range functions out of active handle")
> Fixes: f4265b8d32c4 ("ext4: add FALLOC_FL_WRITE_ZEROES support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Baokun Li <libaokun@linux.alibaba.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261022122625.1744363-1-libaokun@linux.alibaba.com?part=1
next prev parent reply other threads:[~2026-10-22 12:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 6:53 [PATCH] ext4: skip eof zeroing when the zero range covers the eof block Baokun Li
2026-10-22 7:16 ` sashiko-bot
2026-10-22 9:56 ` Baokun Li
2026-10-22 12:26 ` [PATCH v2] " Baokun Li
2026-10-22 12:48 ` sashiko-bot [this message]
2026-10-23 9:23 ` Zhang Yi
2026-10-23 14:44 ` Baokun Li
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=sashiko-outbox-181503@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=libaokun@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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