summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorZhan Xusheng <zhanxusheng@xiaomi.com>2026-10-12 14:20:39 +0800
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-12 20:57:37 +0900
commit9a9353ae046789bc7d04beb31d1e68ea68f1640d (patch)
tree23100f0b072f99a2c9968d6c810c0bbf2e9fbad4 /tools/lib/python
parent1b501957b056485e1a5301eb759d73f68c543d02 (diff)
downloadlinux-next-9a9353ae046789bc7d04beb31d1e68ea68f1640d.tar.gz
linux-next-9a9353ae046789bc7d04beb31d1e68ea68f1640d.zip
ntfs: do not read ahead encrypted files
ntfs_read_folio() refuses EFS-encrypted files with -EOPNOTSUPP because decryption is not implemented. ntfs_readahead() has no NInoEncrypted() test and passes them to iomap_readahead(), which maps the runlist and fills the folios with the raw on-disk ciphertext. The folios are marked uptodate, so the read that follows never reaches ->read_folio and returns ciphertext instead of -EOPNOTSUPP. ntfs_read_locked_inode() sets NInoEncrypted() and NInoNonResident() for a non-resident encrypted $DATA attribute and rejects the encrypted-and-compressed combination, so none of the three existing conditions fires. read(), mmap(), splice() and fadvise() all populate the page cache through readahead. Skipping readahead leaves the folio unpopulated, so the read falls back to ntfs_read_folio() and gets the intended error. Fixes: b041ca562526 ("ntfs: update iomap and address space operations") Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com> Reviewed-by: Baolin Liu <liubaolin@kylinos.cn> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions