From nobody Wed Apr 1 12:31:56 2026 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 C9AF32E401; Tue, 31 Mar 2026 11:00:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774954843; cv=none; b=QaBEuuSu+ttDsU66Vobsf0WMGeEpG+lpxpJ4Q2RL7EDzt28DeyWfx1WVVVCEg4sAeiiFboI6tYVKsC07zvDpVUpJHWO9BDiPQQ1RHPJzVddeYre5fKMWPkoLQYkRBppA78CO6b/zruwiqgHtSsnxv8eDwNp1afMIVukTQMVjE/0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774954843; c=relaxed/simple; bh=LQ8JPJu4hVwXA6ZBcwhWKH4JmrXxTSQbw/JmwDUjF4Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DfT+GbgrC6En4Tl1f56PaQ4n23kTSnIqaA0gk6+Ruod4RowIlifITr1ll3fIvZ7kHl6yJDA5E0Abkbq3xwDNiC+Y43askY6dfIJ9l0PQQg1FbhCRn7W+SPoMi2ejvxeCpq+Gx3LJiMlOJmoI6EvWoeKp5B1r2+odm3xwzKtYfEE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=I6HMSAwt; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="I6HMSAwt" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description; bh=D3oi2WL9aVMRGCDxrM3eE/b0NGQJJRrFO3ofQ0V/e2I=; b=I6HMSAwtXrXIBW/RtXa5KMCct0 RFhBLw/Ml8GEnRdD3jC5twXHbmCG9n7R9uen9ldHC8fOfReSvGMHw5JtfyJazu6CzXf3YZrUSC97t p7u0lWe1mycrtaaIPzyEEu792zso3aLoEzUZ4nBSKP48J1tmhaLAaCvapG1sRkcDEPzAeFLixZg2H tYd+POTt26PJwTgmrv3XMa9WAIbTXPJsru0AV+ypvGe8yGBkjJGhSiVAewkTu1xjsINvAqErakkej qvKwgQs1qcOWgsCGQgnl1CSaDY/wyw9eitLI65I73sqy5x4o0GR89OZPkYY/usqQANopiz4q6zDpt ZrH5GjIw==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1w7Wpl-002Aan-26; Tue, 31 Mar 2026 11:00:32 +0000 From: Breno Leitao Date: Tue, 31 Mar 2026 04:00:16 -0700 Subject: [PATCH v2 1/3] mm/memory-failure: report MF_MSG_KERNEL for reserved pages 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-Transfer-Encoding: quoted-printable Message-Id: <20260331-ecc_panic-v2-1-9e40d0f64f7a@debian.org> References: <20260331-ecc_panic-v2-0-9e40d0f64f7a@debian.org> In-Reply-To: <20260331-ecc_panic-v2-0-9e40d0f64f7a@debian.org> To: Miaohe Lin , Naoya Horiguchi , Andrew Morton , Jonathan Corbet , Shuah Khan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Breno Leitao , kernel-team@meta.com X-Mailer: b4 0.16-dev-453a6 X-Developer-Signature: v=1; a=openpgp-sha256; l=1010; i=leitao@debian.org; h=from:subject:message-id; bh=LQ8JPJu4hVwXA6ZBcwhWKH4JmrXxTSQbw/JmwDUjF4Y=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBpy6lIlRQLIv0IYw8ryV6vm0jHNbCVtjXc3Xeou /NgiA8DHsSJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCacupSAAKCRA1o5Of/Hh3 bYf6D/4o0UQMOnG1ClcQ3eCmn9QhVYwmpu9MYpIjydSGaoNVYxGa307x7T1pueq49fEWNJ/Zusc k980fbsdTXIiyklHxWai/4hiFUtmg01JLk2KriPOc2K0Q7JNfu0avc9hQYBBXD2jQTwFIaPNgUt 7SUUSAu5uVIUbZstjQH5ocHkK5Gaa0OCLw6N6zxFHDrVecwDugein1NEM66fDdwSBXf/HsSYldJ ftIR0ktUz1CYQ54sGy88qX74FGO3EHVOukUtQhAHeTt5nobKW41ZSRBPpNkjRRF5yBEpyx/RspP ZQ1g/5FVwH7h86wDMky/6fjO7lRwkOQnqt4LnuU7hrF7m9eMkPJQqCRJHSodFMU0AEVnChPNNpA sKo8IhZazArTBvbBhU1weDQccic99JUABt2gdmlaAWQU4NLRl1jm8jvAcilIlpCETZkPmowXHfc hSrI3tadNC4ub6cXy/Zxrgf0GEeyJjf55eXGhPm+0bhohkNau5Wrde/X9UllEZUncsQNG80egzT kfUXdZ1+eIln4sPROep8qcrAiYzzb+2URoK9gXl7/e4XOCnlbO7erdsUcnWZ0BA+BMbJAeBbf7t viXIr8vpg6o0AMMCAHcGm+7IDPuxN9KLNV16eNGys8Xuz26T9/GbAnudITUEXAI5ehn4Ux9br/R yioz27gGZ/S+V2Q== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D X-Debian-User: leitao When get_hwpoison_page() returns a negative value, distinguish reserved pages from other failure cases by reporting MF_MSG_KERNEL instead of MF_MSG_GET_HWPOISON. Reserved pages belong to the kernel and should be classified accordingly for proper handling by the panic_on_unrecoverable_memory_failure mechanism. Signed-off-by: Breno Leitao --- mm/memory-failure.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index ee42d4361309..6ff80e01b91a 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -2432,7 +2432,11 @@ int memory_failure(unsigned long pfn, int flags) } goto unlock_mutex; } else if (res < 0) { - res =3D action_result(pfn, MF_MSG_GET_HWPOISON, MF_IGNORED); + if (PageReserved(p)) + res =3D action_result(pfn, MF_MSG_KERNEL, MF_IGNORED); + else + res =3D action_result(pfn, MF_MSG_GET_HWPOISON, + MF_IGNORED); goto unlock_mutex; } =20 --=20 2.52.0 From nobody Wed Apr 1 12:31:56 2026 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 C5DD93A543F; Tue, 31 Mar 2026 11:00:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774954845; cv=none; b=gFpyluYvZwMnzj3P8uJn87kBc0AAzLIHcHNMpMLYh8zDnzZtzizBWGyb5KkK0J9sBjZPuOD50zyiOU/bdW7C8r4plI6tQnNm4rVE4UkTp3jv+K2FM6KH78M5R8zylJEgIfwYOHvQ4lhk5niiesn1MlEol0b3bHt7gHzvrHtdSY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774954845; c=relaxed/simple; bh=yzGP/Cy1yyj6AMionGm0ecG3Z37VsQOIJST1oCRcuAA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=e/cwcMq4XIYlFJ2SqisNVCkCf73LIcUoohwWC2ZLzrhf+THU2SNoZ78Gpm/QkL3ID0hmoion/QCN4G+7jX6GdDxmk/GyGayKmG68wDLx/qi9/OvfluPYzkFzrWTXbLXNTXrNqRc12++kWahZ7JEZsyYvw7y387CI7ZXsIaP4yps= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=qoNGz+Kk; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="qoNGz+Kk" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description; bh=rVyhTawyidgAJFXlFpU1kNzGw6yToxZt3Y3vvzuWrVQ=; b=qoNGz+KkXkQW3BqbH2rQVP+plM Lpy5EaphkrsicKHvP+14QwCjtVBz1wPZunwR2OX+0/rP2uk8iOcampfze+kP4Mb+/aUGPAnSjoksO MzUDlxkSo9HIie7ra43H8/uYRDQvaR0VtclN+d2KAqiTCPrXEYURGg6ez+pPKtrnEka9o5J6OphI5 Iy3vEZhaph0BjibtZ56hp4XQcLcbOy35KCFr2l4BJ69fbXC3y7KI0HHYlQWjzJ8SptDDf1bFi9yfQ 43kCbKQM8ZaIFcqIfiwEqDbFcsBhkVUXou4AL+SjFPopnT9fomZAGgo4pJ2AFklTIpvdQ6LZ//e77 WRk7DrlQ==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1w7Wpp-002Aat-1L; Tue, 31 Mar 2026 11:00:36 +0000 From: Breno Leitao Date: Tue, 31 Mar 2026 04:00:17 -0700 Subject: [PATCH v2 2/3] mm/memory-failure: add panic_on_unrecoverable_memory_failure sysctl 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-Transfer-Encoding: quoted-printable Message-Id: <20260331-ecc_panic-v2-2-9e40d0f64f7a@debian.org> References: <20260331-ecc_panic-v2-0-9e40d0f64f7a@debian.org> In-Reply-To: <20260331-ecc_panic-v2-0-9e40d0f64f7a@debian.org> To: Miaohe Lin , Naoya Horiguchi , Andrew Morton , Jonathan Corbet , Shuah Khan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Breno Leitao , kernel-team@meta.com X-Mailer: b4 0.16-dev-453a6 X-Developer-Signature: v=1; a=openpgp-sha256; l=1836; i=leitao@debian.org; h=from:subject:message-id; bh=yzGP/Cy1yyj6AMionGm0ecG3Z37VsQOIJST1oCRcuAA=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBpy6lIqDJQvSdPLFq2MknuEvV7NkwbvksSPwQSQ 7SDWBXqpaeJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCacupSAAKCRA1o5Of/Hh3 bWzVD/wMEOFVeqAHE2Bo40HWmg1QMcTSipGvQHqL38jYHHqnOqXtg5Hj7d3c+YppJwEfs0QjFTA EcOibEYB573vJ1emMullT6EaX+vids8do9+A4DuxmM/Tvv6ijRy5LYi35aKp1E8u3Dp3aOQuvoW kJKb12RaZLu3QzrmfvyXWGQSFP+yyjqxpW56GzyAga0q/iWDywpxA8yxCUzfUT7ObsYejpLmdVl Zw7muxBxdc4ig0qzVFu8p4mPOfsjCrqoJrlK57xk84RVll65KvBMJvDR5ndDHQTrwfOarJpzGbx rQPN3ZJ3GS2nSsv66y/w8Gz+pGEPh8Inv9lvMwhcaLfWXSEUwCQ/4DGwUysY/3LRtMCenFpMiU0 hTY1DleA0RfkpEfaGyy7Fi1ILFm8Uwk8zMZ1KIAbvEzVA8Ba2QJQjxaTbQn17AC4Y90cZHidbPv 3i7I+kAGBQSP6hXw3gFEEMIvkWfWoKZZZY/47jWOKZuTH9qfu2Tr7iBNeIrlg33KH+hJ5owL6cl u/VjzANF38CSAb2yQdUlyRDJnYgcyQkmaXWO8Yb1uH6K6b7z4b0qebJ6DHqNV83wCMJWxwq5Pyv IijdlEzmEFbyPDxpsR5cOdIiLRELA/8gfu2HSHramLNlpPqUt4hshRqaSdwJNw0IfaaAD0c4vtH Z3/+zy2gRZBkGkw== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D X-Debian-User: leitao Add a sysctl that allows the system to panic when an unrecoverable memory failure is detected. This covers kernel pages, high-order kernel pages, and unknown page types that cannot be recovered. Signed-off-by: Breno Leitao --- mm/memory-failure.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 6ff80e01b91a..d0d911c54ff1 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -74,6 +74,8 @@ static int sysctl_memory_failure_recovery __read_mostly = =3D 1; =20 static int sysctl_enable_soft_offline __read_mostly =3D 1; =20 +static int sysctl_panic_on_unrecoverable_mf __read_mostly; + atomic_long_t num_poisoned_pages __read_mostly =3D ATOMIC_LONG_INIT(0); =20 static bool hw_memory_failure __read_mostly =3D false; @@ -155,6 +157,15 @@ static const struct ctl_table memory_failure_table[] = =3D { .proc_handler =3D proc_dointvec_minmax, .extra1 =3D SYSCTL_ZERO, .extra2 =3D SYSCTL_ONE, + }, + { + .procname =3D "panic_on_unrecoverable_memory_failure", + .data =3D &sysctl_panic_on_unrecoverable_mf, + .maxlen =3D sizeof(sysctl_panic_on_unrecoverable_mf), + .mode =3D 0644, + .proc_handler =3D proc_dointvec_minmax, + .extra1 =3D SYSCTL_ZERO, + .extra2 =3D SYSCTL_ONE, } }; =20 @@ -1298,6 +1309,11 @@ static int action_result(unsigned long pfn, enum mf_= action_page_type type, pr_err("%#lx: recovery action for %s: %s\n", pfn, action_page_types[type], action_name[result]); =20 + if (sysctl_panic_on_unrecoverable_mf && result =3D=3D MF_IGNORED && + (type =3D=3D MF_MSG_KERNEL || type =3D=3D MF_MSG_KERNEL_HIGH_ORDER || + type =3D=3D MF_MSG_UNKNOWN)) + panic("Memory failure: %#lx: unrecoverable page", pfn); + return (result =3D=3D MF_RECOVERED || result =3D=3D MF_DELAYED) ? 0 : -EB= USY; } =20 --=20 2.52.0 From nobody Wed Apr 1 12:31:56 2026 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 EC9ED3A9D80; Tue, 31 Mar 2026 11:00:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774954851; cv=none; b=YKjscURGVjF3MDH0C04ocnk0jlZnQFtj4O3Z3oYMsD51FzU3qw8j33PX/bSeKgQP7j5yk6i9Ml2dlVht4CvVXcu0YLy0tcjtX22utvDOcxaxfCwuWqONa2VEEqLTjuMLP6DK6j2rUIhcm53I+WBq+W+r7muISn+F/I1u41+bAXc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774954851; c=relaxed/simple; bh=qiZP3pMkiWVhwKRsjcSJIBXS5tm3G3sL6gwl8SO35OI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eoqKZ+m63nmcge96rukS/UV45WDmW1WwNbfFcrGHC+4uC4iFDsZaIM3Yxkb43PBJik4iIeEQAncwYaC3REL6Bbaws/D8MXWZm25hEL6H/M8FFfOg/GEXkWPI4frRThN0LGBTkH/6Yc7vgbJRjTXE3cIbTI3fAWclMH+c0sq/7qE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=i6VLUgQA; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="i6VLUgQA" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description; bh=ej999Lltj3psDX+lSQBFgt+N0EJ87JUHiVq66s1ytUM=; b=i6VLUgQA/T0U4Tb0sHMae0huaZ DcHpw+WDe4WKFSLgNEx6/iYQ5QKrY1wYAc7PlcqpMNjdjsX5kn8EhzI7DZ0OZUaysRpoSAFqhIgwD ZngqZaFcB9zZvKGWzZn3GGTclUY2J2wp9RJ5g93XeBOWbiLlhU99/9uRk9PUGld31uog+4fpMj3TB S13iCPBlXulv0Jr8k4gmNRWXzbt7KLO2ZXDaITx4kyLJqidYNoRngbqtzlQg3sI7y3TQqkR3h5TYe OSsgZm0bFPTvqARhR13J3SjMdiOxt5owZOLQjxlHl4YBYrIg2GGNrIts692bLvq8uVwTnaWP2Lcez GuNN27hg==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1w7Wpt-002Ab1-2Z; Tue, 31 Mar 2026 11:00:40 +0000 From: Breno Leitao Date: Tue, 31 Mar 2026 04:00:18 -0700 Subject: [PATCH v2 3/3] Documentation: document panic_on_unrecoverable_memory_failure sysctl 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-Transfer-Encoding: quoted-printable Message-Id: <20260331-ecc_panic-v2-3-9e40d0f64f7a@debian.org> References: <20260331-ecc_panic-v2-0-9e40d0f64f7a@debian.org> In-Reply-To: <20260331-ecc_panic-v2-0-9e40d0f64f7a@debian.org> To: Miaohe Lin , Naoya Horiguchi , Andrew Morton , Jonathan Corbet , Shuah Khan Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Breno Leitao , kernel-team@meta.com X-Mailer: b4 0.16-dev-453a6 X-Developer-Signature: v=1; a=openpgp-sha256; l=2203; i=leitao@debian.org; h=from:subject:message-id; bh=qiZP3pMkiWVhwKRsjcSJIBXS5tm3G3sL6gwl8SO35OI=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBpy6lInoiOsKvmqn6zqDWvDEROH5pmoV+ihKV/y MR1/drgwtKJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCacupSAAKCRA1o5Of/Hh3 bRPXD/0eaeyWiE1Kspzsio63y3xZCajlbk7YAuNAZscwsWBzwt/us5mtJR+/U1FW9IxJ1aIde12 23iTxJZeNecTeF/tpBu/brJ4fm9HrKL/ws2a8q6s1OXwFtSPbQq6JIJmCwr2xvMZ6XUTrfJLpFm vBsH7/XV2NTRcgLS/lXd4yl3bqP6HcseRaUk2RPCUeUXUJ89Bdlpaa7VEc31qag+j573OQxpaYE cBjddR29bMmm7RUsd/JbrOlPaXioD2as5uj8vRsSQmDgxs34e7PZIqqvp4mYbZdShzIQW+KRqo8 iiKbtOM12ujLYlr/580y80C3Z/sxy5VsN7pciBU9ajWSFhX4C0Ze5OldxRp309jzSnucUWDFTE+ ppp4Ru2UjQFJdG4p8hycOZfFswIC7pR40Y2Q7FIrYj8VwOTiZfhPqhWccG8KwMyhExQnseAzc6o VmekuFk2Pk5n3JD2I1844DzPag8gx/qFCgVNNoEcet0tEyEXKkxoJwQ5i9ZDhvBfamuAByEnX2T uIWhrsBnE65GsSRmMuQNZFfn3/4a+cEba31Lf8Fxpqc4a1Jz5y8XDE/QRYD/nJtpgUpNtk7YqSJ CI/uq8Ssj2NFj8Dz+HbkLS17Y/Rv10yfgpd754oyf0iafvr/gd/kLFIscbcjbY1HNwO48OfO369 kvLCJzvXVXOq2wQ== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D X-Debian-User: leitao Document the new vm.panic_on_unrecoverable_memory_failure sysctl in the admin guide, following the same format as panic_on_unrecovered_nmi. Signed-off-by: Breno Leitao --- Documentation/admin-guide/sysctl/vm.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-= guide/sysctl/vm.rst index 97e12359775c..a811f503bca6 100644 --- a/Documentation/admin-guide/sysctl/vm.rst +++ b/Documentation/admin-guide/sysctl/vm.rst @@ -67,6 +67,7 @@ Currently, these files are in /proc/sys/vm: - page-cluster - page_lock_unfairness - panic_on_oom +- panic_on_unrecoverable_memory_failure - percpu_pagelist_high_fraction - stat_interval - stat_refresh @@ -925,6 +926,32 @@ panic_on_oom=3D2+kdump gives you very strong tool to i= nvestigate why oom happens. You can get snapshot. =20 =20 +panic_on_unrecoverable_memory_failure +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +When a hardware memory error (e.g. multi-bit ECC) hits an in-use kernel +page that cannot be recovered by the memory failure handler, the default +behaviour is to ignore the error and continue operation. This is +dangerous because the corrupted data remains accessible to the kernel, +risking silent data corruption or a delayed crash when the poisoned +memory is next accessed. + +Pages that reach this path include slab objects (dentry cache, inode +cache, etc.), page tables, kernel stacks, and other kernel allocations +that lack the reverse mapping needed to isolate all references. + +For many environments it is preferable to panic immediately with a clean +crash dump that captures the original error context, rather than to +continue and face a random crash later whose cause is difficult to +diagnose. + +=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +0 Try to continue operation (default). +1 Panic immediately. If the ``panic`` sysctl is also non-zero then the + machine will be rebooted. +=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + + percpu_pagelist_high_fraction =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =20 --=20 2.52.0