Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2409298rwj; Mon, 19 Dec 2022 04:18:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf6WDP2vXP2zGJAVDfU/T2qqSY9HaxspHydJN1VBRXkDRlq9tBCVp0VummQd2t3vAXS1EBOd X-Received: by 2002:a05:6402:5486:b0:461:7ae:c244 with SMTP id fg6-20020a056402548600b0046107aec244mr34029294edb.35.1671452297433; Mon, 19 Dec 2022 04:18:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671452297; cv=none; d=google.com; s=arc-20160816; b=s1dq+5BKf9gS/oX7ZJQSxCyTkKevMfErOjJVEnnUOfjPLofcEMFLLm+fRbGCHaS++e 6DKku9ZJ/zcZ/LAEZVB5laB2K97G33k6kkCXzlGGi7oGvIGVbQ5k76joH4Tprb/XNCHL +khVDeQ9U/RYs5maAT8mndrHowgw+iFizYakdyuYpqHKXkHc0VVadg3nRBfrUjuL0RSK gXg18Xi1AzzU8N3ZOFd0K5an346TE/c0zCgozhFx1ULDFXSwf7WQINXihk/tnTiKGfQ3 Neeo4EeXeX7TevGmGnGbBb1lUwFeQ8V5JiP8Sb1rxvQPuPcf1TPM8Jyrffp7V8Og9Kfu SPOA== 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=Dr7YDJiVOoxEMA/97vuGlf3CkVYiM8MdgJ8jIktxGhtLK7VoEvlMZXC+BgKH5jbBvo kxuN4HkQjOQXHlwr1W358owJ65P0EnuaCROe+uvSiDT9OC3P3uG4WEwvw1bQPNdkAz6H adnFMWngbX/IBQ+Rn7uBhCTcOLzWkN+tpnNS46LdaXQpYhA+3+VS8CcLpN4Yb4qP+3I7 5jazo/LKIlLxMzNAuhtP93cPReeMgtqtThC+qd5ShPRLXhO6LQjwVFBl+CYEWe1Ppmty j1arQfJMZ5OjR+hunU4dGrGFPjZBgA0ng5MQEwrGlzKtwJe82mZs9PBu0lcGXKFwJG7q Iwyw== 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 l5-20020a170906794500b007adc8c49d83si9875580ejo.477.2022.12.19.04.17.59; Mon, 19 Dec 2022 04:18:17 -0800 (PST) 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 S232023AbiLSMCg (ORCPT + 70 others); Mon, 19 Dec 2022 07:02:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231809AbiLSMB1 (ORCPT ); Mon, 19 Dec 2022 07:01:27 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 744741091 for ; Mon, 19 Dec 2022 04:00:49 -0800 (PST) Received: from kwepemm600017.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NbJCw4NTTz16Lkj; Mon, 19 Dec 2022 19:59:40 +0800 (CST) Received: from ubuntu.huawei.com (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.34; Mon, 19 Dec 2022 20:00:44 +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 , , "H . Peter Anvin" CC: , , , Kefeng Wang , Guohanjun , Xie XiuQi , Tong Tiangen Subject: [PATCH -next v8 3/4] arm64: add uaccess to machine check safe Date: Mon, 19 Dec 2022 12:00:07 +0000 Message-ID: <20221219120008.3818828-4-tongtiangen@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221219120008.3818828-1-tongtiangen@huawei.com> References: <20221219120008.3818828-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: dggems706-chm.china.huawei.com (10.3.19.183) 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 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