Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3562193iog; Tue, 21 Jun 2022 01:00:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vCfsOTdCyhQovETydDGOfrl1LYEROGiGr8aY0bt1lEJDD8JR3xwiny6YovzDWLapTo+G5d X-Received: by 2002:aa7:c801:0:b0:435:5a08:f54c with SMTP id a1-20020aa7c801000000b004355a08f54cmr28317818edt.254.1655798421028; Tue, 21 Jun 2022 01:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655798421; cv=none; d=google.com; s=arc-20160816; b=XNNqylpxmBdH0a612o/a8JiTKEFRGsoqwsCGNy8R/6RruUG1LVRzpFD1McfVmoDhOG wztuNGZnDv7oDMNwxSAGhTfi7iSeODR364SDpSRr9G33j4gZeeDY3wEXf1hl8JyGmwFH ZkMQYtMKu6bQMAxSVZMkMJNLMZojkDpaXEPZFBE4PsMkPQO67AoI/ktoO/N7tUKdtOtA upVb+CHuZr9pSojeT+AfWTc8XKC+d4PpkS7WbCOQ9y9i3CI/Toj9ekskRsDrbxYNiAH8 A6ouxPtFmyr/KoGuuzGVhpKEVyZ4rydPsbWmA4VJYk7WGugQLmzPVZ8+8aeXCQN4TnIF l3Tg== 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=HdlrVZZsCU3nJLLlEDmn8G4MySTyh6XW6hdpFMOs2l8rixk4tPkUnrP6x5T+6c8gp2 UpQbmHRIMJTCrdkLzABA5DEkxktOlpTPxP02ZS+XbLip96OK/4dHhDJVSrjhbcsMu5NK AwNtE1nnhWPvth3kSPqOLPs/OLvrpTjNzzSKyX5k12HyuDDcAp5QC+0/glyjes9Pwhia BYGwZCNl+6P0Nl19wGkQqwuTA1QkdmRqG+zIn0cFl90WJvHSpL/tBOHQqXXbLUWyodRT YlSRm7HYZAsRQMnHFNJofjyjfHEgpmCLhliYIgI3uLf5O46sLFppe+7PKp+P5cz5TKZR GnMA== 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 dm19-20020a170907949300b006f4904880fbsi17099455ejc.338.2022.06.21.00.59.56; Tue, 21 Jun 2022 01:00:21 -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 S1347345AbiFUH2R (ORCPT + 99 others); Tue, 21 Jun 2022 03:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347327AbiFUH1q (ORCPT ); Tue, 21 Jun 2022 03:27:46 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DA2523BF3 for ; Tue, 21 Jun 2022 00:27:33 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LRyk25zkWzkWgY; Tue, 21 Jun 2022 15:26:18 +0800 (CST) Received: from kwepemm600017.china.huawei.com (7.193.23.234) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 21 Jun 2022 15:27:03 +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; Tue, 21 Jun 2022 15:27:01 +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 v6 09/10] arm64: add uaccess to machine check safe Date: Tue, 21 Jun 2022 07:26:37 +0000 Message-ID: <20220621072638.1273594-10-tongtiangen@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220621072638.1273594-1-tongtiangen@huawei.com> References: <20220621072638.1273594-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: dggems702-chm.china.huawei.com (10.3.19.179) 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