From patchwork Tue Jun 6 07:42:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuai Xue X-Patchwork-Id: 10336 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3218922vqr; Tue, 6 Jun 2023 00:53:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6bTWC5w1C0nnPQ2nKJmiRapaAlXIbRo+dJRXEC9AnBo2wVhDYIeiZOuACaqrmhetdaL67y X-Received: by 2002:a05:6a21:788d:b0:116:d935:f74b with SMTP id bf13-20020a056a21788d00b00116d935f74bmr5514740pzc.10.1686038013956; Tue, 06 Jun 2023 00:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686038013; cv=none; d=google.com; s=arc-20160816; b=d4y3IcuBakm41PPK/71owmGuM2iThIrYav5ZQoapyOWbmhK94B9DhYxWnJrnH3o1wl x/dtuVAztnoTI7lrh9QLKkztFiT2kiUgmIXIKiMmfeu7N1mELsBKw4fQFaxmD0c7F5XD aroOYddyYRKDpybU6H/UhlGiFyjMj5UmT5BAQiAHD9tt6wEN6IRXl5fIuoH8+1EervmE 0njllrlzbjjvrWYyb0uxCNF4hRhb8YfxIUX+BuHAIqfw4VMEs9Gtz5xf1KpfJGGRgZi7 MjySzp7MEe1q41o3cndizzmvcVtNs5QLcDoSeZAd7U2J9x52Hl+JdKtyGdO4gTHad4MZ JBgA== 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 :message-id:date:subject:cc:to:from; bh=0po/W5hxQ08oMSmi5aTJZlO5dUaRUGix3FQ8WcZKOck=; b=VhSb+54l5u0tFKQ2XYyBGoTCQeCIFH3yll2t4Y359c7Uqw5G+ExYJyanIsgKYlCGaU 2w7286fXigUlgchtVe0UW5K5YiY3FGsIP73HkZhWJU6TeENd8uY7RJiyCkJ/gMtwt4eW V8fmr9sWuC6NUkvzSuQy6Lj5gjyby/h0dzNM5E8hpp9okDvjFztn8aUQe3GTm40QYV80 qaaSQefy+GhWagcTmWh6NnASIIodfYbb9ybbF4l7IhjPRXDUyrDkhZfbQNQwCBjhTaQd yLbwLwY7HdvXVzK3om2teWM7q3pqvv4F46wckNop3vzbNEvrTb67fg+mLEisodrbZNdz H9Zg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j189-20020a636ec6000000b0051423af249fsi7011332pgc.304.2023.06.06.00.53.21; Tue, 06 Jun 2023 00:53:33 -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 S235343AbjFFHqs (ORCPT + 99 others); Tue, 6 Jun 2023 03:46:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237047AbjFFHpG (ORCPT ); Tue, 6 Jun 2023 03:45:06 -0400 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6969E1FDE; Tue, 6 Jun 2023 00:42:50 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=25;SR=0;TI=SMTPD_---0VkVSyB5_1686037362; Received: from localhost.localdomain(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0VkVSyB5_1686037362) by smtp.aliyun-inc.com; Tue, 06 Jun 2023 15:42:45 +0800 From: Shuai Xue To: rafael@kernel.org, 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, xiexiuqi@huawei.com, zhuo.song@linux.alibaba.com Subject: [RESEND PATCH v7 0/2] ACPI: APEI: handle synchronous exceptions with proper si_code Date: Tue, 6 Jun 2023 15:42:36 +0800 Message-Id: <20230606074238.97166-1-xueshuai@linux.alibaba.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767938996024079719?= X-GMAIL-MSGID: =?utf-8?q?1767938996024079719?= changes since v6: - add more explicty error message suggested by Xiaofei - pick up reviewed-by tag from Xiaofei - pick up internal reviewed-by tag from Baolin 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 - pick up reviewed-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 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 | 9 +-- drivers/acpi/apei/ghes.c | 113 ++++++++++++++++++++++----------- include/acpi/ghes.h | 3 - mm/memory-failure.c | 17 +---- 4 files changed, 79 insertions(+), 63 deletions(-)