Message ID | 20221219120008.3818828-4-tongtiangen@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2346847wrn; Mon, 19 Dec 2022 04:08:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXuTlGF8GNQDpDp4uPNOthVtCOwExP3hwsz7B+wnD04Dhql9/E5t0bIU0FTdgESxhNRHN6gx X-Received: by 2002:a05:6a20:1b20:b0:af:9dda:b033 with SMTP id ch32-20020a056a201b2000b000af9ddab033mr16518117pzb.37.1671451693541; Mon, 19 Dec 2022 04:08:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671451693; cv=none; d=google.com; s=arc-20160816; b=rxGsgLWlLkpqXmJNyu3xOM0QYO+x7uhDDUcM/qaq2qIUonTECZavpqm9Hryjqo5S90 vnoH+tHeCvB2VHrCBP6+psMsiuggwXOXCp2S3KPNRSpBluyNvl1J5YFFgfEsaQuY9kme Gu8bqq3vgufKAiAOHANQ9OezBGN88QNjLdgYzTY7Z/QWb+FR01IbzOEXwn7v/FTUAh0p 4TSZvLzZOu/WO7+rnHiF6xS4S+OGssq8YBhuxtWyV+vS10pZHZM/WxLLGEKTojN6Aldd Zj7N7ib+lEZ18cnvDszQ1TjtASfxZ143AtuZ6agt6LyMtxrSznktojQ8QAnajEV4cznI T/Vw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r33-20020a632061000000b004404162e5e0si10190109pgm.593.2022.12.19.04.08.00; Mon, 19 Dec 2022 04:08:13 -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 <rfc822;peekingduck44@gmail.com> + 99 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <tongtiangen@huawei.com> To: Mark Rutland <mark.rutland@arm.com>, James Morse <james.morse@arm.com>, Andrew Morton <akpm@linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Robin Murphy <robin.murphy@arm.com>, Dave Hansen <dave.hansen@linux.intel.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Alexander Viro <viro@zeniv.linux.org.uk>, <x86@kernel.org>, "H . Peter Anvin" <hpa@zytor.com> CC: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>, Kefeng Wang <wangkefeng.wang@huawei.com>, Guohanjun <guohanjun@huawei.com>, Xie XiuQi <xiexiuqi@huawei.com>, Tong Tiangen <tongtiangen@huawei.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752644130736252325?= X-GMAIL-MSGID: =?utf-8?q?1752644130736252325?= |
Series | arm64: add machine check safe support | |
Commit Message
Tong Tiangen
Dec. 19, 2022, noon UTC
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 <tongtiangen@huawei.com>
---
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; }