From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 102DEC433EF for ; Thu, 14 Oct 2021 06:54:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 73106610F9 for ; Thu, 14 Oct 2021 06:54:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 73106610F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 06ED26B009D; Thu, 14 Oct 2021 02:54:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 01E8B6B009E; Thu, 14 Oct 2021 02:54:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E500D940009; Thu, 14 Oct 2021 02:54:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id D3C506B009D for ; Thu, 14 Oct 2021 02:54:21 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 974D331E5A for ; Thu, 14 Oct 2021 06:54:21 +0000 (UTC) X-FDA: 78694129122.03.5213C1A Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf10.hostedemail.com (Postfix) with ESMTP id 80AEE600198A for ; Thu, 14 Oct 2021 06:54:19 +0000 (UTC) Date: Thu, 14 Oct 2021 15:54:08 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1634194458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CVDe8En+IZWhjai+cfsatfH8CtNAmmtQm4RPgAbLMdA=; b=IlxAqI/go2rYK5DkhGiWSlIrOhDOHjgjOs4NkrfBKSuw8wVrC7pt5uvK8BkQylJI93zYmw 1/pPXJYAC+cDX1p5b6A0H+MtXolrHK8hDL9o6jFjck1DI2meNkYwVlTmpbnWov7Zd1o9dr b/y9N2DWB/PsjlhgeRvo8f5uX4H9tLQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Naoya Horiguchi To: Yang Shi Cc: Peter Xu , HORIGUCHI =?utf-8?B?TkFPWUEo5aCA5Y+jIOebtOS5nyk=?= , Hugh Dickins , "Kirill A. Shutemov" , Matthew Wilcox , Oscar Salvador , Andrew Morton , Linux MM , Linux FS-devel Mailing List , Linux Kernel Mailing List Subject: Re: [RFC v3 PATCH 0/5] Solve silent data loss caused by poisoned page cache (shmem/tmpfs) Message-ID: <20211014065408.GA2017714@u2004> References: <20210930215311.240774-1-shy828301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: naoya.horiguchi@linux.dev X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 80AEE600198A X-Stat-Signature: ehdqswpha1dbyijh394xq7kzqseu6in1 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="IlxAqI/g"; spf=pass (imf10.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-HE-Tag: 1634194459-27027 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Oct 12, 2021 at 08:09:24PM -0700, Yang Shi wrote: > On Tue, Oct 12, 2021 at 7:41 PM Peter Xu wrote: > > > > On Thu, Sep 30, 2021 at 02:53:06PM -0700, Yang Shi wrote: > > > Yang Shi (5): > > > mm: hwpoison: remove the unnecessary THP check > > > mm: filemap: check if THP has hwpoisoned subpage for PMD page fault > > > mm: hwpoison: refactor refcount check handling > > > mm: shmem: don't truncate page if memory failure happens > > > mm: hwpoison: handle non-anonymous THP correctly > > > > Today I just noticed one more thing: unpoison path has (unpoison_memory): > > > > if (page_mapping(page)) { > > unpoison_pr_info("Unpoison: the hwpoison page has non-NULL mapping %#lx\n", > > pfn, &unpoison_rs); > > return 0; > > } > > > > I _think_ it was used to make sure we ignore page that was not successfully > > poisoned/offlined before (for anonymous), so raising this question up on > > whether we should make sure e.g. shmem hwpoisoned pages still can be unpoisoned > > for debugging purposes. > > Yes, not only mapping, the refcount check is not right if page cache > page is kept in page cache instead of being truncated after this > series. But actually unpoison has been broken since commit > 0ed950d1f28142ccd9a9453c60df87853530d778 ("mm,hwpoison: make > get_hwpoison_page() call get_any_page()"). And Naoya said in the > commit "unpoison_memory() is also unchanged because it's broken and > need thorough fixes (will be done later)." > Yeah, I have a patch but still not make it merged to upstream. Sorry about that... > I do have some fixes in my tree to unblock tests and fix unpoison for > this series (just make it work for testing). Naoya may have some ideas > in mind and it is just a debugging feature so I don't think it must be > fixed in this series. It could be done later. I could add a TODO > section in the cover letter to make this more clear. Yes, it's fine to me that you leave this unsolved in this patchset. Thanks, Naoya Horiguchi