From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (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 1140335C6BB for ; Thu, 13 Aug 2026 12:08:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786622896; cv=none; b=Mg0GSdtN2wku4gd6zRXTaG9/tLj07JT0AtkrDNt268ta2iXBW9Gk5A3jFtV+tvUhoHV+RhQtZpy8rADju9S5Z2MaHa7Mydo4gHTFIG1hwJfWOiGVi9rKkKgxIjII96+5Wdo6fVbDUk7xK/AdnqLEZ/fgtgqzawpjQ7ueHffzYS8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786622896; c=relaxed/simple; bh=MDhElMVfgmsSA1NlzeD2sqx/jRjk02NamYCBg+nfDZg=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=KJb+fgMXBtzqxoKKpaC7ugz3POecmsJMb3KFbsQn13SuiFsyS6BoIlnaPA1pQAo8affppLGFsh0ZkbnRLwVsObANTAMbRi/bXw8FIg9Kyd/WcfUF4cS7gePe0lAbcYU/boqlWxrJS7uhcwL/8+kvX0WjbIxeLOxFebb/dPKf3y4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=Y6nFriUl; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=Y6nFriUl; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="Y6nFriUl"; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="Y6nFriUl" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=p1IaZrga3tw+zONAd1nRt5CILnuvdDUAsSC4l66metY=; b=Y6nFriUl7iEGi1LAFfjTAi2eUReE2M7/qodq2/k1YBqphUx+JMJ4DlhFiM9BMn+6WJfx6rX7N Bep3szryKzEhE9r6v83MExjQxeWQs3CXa/ne1tYK+hvudbwT5DZFTseB8vDVdLqPhJRktZhYV/b 6j3BiGtSIxOmFRlbX83fSzc= Received: from canpmsgout02.his.huawei.com (unknown [172.19.92.185]) by szxga04-in.huawei.com (SkyGuard) with ESMTPS id 4hLPHy07bsz126M09 for ; Thu, 13 Aug 2026 20:07:42 +0800 (CST) dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=p1IaZrga3tw+zONAd1nRt5CILnuvdDUAsSC4l66metY=; b=Y6nFriUl7iEGi1LAFfjTAi2eUReE2M7/qodq2/k1YBqphUx+JMJ4DlhFiM9BMn+6WJfx6rX7N Bep3szryKzEhE9r6v83MExjQxeWQs3CXa/ne1tYK+hvudbwT5DZFTseB8vDVdLqPhJRktZhYV/b 6j3BiGtSIxOmFRlbX83fSzc= Received: from mail.maildlp.com (unknown [172.19.163.0]) by canpmsgout02.his.huawei.com (SkyGuard) with ESMTPS id 4hLP4Y5tqbzcb0T; Thu, 13 Aug 2026 19:57:49 +0800 (CST) Received: from dggemv706-chm.china.huawei.com (unknown [10.3.19.33]) by mail.maildlp.com (Postfix) with ESMTPS id 1830340561; Thu, 13 Aug 2026 20:07:59 +0800 (CST) Received: from kwepemq500010.china.huawei.com (7.202.194.235) by dggemv706-chm.china.huawei.com (10.3.19.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 13 Aug 2026 20:07:58 +0800 Received: from [10.173.124.160] (10.173.124.160) by kwepemq500010.china.huawei.com (7.202.194.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 13 Aug 2026 20:07:57 +0800 Subject: Re: [PATCH v3] tools/mm: add hwpoison-panic tool To: Breno Leitao CC: SJ Park , , , , , Andrew Morton , "Naoya Horiguchi" , Paul Walmsley , "Palmer Dabbelt" , Albert Ou , "Alexandre Ghiti" , References: <20260813-memory_failure_rewrite_test-v3-1-f9fb6542cbff@debian.org> From: Miaohe Lin Message-ID: <2641f4d4-c08b-e9b2-1e8a-c91ce1f41d58@huawei.com> Date: Thu, 13 Aug 2026 20:07:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20260813-memory_failure_rewrite_test-v3-1-f9fb6542cbff@debian.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To kwepemq500010.china.huawei.com (7.202.194.235) On 2026/8/13 19:45, Breno Leitao wrote: > Add a tool that enables the vm.panic_on_unrecoverable_memory_failure > sysctl, picks a kernel-owned PFN and writes its physical address to > hard_offline_page. Three page kinds are selectable with -k: rodata > (default), slab or pgtable. In all cases the host should panic. > > Example: > > # ./hwpoison-panic -k slab --yes-panic-my-kernel > injecting hwpoison at phys 0x100032000 (pfn 0x100032, kind=slab) > expecting kernel panic: 'Memory failure: : unrecoverable page' > > In dmesg, you will see: > > Memory failure: 0x100032: unhandlable page. > Memory failure: 0x100032: recovery action for reserved kernel page: Ignored > Kernel panic - not syncing: Memory failure: 0x100032: unrecoverable page > > This lives in tools/mm rather than selftests/mm because every successful > run crashes the machine, which is not something to run from CI. > > The --yes-panic-my-kernel argument is required so an accidental > invocation does not take the box down. > > Signed-off-by: Breno Leitao Thanks for your update. LGTM. Reviewed-by: Miaohe Lin Thanks. .