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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04A53C43334 for ; Tue, 7 Jun 2022 22:00:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 667CB8D0003; Tue, 7 Jun 2022 18:00:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 615B48D0002; Tue, 7 Jun 2022 18:00:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4DD9B8D0003; Tue, 7 Jun 2022 18:00:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3B9208D0002 for ; Tue, 7 Jun 2022 18:00:04 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id EE72920E6F for ; Tue, 7 Jun 2022 22:00:03 +0000 (UTC) X-FDA: 79552808286.21.382EF18 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf31.hostedemail.com (Postfix) with ESMTP id 5F8C720053 for ; Tue, 7 Jun 2022 22:00:03 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 98110B81DA3; Tue, 7 Jun 2022 22:00:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21CD3C385A2; Tue, 7 Jun 2022 22:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1654639200; bh=8sL/rpVGiBwSPrjgFyVx4IBH9TqPDfomNd6mM8hy9kU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YyEmDOruYF7lVaZO4mPnA3SXKSgcKPOjb3an5AivFk4EHvhDPF0FP5i78f89hDw42 WQh31V72ZEffZrfbpmy7yrLeeHt/26dVf29QXB0juYr2UiuWp/21DT4UlVdrOdeaEl xdHSPld+OLAEZ6A0kLMws3s6L7gq0297zHXhPM5w= Date: Tue, 7 Jun 2022 14:59:59 -0700 From: Andrew Morton To: David Hildenbrand Cc: HORIGUCHI =?UTF-8?B?TkFPWUE=?=(=?UTF-8?B?5aCA5Y+jIOebtOS5nw==?=) , zhenwei pi , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Tony Luck , Wu Fengguang Subject: Re: [PATCH] mm/memory-failure: don't allow to unpoison hw corrupted page Message-Id: <20220607145959.785e54c752f373bcc283732b@linux-foundation.org> In-Reply-To: <5e7abb3f-56e7-0343-a678-749b6f5238a2@redhat.com> References: <20220604103229.3378591-1-pizhenwei@bytedance.com> <20220604115616.b7d5912ac5a37db608f67b78@linux-foundation.org> <584eedd3-9369-9df1-39e2-62e331abdcc0@bytedance.com> <20220606043202.GA1328953@hori.linux.bs1.fc.nec.co.jp> <3b58adbf-a8b2-8dba-71a7-123ba3850c10@bytedance.com> <20220606091503.GA1337789@hori.linux.bs1.fc.nec.co.jp> <5e7abb3f-56e7-0343-a678-749b6f5238a2@redhat.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 5F8C720053 X-Stat-Signature: i6pwi6jfy8bq8b3sdypq7hzhtk7h8xbp Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=YyEmDOru; dmarc=none; spf=pass (imf31.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1654639203-371733 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000035, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 7 Jun 2022 14:36:00 +0200 David Hildenbrand wrote: > On 06.06.22 11:15, HORIGUCHI NAOYA(堀口 直也) wrote: > >>> [ 917.864266] > >>> [ 917.864961] clear_huge_page+0x147/0x270 > >>> [ 917.866236] hugetlb_fault+0x440/0xad0 > >>> [ 917.867366] handle_mm_fault+0x270/0x290 > >>> [ 917.868532] do_user_addr_fault+0x1c3/0x680 > >>> [ 917.869768] exc_page_fault+0x6c/0x160 > >>> [ 917.870912] ? asm_exc_page_fault+0x8/0x30 > >>> [ 917.872082] asm_exc_page_fault+0x1e/0x30 > >>> [ 917.873220] RIP: 0033:0x7f2aeb8ba367 > >>> > >>> I don't think of a workaround for this now ... > >>> > >> > >> Could you please tell me how to reproduce this issue? > > > > You are familiar with qemu-monitor-command, so the following procedure > > should work for you: > > > > - run a process using hugepages on your VM, > > - check the guest physical address of the hugepage (page-types.c is helpful for this), > > - inject a MCE with virsh qemu-monitor-command on the guest physical address, then > > - unpoison the injected physical address. > > That's triggered via debugfs / HWPOISON_INJECT, right? > > That's a DEBUG_KERNEL option, so I'm not 100% sure if we really want to > cc stable. Sure, it's hardly a must-have. But let's also take the patch complexity&risk into account. This is one dang simple patch. Or is it. Should these things be happening outside mf_mutex? What the heck is the role of mf_mutex anyway?