Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp1100048lqp; Thu, 23 May 2024 08:59:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPgYvT15OEmkk4NaFtYib6whfbu/97vG4nFKRiUShQ0wR7oS4V3921z4dTzUX6+7OR6rwkq+l/BCaRwqmq+ZeYhv3dBZbMvjZRyfY/Iw== X-Google-Smtp-Source: AGHT+IG6uoFRdETCvkcLLlTv/AQ09Bp2gqNvFX+4L12BNjcMTbkdDPWk93r1YLAYf9Uq/Y+kDS+v X-Received: by 2002:a05:651c:ca:b0:2e9:4b33:dd04 with SMTP id 38308e7fff4ca-2e94b33e0b0mr32882471fa.1.1716479998841; Thu, 23 May 2024 08:59:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716479998; cv=pass; d=google.com; s=arc-20160816; b=QV+/L+cEO5jRuV4hGfrN+S+nVj9/D6RoZ6WKmsVv2VYijRa0jrcs1U/RFtyApEhM8L Je9DxC0hwUetmMf9DBTvnFoK0QOAtLMFAs/LHf2ZuawX9UGI6tIwAaAQVgqCd+HqWFq7 TNbd7CcrtM2S8zcvsqOS33J+O+GFbjPEcfUrR+ggqpWkb8RsmMAClgY93M8w2G8o0KZu b+j5oTN5uEAKsmRfyWClDxYWFOMLEgXuAk3vHF8/U02Pmb3JaRLTR79mAbLNJT5xrNtZ e8pDBHgak1M71Vx92UbpLLyWfGoHhSyfKfDiahvchCzQ+H+uTLvTyzSo/r/FQ8WUCh85 CGeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SFW+xu7QNxeGwrYT708qIRdLA+B0NE1DkW6W5XAywxE=; fh=3zClQY6KJU1UjyL4hyY1sEhlBGJ5ZUm9EmAS0RPZNwY=; b=kqnff17e/cGQ+8KDQsL8j1XA2iVXrzCuCIm8ApmqsddJeUpvx3s11XEVBL4vbO5T+z 5UU0Zvm4hX/kNFTmNLnx/qnYz5mrpGaeMWwYtR5gH73efg6eIg27gSni6ziAz5NaJGhT 7NtEPnidB5awf9I16zTvp2B6MNgj2ZG6g9XQwL6F4oaAeofjjh0zg2/lrLaoSkB41eLg eV/MtKs2wWe5Z9VxezGENzNr9ald9t8UoW3Jvi7lE8FwocLwDxhI5DfJDGRPZYPTnbsN XsM3m4dPFxM3MWc99bLluVuQuaomID8ifkViiPLDf5odG+wAUtODnhyloEinCjLO9GrT 5G6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ODf4A2fx; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-187761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c3271edsi16199357a12.367.2024.05.23.08.59.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 08:59:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ODf4A2fx; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-187761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 89C671F224DD for ; Thu, 23 May 2024 15:59:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A9B820332; Thu, 23 May 2024 15:59:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ODf4A2fx" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6AF61CAA4 for ; Thu, 23 May 2024 15:59:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716479974; cv=none; b=lOth+4XWOpnIYjKF2YotzdI4bqOyQjA8gqc8uyFJlzn83UKyrqt3mrzNlNFwBdM/O+C0CQMANsqP+W1t8ICGaV9pQPtiqkIFMLdKZIUEOmeLVDcUbYNiJgGJC9JMiSPPZQtezlL16ZHncsmkH9Pk0Q9XsjqST9CylRXqNEBcemI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716479974; c=relaxed/simple; bh=pA/B+a/y3U9ldxjseVE8egOj7d/OGgdF6dVVS7fWRkg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aoGXMLBgRY3um6WRSA9InjSQz8bq3I51J7NDbvPMmi1pDip12I0+u2Ek9StJW/cz3fAtC+6tD2fpyfnA3R3YlCUA00icvcvDqQCK/3hC7z5sUnHGfp7bDgStccA8EIc4HwqgtIGOsmuX6+DZp5gVBA/dhtUBzzVQ3WuYC/1MAow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ODf4A2fx; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716479971; 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=SFW+xu7QNxeGwrYT708qIRdLA+B0NE1DkW6W5XAywxE=; b=ODf4A2fxz4AIDdvXSSz+uLVIIbLr3S3qsiV/BocXp25D2VY90cN3HwwbYvB1CsK4CQyy5a phXaie7B6VZApKR9tB1WlsSS7WSbtPB8+XJ/5JG0xPDCU6xvXu9sEkaWaqcwG89WvCJqCi nwfNSWyseAPdXQM6PQopatMcXtDq25I= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-148-hV64mq9wMRyCLDXq9MY4Yg-1; Thu, 23 May 2024 11:59:30 -0400 X-MC-Unique: hV64mq9wMRyCLDXq9MY4Yg-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6a0dc98ce3fso294766d6.3 for ; Thu, 23 May 2024 08:59:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716479970; x=1717084770; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SFW+xu7QNxeGwrYT708qIRdLA+B0NE1DkW6W5XAywxE=; b=K2poT1lgJgSdlIUHtEu0Rg1SW8iZgIdh9pC/EPtuha4MsfNRghZaj5yxcoFM6Cq9Cd cQ31RqyJs6zfyU73d6SX5EO47yZDc/Nd8YJwrVPTOEmOaSyW/zT0Ke9l8sqe5rqXY7jY m1Wx8+PA8bOz+BAI4/YnxBYP2Xx1WJ6zkut6vdRN1P+LH34kl/mCDmUKq10WsCCTY4bv vhmxXkuR93GiATXjBkED0lLNrq8jhevwqtF1VDKCu2GUQWxo0Wo4R2i5vwaCVK6tZumU C7CdroWUAEQs5Ny9XqAcy09NeFmjEUAsgJDI4hdIpmHZ3iekSriOWpkaWkp1fhBq66Fe Gk3A== X-Forwarded-Encrypted: i=1; AJvYcCUAmJKHky2xLZI0vAyFmHeiznP5fXXW9mrIVakDAv0jXVtQq2Qe1fmHoQwxv9zTDEQkfyuPslLlvCeRAlUn4Tf153DEjEViIIN+H5FX X-Gm-Message-State: AOJu0Yx2pyNjgfEpQJQgQvlOyb2cwJB4GUB2UuFc6kmcty3zIZAA5cCt +XjygDGWjqtwaQK+lqjn3+ea/5p2N27mqzNvGBNFW4vpOxzD/ZWNp3k46EgWRs75roYWdAcNHCA enKy5pg7d1Y5bDFxtUKJ3IiuvXNvGPXUFedLro/SkOEB3nhxezpkCl9l+Des1OQ== X-Received: by 2002:a05:6214:2484:b0:69b:1c5c:28fb with SMTP id 6a1803df08f44-6ab7f19ec6amr55473356d6.0.1716479969665; Thu, 23 May 2024 08:59:29 -0700 (PDT) X-Received: by 2002:a05:6214:2484:b0:69b:1c5c:28fb with SMTP id 6a1803df08f44-6ab7f19ec6amr55472786d6.0.1716479968823; Thu, 23 May 2024 08:59:28 -0700 (PDT) Received: from x1n (pool-99-254-121-117.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f17960csm144178206d6.25.2024.05.23.08.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 08:59:28 -0700 (PDT) Date: Thu, 23 May 2024 11:59:25 -0400 From: Peter Xu To: Oscar Salvador Cc: Axel Rasmussen , Andrew Morton , Andy Lutomirski , "Aneesh Kumar K.V" , Borislav Petkov , Christophe Leroy , Dave Hansen , David Hildenbrand , "H. Peter Anvin" , Helge Deller , Ingo Molnar , "James E.J. Bottomley" , John Hubbard , Liu Shixin , "Matthew Wilcox (Oracle)" , Michael Ellerman , Muchun Song , "Naveen N. Rao" , Nicholas Piggin , Peter Zijlstra , Suren Baghdasaryan , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: Re: [PATCH v2 1/1] arch/fault: don't print logs for pte marker poison errors Message-ID: References: <20240510182926.763131-1-axelrasmussen@google.com> <20240510182926.763131-2-axelrasmussen@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Thu, May 23, 2024 at 05:08:29AM +0200, Oscar Salvador wrote: > On Wed, May 22, 2024 at 05:46:09PM -0400, Peter Xu wrote: > > > Now, ProcessB still has the page mapped, so upon re-accessing it, > > > it will trigger a new MCE event. memory-failure code will see that this > > > > The question is why accessing that hwpoison entry from ProcB triggers an > > MCE. Logically that's a swap entry and it should generate a page fault > > rather than MCE. Then in the pgfault hanlder we don't need that encoded > > pfn as we have vmf->address. > > It would be a swap entry if we reach try_to_umap_one() without trouble. > Then we have the code that converts it: > > ... > if (PageHWPoison(p)) > pteval = swp_entry_to_pte(make_hwpoison_entry(subpage)); > set_{huge_}pte_at > ... > > But maybe we could only do that for ProcA, while ProcB failed to do that, > which means that for ProcA that is a hwpoisoned-swap-entry, but ProcB still > has this page mapped as usual, so if ProcB re-access it, that will not > trigger a fault (because the page is still mapped in its pagetables). But in that case "whether encode pfn in hwpoison swap entry" doesn't matter either.. as it's not yet converted to a swap entry, so the pfn is there. Thanks, -- Peter Xu