Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2372782iof; Wed, 8 Jun 2022 03:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxThVZRY/6irJxKR5jJOITZoMNMysOgAigycSd7K3BMvqk2RB2MmQB9p8XyGybHFFy6ywcx X-Received: by 2002:a17:902:a618:b0:168:9ef0:fb82 with SMTP id u24-20020a170902a61800b001689ef0fb82mr290008plq.144.1654684822891; Wed, 08 Jun 2022 03:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654684822; cv=none; d=google.com; s=arc-20160816; b=ZWLZAMikf/4ZY1OCVOVIuNsdd7kZOg8drHsDpwepOOxOLO3nEHM9i2WqGQNcf262PG cvVKo7/FNnLzrUKNaHg1JDD7SiOE8BjE/wBHOfxEa/a1TQlTF+4gx4E4WfVQmpCLnSHH MDYHFdN5VkMCquWVra1tOtFO2uwMoFZY/xxpfughKBStq2ITfHgSR4iXBS9gQTdPoAZp S/kpWx8jZVa3y7KNHPaevt5IqhQEejW9+9Wa9sTmmXHP8ne7oh50X5ba+uFLojG3gd3Y gpTbKmcNFRV5cgQF8gCfontAbdQbg1WFfVECI8YbIVus+2PXwvQdFmYxC2WS57EloifK Ivow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=FNY3YF4nQhITGaj91viUklJBWc1Ac9u/YPJFCIMm00s=; b=SzO0JCKLExs8jAIBwWcHwYGUYuc7KOOE6mWxrZZ/WK5DdyE3xEpJwrU1oGZi9di5ea KxNmfkbcaI05E4Z4X1jAmrHxP6690QJ+v51+hD5TfLpcMUJIpzqxm502OKAvjSr0vC9Y BUPdML4z8lYKG0qLmt7sutENUb0g1UW7LS7zYl//2ZqHTRfHqKQNAzIzaZj7/fucI+Cw IPeUZwUQiNExQmorlT5sFqu6aVawrPUlqD+fe+fkgsRIMXci5fMBUk1l3tAcHSn6aZM7 BBviT6vjpjKY95MYH/sGEsmawV64kC7tJPxjU3VGYIzkvGq3AH5K1h5N0P5bZ+NYTMhw zBHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QCGPiBoJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v6-20020a170902e8c600b0015ebfbc1a42si25604705plg.533.2022.06.08.03.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 03:40:22 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QCGPiBoJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1CB6417FC39; Wed, 8 Jun 2022 03:07:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235940AbiFHKEw (ORCPT + 99 others); Wed, 8 Jun 2022 06:04:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236046AbiFHKDA (ORCPT ); Wed, 8 Jun 2022 06:03:00 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A00AB15C8BA for ; Wed, 8 Jun 2022 02:45:30 -0700 (PDT) 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-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-222-EqaZ6WnlMg2p0iLo2dkk6w-1; Wed, 08 Jun 2022 05:45:28 -0400 X-MC-Unique: EqaZ6WnlMg2p0iLo2dkk6w-1 Received: by mail-wr1-f70.google.com with SMTP id w8-20020adfde88000000b00213b7fa3a37so3856022wrl.2 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=nOQrAcWOIh/Da/9f2si7UEByJEEY+azymCpt5fkUIh48iTQwr1GtK4Qtfxe/ljM1k+ bEXWNcmd5rnBeWUzvCAH6miHthYrqdPWfViqwmCbHY7dTJLOr0tK3TNbRMOyFJ+KXSkh q+NW5nlFECNnfq1zsAgjTswp2S9CmId5+43BexAmnqklqwFnDtAt0KnROHiPxxrdkLN7 ZsLzkIAzvi2SaF/rTDiitNMq1+mnVlz8pMtsUmW5Pz6I9lTET6HuaRESmHDXXFUYesvo u7ArCGB/eYqewxo+rK1WvBVCs170oUpx1XGBXjUc29MgTmAevSBkmGD7FdcKhJDH316y nokw== X-Gm-Message-State: AOAM531jEXCdMW7uPIVbLahO0NMbcV7mgbetjsQOpP7dVZdCtROID3rN NZosveyDNurFtWAyz+98VnpEVklGxZjb87NCZ/U+VSOW/GVWZWd6FtM8asXe7iQnvJbDLx8rsSi FtMez/wjgHe/4aClJB44fB1p5 X-Received: by 2002:a05:6000:1841:b0:218:be20:a1b7 with SMTP id c1-20020a056000184100b00218be20a1b7mr1223598wri.390.1654681527421; Wed, 08 Jun 2022 02:45:27 -0700 (PDT) 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 Content-Language: en-US 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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