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 76D2DC433EF for ; Wed, 8 Jun 2022 09:45:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DAD5A6B00AE; Wed, 8 Jun 2022 05:45:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D5C956B00AF; Wed, 8 Jun 2022 05:45:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C0ABB6B00B0; Wed, 8 Jun 2022 05:45:31 -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 B04E36B00AE for ; Wed, 8 Jun 2022 05:45:31 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 8A7CEF4E for ; Wed, 8 Jun 2022 09:45:31 +0000 (UTC) X-FDA: 79554586062.04.5CFD2EF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 4E98920003 for ; Wed, 8 Jun 2022 09:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654681529; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FNY3YF4nQhITGaj91viUklJBWc1Ac9u/YPJFCIMm00s=; b=QCGPiBoJdjjR1pSlnQ2ncHXjzJFj2t1A3N83/TiR1XC+ySSIp3MS886iTW55sRx5zqf9aJ oENYd4SGuIOW2t8mOZFqGVtLlpF69nkhcpsFmS9bURz/X2ahlGd2i0duXVBq+wu1+M5eN6 ICHA2FCLt1WPjTblpvxqsXdm073MM9c= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-63-k74-Fo72N0mTFLuPiPYsyQ-1; Wed, 08 Jun 2022 05:45:28 -0400 X-MC-Unique: k74-Fo72N0mTFLuPiPYsyQ-1 Received: by mail-wr1-f69.google.com with SMTP id p10-20020adfaa0a000000b0020c4829af5fso4627605wrd.16 for ; Wed, 08 Jun 2022 02:45:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=FNY3YF4nQhITGaj91viUklJBWc1Ac9u/YPJFCIMm00s=; b=cEZkF/2iTabcW1TOfVVBpo7eJokKtdMIipcnv+OyPbv4+SRbi2BIS2sN6ZYnRfsg9l yJVJ26vTjUCUqmffDDkG6nEgS8UusThUdc7/n80a5rCKex0m+lrAD7Ml4eZ+drnVqpv9 uSJ7/D/fBd2z46v2pJ9BFWFbpIutRrgZFcOw0QIeywmLwF+eESyIabMz/SUQcrGdfFaO 7f1Mc9BnJ0KXDe85I8u6fsQF7JBEviG6peBzPxBAUt5HJf5DxECLY1xwBdHB2PxT6dHb ljS+2/pwZwWZUaQsXRthb3nUgu2CVAHzVbugv/ZR3aYOu6/UJhk+2R09Dko60gqJuf9W kC5Q== X-Gm-Message-State: AOAM530+mmdPaEb8VoLQCKu89S7aIW5EhJFBZgNXj0N8plcT0ensu1Q+ FwGlzsmDr3ABs9n5EmjTJHg9I+vgggU1FPd0iUkxxfv6upEawKbDP1rRtKk6G8qfBIH4JgmeXP3 0fKSW8sSLtl0= X-Received: by 2002:a05:6000:1841:b0:218:be20:a1b7 with SMTP id c1-20020a056000184100b00218be20a1b7mr1223601wri.390.1654681527422; Wed, 08 Jun 2022 02:45:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqEBm2yM2wf3dx+Bj76JV2ZdPBJfMilc36LWsgxJPxs2nQNzZtei8olDYiwRZUy+WMlkUayQ== X-Received: by 2002:a05:6000:1841:b0:218:be20:a1b7 with SMTP id c1-20020a056000184100b00218be20a1b7mr1223572wri.390.1654681527088; Wed, 08 Jun 2022 02:45:27 -0700 (PDT) Received: from ?IPV6:2003:cb:c705:ad00:db2:4c6:8f3a:2ec4? (p200300cbc705ad000db204c68f3a2ec4.dip0.t-ipconnect.de. [2003:cb:c705:ad00:db2:4c6:8f3a:2ec4]) by smtp.gmail.com with ESMTPSA id e41-20020a05600c4ba900b0039754d1d327sm22108703wmp.13.2022.06.08.02.45.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jun 2022 02:45:25 -0700 (PDT) Message-ID: <2cc99c51-0ae6-4c56-c964-ced618133ead@redhat.com> Date: Wed, 8 Jun 2022 11:45:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] mm/memory-failure: don't allow to unpoison hw corrupted page To: Andrew Morton Cc: =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBICjloIDlj6Mg55u05LmfKQ==?= , zhenwei pi , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Tony Luck , Wu Fengguang 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> <20220607145959.785e54c752f373bcc283732b@linux-foundation.org> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220607145959.785e54c752f373bcc283732b@linux-foundation.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QCGPiBoJ; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf03.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 4E98920003 X-Rspam-User: X-Stat-Signature: 1ayb9xti3o9tpxhphbupnogcbiyjn7wd X-HE-Tag: 1654681529-354397 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 07.06.22 23:59, Andrew Morton wrote: > 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? For example, I'm not even sure if we're allowed to use virt_to_kpte() out of random context at all. If we have a PMD direct map, why should it be okay to use virt_to_kpte()? Maybe I am just wrong, I asked that question on the next patch version as well. -- Thanks, David / dhildenb