Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1449376rwb; Fri, 12 Aug 2022 00:42:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR4GcfsjHXMmXlTQzSFja4oxHw7kPx1UxxywikCkLc6UUYfkI8vFb3hKyESK/xQ4agsIaMrP X-Received: by 2002:a63:f941:0:b0:41b:ff8a:df69 with SMTP id q1-20020a63f941000000b0041bff8adf69mr2158699pgk.554.1660290179426; Fri, 12 Aug 2022 00:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660290179; cv=none; d=google.com; s=arc-20160816; b=tacVXnfF3z4b+DrLIyL5qioLOepFoZBX4xOtKBLgkwRSq0IAxFhA8ff6bxc3ZPbEoE FCAmR07sZ2TQMc6/MSA2dMCxrcaN52pxlNvvhcFFc8LR9geAZZM9tAfwTwbliSqITbCW uaPSmcSnnEh0BbJOLeRP9XV9KgUl+8HtQoNdeZUgPj65iasYeA0U8PlsMo2weATmMAb5 qJzrze1WQl65/vXrXoTZKKUMib8pMy3ptaDKjO3teivu8AoiDAwxxuade0FOr1kkaKfl O8Se6/tqnXObJE2nGNoKbUtZSZHtTjKqZj+Vu1FRVyNUAyGdLa+bduK1Oxfc4mDgCi81 HS8A== 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=jQKhpRFZYNSMJJ68eyFcWrh5PEMv/jS/d7zTq+MXzzs=; b=QeFaWQMajPusm+lkYsR85fs1n8P0UXU12w+bRtFGPe/NDkEDRHHEcS1I/cWz98cyp7 KcDmwDpbbbbjV73rBuO+kXZ3SPwmiSi13NuMnJtHQYTztsHaUNhVWw/NUYWDDp3qBTkN hSp5ymQUTnVr0pSTl3X9Pq5CP//SVu7Dkup15Adgoug+CxU7sZ9BA92ik4C85ngQpf0q NmqI5kGjSNS/WjlfUKjE5O8YpWf4OZw1aXYi16Mh7E5c+mI/GbWh89YYGx4KCvKMiJUh MUZQyFMlD16WJu5kXeok/wf+a0fZzg2unm6/jBpMGfLHxCGkDpNZ7UJFTpfbD93FyfC0 Nu7Q== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a170902f78b00b0016eeceac054si1604281pln.138.2022.08.12.00.42.44; Fri, 12 Aug 2022 00:42:59 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231627AbiHLHGm (ORCPT + 99 others); Fri, 12 Aug 2022 03:06:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237169AbiHLHGc (ORCPT ); Fri, 12 Aug 2022 03:06:32 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BACE874DE9 for ; Fri, 12 Aug 2022 00:06:29 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4M3vll1wdMzlVjx; Fri, 12 Aug 2022 15:03:31 +0800 (CST) Received: from kwepemm600017.china.huawei.com (7.193.23.234) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 12 Aug 2022 15:06:27 +0800 Received: from localhost.localdomain (10.175.112.125) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 12 Aug 2022 15:06:25 +0800 From: Tong Tiangen To: Mark Rutland , James Morse , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Robin Murphy , Dave Hansen , Catalin Marinas , Will Deacon , Alexander Viro , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , , "H . Peter Anvin" CC: , , , , Kefeng Wang , Xie XiuQi , Guohanjun , Tong Tiangen Subject: [PATCH -next v7 3/4] arm64: add uaccess to machine check safe Date: Fri, 12 Aug 2022 07:05:56 +0000 Message-ID: <20220812070557.1028499-4-tongtiangen@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220812070557.1028499-1-tongtiangen@huawei.com> References: <20220812070557.1028499-1-tongtiangen@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600017.china.huawei.com (7.193.23.234) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 If user access fail due to hardware memory error, only the relevant processes are affected, so killing the user process and isolate the error page with hardware memory errors is a more reasonable choice than kernel panic. Signed-off-by: Tong Tiangen --- arch/arm64/mm/extable.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/mm/extable.c b/arch/arm64/mm/extable.c index 478e639f8680..28ec35e3d210 100644 --- a/arch/arm64/mm/extable.c +++ b/arch/arm64/mm/extable.c @@ -85,10 +85,10 @@ bool fixup_exception_mc(struct pt_regs *regs) if (!ex) return false; - /* - * This is not complete, More Machine check safe extable type can - * be processed here. - */ + switch (ex->type) { + case EX_TYPE_UACCESS_ERR_ZERO: + return ex_handler_uaccess_err_zero(ex, regs); + } return false; } -- 2.25.1