lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd8ffd86-841d-4b1e-9067-c5f0bc3d9244@kernel.org>
Date: Thu, 14 Mar 2024 18:39:59 +0800
From: Chao Yu <chao@...nel.org>
To: Sunmin Jeong <s_min.jeong@...sung.com>, jaegeuk@...nel.org,
 daehojeong@...gle.com
Cc: linux-f2fs-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
 stable@...r.kernel.org, Sungjong Seo <sj1557.seo@...sung.com>,
 Yeongjin Gil <youngjin.gil@...sung.com>
Subject: Re: [PATCH 2/2] f2fs: truncate page cache before clearing flags when
 aborting atomic write

On 2024/3/13 19:26, Sunmin Jeong wrote:
> In f2fs_do_write_data_page, FI_ATOMIC_FILE flag selects the target inode
> between the original inode and COW inode. When aborting atomic write and
> writeback occur simultaneously, invalid data can be written to original
> inode if the FI_ATOMIC_FILE flag is cleared meanwhile.
> 
> To prevent the problem, let's truncate all pages before clearing the flag
> 
> Atomic write thread              Writeback thread
>    f2fs_abort_atomic_write
>      clear_inode_flag(inode, FI_ATOMIC_FILE)
>                                    __writeback_single_inode
>                                      do_writepages
>                                        f2fs_do_write_data_page
>                                          - use dn of original inode
>      truncate_inode_pages_final
> 
> Fixes: 3db1de0e582c ("f2fs: change the current atomic write way")
> Cc: stable@...r.kernel.org #v5.19+
> Reviewed-by: Sungjong Seo <sj1557.seo@...sung.com>
> Reviewed-by: Yeongjin Gil <youngjin.gil@...sung.com>
> Signed-off-by: Sunmin Jeong <s_min.jeong@...sung.com>

Reviewed-by: Chao Yu <chao@...nel.org>

Thanks,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ