Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp114770lqo; Thu, 9 May 2024 14:31:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0U8sfI7+RU8n+3WJSMmkI4uBiZ2SDo0oXfCOlFmheNE2Fz5k7FB6vzw+688Nm6bms7gpTrTGzfzjqMwHtxeYIKRJftv2NdikOBFOLvg== X-Google-Smtp-Source: AGHT+IGr6W7hl1HlX+1bfMt4kMFYqNh4V4LUZbp5oZXSrD+yOYVwfJYG4ToIxGqV/cRhIwxemQOu X-Received: by 2002:a05:6a00:14d1:b0:6f4:8486:75a0 with SMTP id d2e1a72fcca58-6f4e03af284mr637330b3a.31.1715290268334; Thu, 09 May 2024 14:31:08 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2aef301si2216169b3a.145.2024.05.09.14.31.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 14:31:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174994-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=FC7NFHRn; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-174994-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174994-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id AED1B2844C8 for ; Thu, 9 May 2024 21:30:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1211126F2F; Thu, 9 May 2024 21:30:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="FC7NFHRn" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2054.outbound.protection.outlook.com [40.107.223.54]) (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 8F53C85653; Thu, 9 May 2024 21:30:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.54 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715290240; cv=fail; b=ro+xBOW6KLupYVQZ2ncvDmVCJe67pNu36XnPYToDdQnL5vR6wMTYFlFm7rmGtbY7+RLLluoXqTFHNfhZX5ApAt+fuxmcxN1rDlXTNwqNSPhgAhbfpaRh+0i0NNJ1vIz4rkpF5Emzjpidt77EW5RT7Ijm1fXHMTNQthwWcj9KoXI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715290240; c=relaxed/simple; bh=CrSMwY3OmFl77mRhnJ16eqM7hLET9Dle0oz19dr28k4=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=pkvCEwwe6DNr57BL66YSh8bcoIDMJ+Iq4UahF6COssyV5oW1ySg7xQNBOMAjX3pDoLmw68Zo92Zz3fM1dk6uPFCeEt6jlTwMbp8/bYDZI0wYL03BDLMCMqqO690LNJHIbiFxsb8G5SulT7VOLSvwXg9zxKAhAYENcMyuJ5cggrM= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=FC7NFHRn; arc=fail smtp.client-ip=40.107.223.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LqCe74kFwVF3q8PU9A35ZoWyRReZpB6FTUfZNDaN6pST7FQ1X4pniYSnV5I2bq3T44p6YUIUQsYS5tyPlHFr7OGXo4bBdzaRN2tNaidECqWz2jqvlJQLv7/PgSTBGYYt3yHtXgqlkfshHCzEQBegz5AlsIG2sik3D0ea3XYAALgwrAllWD5hzZUMnM60urHXKR2y1ue7CWDySGmEpv7eQSCsmAPZNqnNYhjvq2dR9CpcAIFLS6JswKjOsFHVpw0qtn56ZYWfq/0qCmJYEYgWj4NmKpw6rbogPKzHwjy7FpDoxkihdB2zlZ5XIDi3pkyLbVNqY33okEKrE5eFJQDqmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=md4cbEyCram6XLEw6qMfKnlTDwYajy/D4S56EgW6QqQ=; b=IxQQyZ6qVSk5HJc7DvlL+bLfH9ngPhF+lBKFHym8T2updJOwdvGOjkIh+VRqOSLtyBYTUl0S4QxJ01MDOXS2zDh8t4XiUY2zB8Syqb4APKrseEZKoueuthLJLaCZjrLHQRRU/wDqaayIyWkUdMGb9DgCCMwRAZiLqauOPtcQ+2saLPB/5T4WgwA1AggdiM8RI/MsIfEKFCaogdXjA6h99ZYC4JnXmTwkiknVBNmoly5Jv9SEUO/+N77OixQ5WOHQcLv3/HXQY7TbnFrphF1Z57WwAO34IGD9/57lu9PTlKsRo2jzu8H5LvvR5V6pVIrKnQSWa8fXEpbLS8/d/mbDzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=md4cbEyCram6XLEw6qMfKnlTDwYajy/D4S56EgW6QqQ=; b=FC7NFHRn7WEQlhlpIwyE/z9PqKe39LGikjp/URCD95iZJFl7ZbXfS7WjRhAcbwnubaKaSAXwNxdU6y0Nug7ZIipG7gMXNZYbNGOW8dY/SN1sHFeGE2/Gl1N9y8VOKbH+ooxLJo4DWSLRysvXS+4R8JC7wzsaYh9N9lGMWH/EYYWboGU9Xn7kwEH0Ni680eiLX9LNpGp4jTUjHTYAxEKZqwATg27EHBviZo/PnAj6xdJUeCvkfp0REhmzDgCumoC7RMTKOxTg1JIGxJphKCxSNGGqF83bOYnYfwA4dXfYRi1iw131UaAtUnJ8zmCoaWAjlbRSwVdU3uMvJ7rcXbEfRQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by DM6PR12MB4108.namprd12.prod.outlook.com (2603:10b6:5:220::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.46; Thu, 9 May 2024 21:30:33 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7544.046; Thu, 9 May 2024 21:30:33 +0000 Message-ID: Date: Thu, 9 May 2024 14:30:21 -0700 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] arch/fault: don't print logs for simulated poison errors To: 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" , Liu Shixin , "Matthew Wilcox (Oracle)" , Michael Ellerman , Muchun Song , "Naveen N. Rao" , Nicholas Piggin , Oscar Salvador , Peter Xu , Peter Zijlstra , Suren Baghdasaryan , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org References: <20240509203907.504891-1-axelrasmussen@google.com> <20240509203907.504891-2-axelrasmussen@google.com> Content-Language: en-US From: John Hubbard In-Reply-To: <20240509203907.504891-2-axelrasmussen@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY3PR03CA0014.namprd03.prod.outlook.com (2603:10b6:a03:39a::19) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|DM6PR12MB4108:EE_ X-MS-Office365-Filtering-Correlation-Id: cb80d50d-18e3-452c-859a-08dc706f41fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007|7416005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?B?dldmSitQOU9JY3pJVWk1bkJLb2Z2RGhxVyttOWo2S3dRVXB1L3J0NnREbWFI?= =?utf-8?B?cWNxWU0raGlYNExvVzdyNkZDcWhtU212ejRZcnlWbys5RDhjZGk5VktqMFBP?= =?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S1BHTEJCdzY1L0Y0UFNBWFQxMWFxSkxo?= =?utf-8?B?cVB0QzVwbS9TZXVEWFN2OFdneE9Oek96YTlBVURMSXp4K0JMaWhHOWVqeVJz?= =?utf-8?B?SkVmZ0dhdlRhNkNjYzRrQUhGeXU4alpmcWl1Q3paeCtOMGJ6UEdaSG1tcUpQ?= =?utf-8?B?RDNJWWdZT3pTbUFZUzhXajB0MFlHaGlHcGJEaFhzOEp3aUE0SVBoVGE5dlJ1?= =?utf-8?B?UGFRMzFyMXhzQ2lTa2FFTmp0SXh4MEdqVHpWZks3RGIvQWZ2MXdjTWNJakJt?= =?utf-8?B?RmhpWFpkOHpVTHdyUUQ5djUxQ25hWE1lVTBHT0FINnFYcXNvTHBEUGhldWU3?= =?utf-8?B?SkFCdWMvdG5uMEVCRys3aUZyVitKQ2RvS3ZwVjExVjVlblg2c2p0cXFoUVRZ?= =?utf-8?B?K3pGNlhySStVZFRabUdac016VStxUUt1SElMSVNQTjJDTllsNnhXaUtPRmZw?= =?utf-8?B?NkE9PQ==?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb80d50d-18e3-452c-859a-08dc706f41fb X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2024 21:30:33.1565 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GjUJiST415epQwt7PGQYHN+gjZDQeJKosMRYCWmj5YVrSoGrG4RELlBLRTq85snztlwBi5vOnUe+FBIYVGmjcQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4108 On 5/9/24 1:39 PM, Axel Rasmussen wrote: > For real MCEs, various architectures print log messages when poisoned > memory is accessed (which results in a SIGBUS). These messages can be > important for users to understand the issue. > > On the other hand, we have the userfaultfd UFFDIO_POISON operation, > which can "simulate" memory poisoning. That particular process will get > SIGBUS on access to the memory, but this effect is tied to an MM, rather > than being global like a real poison event. So, we don't want to log > about this case to the global kernel log; instead, let the process > itself log or whatever else it wants to do. This avoids spamming the > kernel log, and avoids e.g. drowning out real events with simulated > ones. > > To identify this situation, add a new VM_FAULT_HWPOISON_SIM flag. This > is expected to be set *in addition to* one of the existing > VM_FAULT_HWPOISON or VM_FAULT_HWPOISON_LARGE flags (which are mutually > exclusive). > > Signed-off-by: Axel Rasmussen > --- > arch/parisc/mm/fault.c | 7 +++++-- > arch/powerpc/mm/fault.c | 6 ++++-- > arch/x86/mm/fault.c | 6 ++++-- > include/linux/mm_types.h | 5 +++++ > mm/hugetlb.c | 3 ++- > mm/memory.c | 2 +- > 6 files changed, 21 insertions(+), 8 deletions(-) > This completely fixes the uffd-unit-test behavior, I just did a quick test run to be sure as well. Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA > diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c > index c39de84e98b0..e5370bcadf27 100644 > --- a/arch/parisc/mm/fault.c > +++ b/arch/parisc/mm/fault.c > @@ -400,9 +400,12 @@ void do_page_fault(struct pt_regs *regs, unsigned long code, > #ifdef CONFIG_MEMORY_FAILURE > if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { > unsigned int lsb = 0; > - printk(KERN_ERR > + > + if (!(fault & VM_FAULT_HWPOISON_SIM)) { > + pr_err( > "MCE: Killing %s:%d due to hardware memory corruption fault at %08lx\n", > - tsk->comm, tsk->pid, address); > + tsk->comm, tsk->pid, address); > + } > /* > * Either small page or large page may be poisoned. > * In other words, VM_FAULT_HWPOISON_LARGE and > diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c > index 53335ae21a40..ac5e8a3c7fba 100644 > --- a/arch/powerpc/mm/fault.c > +++ b/arch/powerpc/mm/fault.c > @@ -140,8 +140,10 @@ static int do_sigbus(struct pt_regs *regs, unsigned long address, > if (fault & (VM_FAULT_HWPOISON|VM_FAULT_HWPOISON_LARGE)) { > unsigned int lsb = 0; /* shutup gcc */ > > - pr_err("MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n", > - current->comm, current->pid, address); > + if (!(fault & VM_FAULT_HWPOISON_SIM)) { > + pr_err("MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n", > + current->comm, current->pid, address); > + } > > if (fault & VM_FAULT_HWPOISON_LARGE) > lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault)); > diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c > index e4f3c7721f45..16d077a3ad14 100644 > --- a/arch/x86/mm/fault.c > +++ b/arch/x86/mm/fault.c > @@ -928,9 +928,11 @@ do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address, > struct task_struct *tsk = current; > unsigned lsb = 0; > > - pr_err_ratelimited( > + if (!(fault & VM_FAULT_HWPOISON_SIM)) { > + pr_err_ratelimited( > "MCE: Killing %s:%d due to hardware memory corruption fault at %lx\n", > - tsk->comm, tsk->pid, address); > + tsk->comm, tsk->pid, address); > + } > if (fault & VM_FAULT_HWPOISON_LARGE) > lsb = hstate_index_to_shift(VM_FAULT_GET_HINDEX(fault)); > if (fault & VM_FAULT_HWPOISON) > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > index 5240bd7bca33..7f8fc3efc5b2 100644 > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -1226,6 +1226,9 @@ typedef __bitwise unsigned int vm_fault_t; > * @VM_FAULT_HWPOISON_LARGE: Hit poisoned large page. Index encoded > * in upper bits > * @VM_FAULT_SIGSEGV: segmentation fault > + * @VM_FAULT_HWPOISON_SIM Hit poisoned, PTE marker; this indicates a > + * simulated poison (e.g. via usefaultfd's > + * UFFDIO_POISON), not a "real" hwerror. > * @VM_FAULT_NOPAGE: ->fault installed the pte, not return page > * @VM_FAULT_LOCKED: ->fault locked the returned page > * @VM_FAULT_RETRY: ->fault blocked, must retry > @@ -1245,6 +1248,7 @@ enum vm_fault_reason { > VM_FAULT_HWPOISON = (__force vm_fault_t)0x000010, > VM_FAULT_HWPOISON_LARGE = (__force vm_fault_t)0x000020, > VM_FAULT_SIGSEGV = (__force vm_fault_t)0x000040, > + VM_FAULT_HWPOISON_SIM = (__force vm_fault_t)0x000080, > VM_FAULT_NOPAGE = (__force vm_fault_t)0x000100, > VM_FAULT_LOCKED = (__force vm_fault_t)0x000200, > VM_FAULT_RETRY = (__force vm_fault_t)0x000400, > @@ -1270,6 +1274,7 @@ enum vm_fault_reason { > { VM_FAULT_HWPOISON, "HWPOISON" }, \ > { VM_FAULT_HWPOISON_LARGE, "HWPOISON_LARGE" }, \ > { VM_FAULT_SIGSEGV, "SIGSEGV" }, \ > + { VM_FAULT_HWPOISON_SIM, "HWPOISON_SIM" }, \ > { VM_FAULT_NOPAGE, "NOPAGE" }, \ > { VM_FAULT_LOCKED, "LOCKED" }, \ > { VM_FAULT_RETRY, "RETRY" }, \ > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 65456230cc71..2b4e0173e806 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -6485,7 +6485,8 @@ vm_fault_t hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, > pte_marker_get(pte_to_swp_entry(entry)); > > if (marker & PTE_MARKER_POISONED) { > - ret = VM_FAULT_HWPOISON_LARGE | > + ret = VM_FAULT_HWPOISON_SIM | > + VM_FAULT_HWPOISON_LARGE | > VM_FAULT_SET_HINDEX(hstate_index(h)); > goto out_mutex; > } > diff --git a/mm/memory.c b/mm/memory.c > index d2155ced45f8..29a833b996ae 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -3910,7 +3910,7 @@ static vm_fault_t handle_pte_marker(struct vm_fault *vmf) > > /* Higher priority than uffd-wp when data corrupted */ > if (marker & PTE_MARKER_POISONED) > - return VM_FAULT_HWPOISON; > + return VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_SIM; > > if (pte_marker_entry_uffd_wp(entry)) > return pte_marker_handle_uffd_wp(vmf);