Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp803295rwl; Wed, 12 Apr 2023 04:30:12 -0700 (PDT) X-Google-Smtp-Source: AKy350YS4XHzGjgwbYWKTiEkU14/8stYrCq98jt4Ij9GsN2vmdE5zkC3r74omyyqs/XVfZEfTQNl X-Received: by 2002:a17:907:3e0e:b0:94a:68dc:1c7b with SMTP id hp14-20020a1709073e0e00b0094a68dc1c7bmr13609502ejc.70.1681299012588; Wed, 12 Apr 2023 04:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681299012; cv=none; d=google.com; s=arc-20160816; b=LTmYXRXcfXkpt1V9NB1ySnO7xlKruE5fg3KL6IsPgmd8lWBFvzKveFsxtM5wXqziw2 sKGTCV7HRNCps2z2aFPKkNH7+KKYgHsy4oPjOE9OJygK9yERbi86NScnVxIYNDVmY424 HKlBR17RJRVZ9x1WgBTPpTD1rOUCSBJFu+lHU1MOtAL27tXAXxmTu/IZXjRuDK2B6+Oj Bx559/Pt9GAKckGiftFdnrH0qoPzq5Y2j1//BHOGkHtkNPl3mG2SviS/YnULe3hjQLDO gKaNA3DnfNj2KJj9/v0AbQgNocznXs93hIPK8SmwDeYAWeeDVv6MosdPHzn00ZxirIL0 JmCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=NOzGlxBKpqh5szBrgPlCJBORov5mOrXTxLoiyhhTKYg=; b=jr9KkeGGiX36lna1T1TAsGx/MB1AwOMBijpmx3BTmcUb6epnN2yceFtK+KOab1cZFE S3KVPBF4hFM3XVzwn0uw9hJ5u0U4uL59BLUA7B4HbZeeYOkW4WevtDQK5WG3DEIiqnLF JsSfqun6AOqHtyOxlr7i2IcLunCSlTYUf9OevRlc5bEmCpuWzS/pQ/tLO8rl7PLk+ryZ uyZX4cFDoW8I6Sb0/tBME9gIklEOhRD0LtM61B5FIP4mYuUi5F1tJ6ailFO+6lNWV6dg kDi8HKKJXiHHpjAwXs6apQw3bfMG8rhWEdq6RfTt1pg7cZ+fTo2Kvr8pS7Iu2aIEd4QK EpOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu1-20020a170906a14100b009477c35b25asi858879ejb.506.2023.04.12.04.29.46; Wed, 12 Apr 2023 04:30:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231510AbjDLL3P (ORCPT + 99 others); Wed, 12 Apr 2023 07:29:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231496AbjDLL2o (ORCPT ); Wed, 12 Apr 2023 07:28:44 -0400 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60FE37A87; Wed, 12 Apr 2023 04:28:11 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R461e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=25;SR=0;TI=SMTPD_---0VfwGyeS_1681298883; Received: from localhost.localdomain(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0VfwGyeS_1681298883) by smtp.aliyun-inc.com; Wed, 12 Apr 2023 19:28:06 +0800 From: Shuai Xue To: wangkefeng.wang@huawei.com, tanxiaofei@huawei.com, mawupeng1@huawei.com, tony.luck@intel.com, naoya.horiguchi@nec.com Cc: linux-acpi@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, xueshuai@linux.alibaba.com, justin.he@arm.com, akpm@linux-foundation.org, ardb@kernel.org, ashish.kalra@amd.com, baolin.wang@linux.alibaba.com, bp@alien8.de, cuibixuan@linux.alibaba.com, dave.hansen@linux.intel.com, james.morse@arm.com, jarkko@kernel.org, lenb@kernel.org, linmiaohe@huawei.com, lvying6@huawei.com, rafael@kernel.org, xiexiuqi@huawei.com, zhuo.song@linux.alibaba.com Subject: [PATCH v6 0/2] ACPI: APEI: handle synchronous exceptions with proper si_code Date: Wed, 12 Apr 2023 19:27:59 +0800 Message-Id: <20230412112801.21831-1-xueshuai@linux.alibaba.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221027042445.60108-1-xueshuai@linux.alibaba.com> References: <20221027042445.60108-1-xueshuai@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org changes since v5 by addressing comments from Kefeng: - document return value of memory_failure() - drop redundant comments in call site of memory_failure() - make ghes_do_proc void and handle abnormal case within it - pickup review-by tag from Kefeng Wang changes since v4 by addressing comments from Xiaofei: - do a force kill only for abnormal sync errors changes since v3 by addressing comments from Xiaofei: - do a force kill for abnormal memory failure error such as invalid PA, unexpected severity, OOM, etc - pcik up tested-by tag from Ma Wupeng changes since v2 by addressing comments from Naoya: - rename mce_task_work to sync_task_work - drop ACPI_HEST_NOTIFY_MCE case in is_hest_sync_notify() - add steps to reproduce this problem in cover letter - Link: https://lore.kernel.org/lkml/1aa0ca90-d44c-aa99-1e2d-bd2ae610b088@linux.alibaba.com/ changes since v1: - synchronous events by notify type - Link: https://lore.kernel.org/lkml/20221206153354.92394-3-xueshuai@linux.alibaba.com/ Shuai Xue (2): ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events ACPI: APEI: handle synchronous exceptions in task work arch/x86/kernel/cpu/mce/core.c | 7 --- drivers/acpi/apei/ghes.c | 111 ++++++++++++++++++++++----------- include/acpi/ghes.h | 3 - mm/memory-failure.c | 17 +---- 4 files changed, 76 insertions(+), 62 deletions(-) -- 2.20.1.12.g72788fdb