From: Jane Chu <jane.chu@oracle.com>
To: Yang Shi <shy828301@gmail.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
Borislav Petkov <bp@alien8.de>,
"djwong@kernel.org" <djwong@kernel.org>,
"x86@kernel.org" <x86@kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: Is it possible to corrupt disk when writeback page with undetected UE?
Date: Fri, 16 Sep 2022 00:51:47 +0000 [thread overview]
Message-ID: <9c5f2012-ac88-7e35-ca08-ca94483da840@oracle.com> (raw)
In-Reply-To: <CAHbLzkrNnp5SsMUJykK5M_sy+C1+smm1CgYvaboO86FfLbZOnA@mail.gmail.com>
On 9/15/2022 5:30 PM, Yang Shi wrote:
> On Thu, Sep 15, 2022 at 5:27 PM Jane Chu <jane.chu@oracle.com> wrote:
>>
>> On 9/15/2022 3:50 PM, Luck, Tony wrote:
>>>> Suppose there is a UE in a DRAM page that is backed by a disk file.
>>>> The UE hasn't been reported to the kernel, but low level firmware
>>>> initiated scrubbing has already logged the UE.
>>>>
>>>> The page is then dirtied by a write, although the write clearly failed,
>>>> it didn't trigger an MCE.
>>>>
>>>> And without a subsequent read from the page, at some point, the page is
>>>> written back to the disk, leaving a PAGE_SIZE of zeros in the targeted
>>>> disk blocks.
>>>>
>>>> Is this mode of disk corruption possible?
>>>
>>> I didn't look at what was written to disk, but I have seen this. My test sequence
>>> was to compile and then immediately run an error injection test program that
>>> injected a memory UC error to an instruction.
>>>
>>> Because the program was freshly compiled, the executable file was in the
>>> page cache with all pages marked as modified. Later a sync (or memory
>>> pressure) wrote the dirty page with poison to filesystem.
>>>
>>> I did see an error reported by the disk controller.
>>
>> Thanks a lot for this information!
>>
>> Were you using madvise to inject an error to a mmap'ed address?
>> or a different tool? Do you still have the test documented
>> somewhere?
>>
>> And, aside from verifying every write with a read prior to sync,
>> any suggestion to minimize the window of such corruption?
>
> We discussed the topic at this year's LSFMM summit. Please refer to
> https://lwn.net/Articles/893565/
Thanks! I'll take a look.
-jane
>
>>
>> thanks!
>> -jane
>>
>>>
>>> -Tony
>>
next prev parent reply other threads:[~2022-09-16 0:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 22:36 Jane Chu
2022-09-15 22:50 ` Luck, Tony
2022-09-16 0:26 ` Jane Chu
2022-09-16 0:30 ` Yang Shi
2022-09-16 0:51 ` Jane Chu [this message]
2022-09-16 16:17 ` Luck, Tony
2022-09-16 19:26 ` Jane Chu
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=9c5f2012-ac88-7e35-ca08-ca94483da840@oracle.com \
--to=jane.chu@oracle.com \
--cc=bp@alien8.de \
--cc=djwong@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shy828301@gmail.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/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