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: <zcxdklyr2ugq7cfbed4olcsfcboy3nksxtpjs2g76bauvef5cq@4akbspw3ydiw>
Date: Thu, 31 Jul 2025 22:37:26 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Zhou Jifeng <zhoujifeng@...inos.com.cn>
Cc: Coly Li <colyli@...nel.org>, 
	linux-bcache <linux-bcache@...r.kernel.org>, linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bcache: enhancing the security of dirty data writeback

On Fri, Aug 01, 2025 at 10:27:21AM +0800, Zhou Jifeng wrote:
> In the writeback mode, the current bcache code uses the
> REQ_OP_WRITE operation to handle dirty data, and clears the bkey
> dirty flag in the btree during the bio completion callback. I think
> there might be a potential risk: if in the event of an unexpected
> power outage, the data in the HDD hardware cache may not have
> had time to be persisted, then the data in the HDD hardware cache
> that is pending processing may be lost. Since at this time the bkey
> dirty flag in the btree has been cleared, the data status recorded
> by the bkey does not match the actual situation of the SSD and
> HDD.
> Am I understanding this correctly?

For what you're describing, we need to make sure the backing device is
flushed when we're flushing the journal.

It's possible that this isn't handled correctly in bcache; bcachefs
does, and I wrote that code after bcache - but the bcache version would
look quite different.

You've read that code more recently than I have - have you checked for
that?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ