Received: by 2002:a05:7412:b112:b0:f9:3106:f1c0 with SMTP id az18csp85909rdb; Sun, 17 Dec 2023 22:54:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNcJfFBf88U1bZUYwvxIkTHwPhNf4FiMkRakWDl36GbkNV51PiZx/tbiEkXcj4NYLcuAwH X-Received: by 2002:a05:620a:1713:b0:77f:14f:9988 with SMTP id az19-20020a05620a171300b0077f014f9988mr20052675qkb.101.1702882460861; Sun, 17 Dec 2023 22:54:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702882460; cv=none; d=google.com; s=arc-20160816; b=xVMkAp5CtEj04n0A+WyE72H58ZHzm8NiZaw0b96srbnAdpBhC1i21IQL5UqBqWr7E5 kL7+jRGh8k7xSo1bNllfAH8bCn2dsdxYqBZyoSXCrLynDRC1KYdnVZQ2DOfU/KUX7rnB nzA0Q+yux/MIVgexlyV3kHBBQ81nhJhsGxPnFdwsm6PG7oDlQX3P377tsBlAYhYxB71J 5pSxT2gS/QPeWQALYp9/wYmkv02UkhaPucV3XkaLNVKhKU8795P35PZ1Dp6tusOchfmw MB5pqu1w1C2nW+qjo33rmpQJ1MBSoWbA+10catM2Ii+VB/6FUrtRNvjGTRHSvLMRxmqU TwKg== ARC-Message-Signature: i=1; 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=v67XFPIWNLTawYP6JOl7+i6llSkDm15NEK6J3pJRCIE=; fh=tg6IlgxB4zzEgcDs3My+TAoclDht2V20wP9Lk5qqw54=; b=boKfyZnu+TiG+VaiFOZEzQksccpFV85I/esGqBqPA57EaPcDr4MsfKE1LHshDwR6fS wyY6rjHzTSILWL5kxvYSqu9F0ZLrRdZCIjvhMXH4BONWSKHBBU0eD2kcwc/wOY+dxTsa LXw1g9/Oi6NuKaRMOIOe4nMnAN/EeiW3x+Nh5V4sX2ewSJaJPdRy44nyzoAtcu4m5tBf cTBVLPkdokMCd17cd8aARL6BOdnIaQUk7M5HznChbNhqjePXrJ2YQ1uzl4DqbxyO9FYr 23DtiuYsc1oBXzwVXM4HZiwJLW4vzEvFP+WgySGDVKJbtNDtg5l4FKVY9Q6zcuOO5QBc wclg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IzjAMFF0; spf=pass (google.com: domain of linux-kernel+bounces-3068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h6-20020a05620a400600b0077d5f850f46si24807896qko.142.2023.12.17.22.54.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 22:54:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IzjAMFF0; spf=pass (google.com: domain of linux-kernel+bounces-3068-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3068-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9AA4D1C22342 for ; Mon, 18 Dec 2023 06:54:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8046749A; Mon, 18 Dec 2023 06:54:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IzjAMFF0" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D3787C8C6; Mon, 18 Dec 2023 06:54:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCE19C433C7; Mon, 18 Dec 2023 06:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702882445; bh=8Kl+lj+tSnogG6JvAU6RoT4pxakzbvX1ijwD+7zp3I8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IzjAMFF0vQGHpA1qzgdXpaupuutj/CMlFSu+srLaE4/MSS90lmByqlQxFcnKQ2YZI UTZ9b/kgzi+IyyUadHjzR6BhguXzBlJ0Abcasx/BmfRYLxd5M+ZSkgxFAqN13uQ2zD uJ+xuIOKS3IGeVwgR1yS1ZaVtzFMDWdMdHgai6UQ= Date: Mon, 18 Dec 2023 07:54:03 +0100 From: Greg KH To: Shuai Xue Cc: bp@alien8.de, rafael@kernel.org, wangkefeng.wang@huawei.com, tanxiaofei@huawei.com, mawupeng1@huawei.com, tony.luck@intel.com, linmiaohe@huawei.com, naoya.horiguchi@nec.com, james.morse@arm.com, will@kernel.org, jarkko@kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, linux-edac@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, stable@vger.kernel.org, x86@kernel.org, justin.he@arm.com, ardb@kernel.org, ying.huang@intel.com, ashish.kalra@amd.com, baolin.wang@linux.alibaba.com, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, lenb@kernel.org, hpa@zytor.com, robert.moore@intel.com, lvying6@huawei.com, xiexiuqi@huawei.com, zhuo.song@linux.alibaba.com Subject: Re: [PATCH v10 2/4] ACPI: APEI: send SIGBUS to current task if synchronous memory error not recovered Message-ID: <2023121855-crimson-hamper-57ef@gregkh> References: <20221027042445.60108-1-xueshuai@linux.alibaba.com> <20231218064521.37324-3-xueshuai@linux.alibaba.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=us-ascii Content-Disposition: inline In-Reply-To: <20231218064521.37324-3-xueshuai@linux.alibaba.com> On Mon, Dec 18, 2023 at 02:45:19PM +0800, Shuai Xue wrote: > Synchronous error was detected as a result of user-space process accessing > a 2-bit uncorrected error. The CPU will take a synchronous error exception > such as Synchronous External Abort (SEA) on Arm64. The kernel will queue a > memory_failure() work which poisons the related page, unmaps the page, and > then sends a SIGBUS to the process, so that a system wide panic can be > avoided. > > However, no memory_failure() work will be queued when abnormal synchronous > errors occur. These errors can include situations such as invalid PA, > unexpected severity, no memory failure config support, invalid GUID > section, etc. In such case, the user-space process will trigger SEA again. > This loop can potentially exceed the platform firmware threshold or even > trigger a kernel hard lockup, leading to a system reboot. > > Fix it by performing a force kill if no memory_failure() work is queued for synchronous errors. > > Signed-off-by: Shuai Xue > --- > drivers/acpi/apei/ghes.c | 9 +++++++++ > 1 file changed, 9 insertions(+) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.