Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4198355pxb; Wed, 13 Oct 2021 23:57:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvKs+rUlJDPcGxBJya02vMAEaL1XutvR+UvLCvgA9aTm3EWOMNRIp7+NfTdJUQU6yfgfyZ X-Received: by 2002:a17:90a:e7cc:: with SMTP id kb12mr4406628pjb.182.1634194662469; Wed, 13 Oct 2021 23:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634194662; cv=none; d=google.com; s=arc-20160816; b=KxzwRSM09d6B13eufpN2UmhZFIgeIbE3eenS8zzi5cBjhjP4Qpaz2CCxlsp9ddlx1+ C3xIiJS5qS2e4TmcjY2eCJq5wip0sWAhbx2fonf3I4DAcha7DGU43eCu65jGvnb8zKel pF01jNiMxEEBqSj1A50c2AjTB+s4IYk8uaxwZOA6iZEzPKP+via2/vxSZ3cSJxcOVQAO wZ+XoUURNtCBjKQxQ+7eXzyJ4H8I/MjiD1z6oA8EV2F6/xx7w7sMoGDCN/xpGhgcQenb T/of8X5J1V8RJv5DMdB+hBWjjN/4SIHBmKTwXZ8amJx1E0Yb0or0Nue/ZXyYH64pL2/h fOTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=CVDe8En+IZWhjai+cfsatfH8CtNAmmtQm4RPgAbLMdA=; b=Ezlse5QOcNtq+Lk52zkpvQF7Q4TrxE0oTdlwY78a/4DToTY8jqozAtyZRflEhSft7D l/XgVBlHef9kfv6aE4lvsgwwK006l7ZbggtJNEEySBh8d4BWQ6qyA2PLOKxpnAsPgjBS qDT1BpPMdLeBDvgKtX4Tfg9HvrKKv9N+9nggZRit4HnK028bQQtMvgSusnN+bEouu60a 54B/LDWfrBKth+QVloSinEYjAB4eQdHic8M0bKTbR1O9gREXr7CPMjzI/UHrKfamJxyE Qlefu+gazRWTXHLLC/HMqKFdybyf1pgT52cV+Ctoy+RQjnpl556069x4K4yW3m+z3Pvc uamg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="IlxAqI/g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si2947018pgj.102.2021.10.13.23.57.29; Wed, 13 Oct 2021 23:57:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="IlxAqI/g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229646AbhJNG40 (ORCPT + 99 others); Thu, 14 Oct 2021 02:56:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbhJNG4Z (ORCPT ); Thu, 14 Oct 2021 02:56:25 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64853C061570; Wed, 13 Oct 2021 23:54:20 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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