Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3729361rwr; Sun, 7 May 2023 18:53:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7WjtfluIiHmk5DO3tnop1Ms8ZvsHQETJPgKuuAVVIEW9NX76XRzAGmLyDOFLHV3n1Soeuv X-Received: by 2002:a05:6a20:4658:b0:f6:2287:e05d with SMTP id eb24-20020a056a20465800b000f62287e05dmr8448315pzb.10.1683510792654; Sun, 07 May 2023 18:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683510792; cv=none; d=google.com; s=arc-20160816; b=SjkTviSWhq5qWgQYSgnnVHqJEk93Eibclzrx+Xb3IR1n2ilcwANGkMSFrcINloHLJF yI6mWHyypGjwtpLrfyU3WufJhLuu9csZZtMIOebEzPRIC++srf9xPiIaGeyYgtqIsVtS HWkifgz5CC7ZGIgYIs9By55CQPLtNVgTYl75uoBDF68yAX+bn4ZIUbnMJFSuLyX6a4qY P2Bz0Jl3ND72wen9CEH9e9tyITAR3u22b5lE5d7cKShW4Pw4rsm7pcUoIuT9z4HvGFar hS2W5zFDVkHVf98rZEcuRt8uyqAJwFai+IGINrYFNEFO68EJZWowaesANHFSu1l75DCz aA7w== 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=BNzaMLmT/fOSvwJsmb5uKyh0qMThOxpDTIW90fWaaZ0=; b=B7+aAasadJmS5f1oorphgznDCy3yv85Wnpby+bN3PV2r9Gqgtys6h29IKBgWq+qNS9 wiaN88J0r9YfSmNdDtj1o8evYF4wkHi55QMVG6+8icieJKPA9rTJu2cqdzSt9Gj11HqV NGzr5ltiPcFQZXZm7HJ3TEsIOH0I/asX23hVGoykgIzC0z6eAIrPRn9+QHv9/keQRfm/ 62ExQ00Wga86eqhzEjWLGnMzvT8+tYbs4uX5CFH6+IUoXywB86tjcBnXdDs4IdUshmFf r3oXTPyr181gUs1OCkNN2RMcur5vuDkNAll4B9tZM3v/9LU/+WH5Yh/TIUULN5jqPLEH 4g7A== 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 t29-20020a63955d000000b0051b578dfc51si7123772pgn.744.2023.05.07.18.52.51; Sun, 07 May 2023 18:53:12 -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 S232618AbjEHBpQ (ORCPT + 99 others); Sun, 7 May 2023 21:45:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232580AbjEHBpG (ORCPT ); Sun, 7 May 2023 21:45:06 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C016911D89 for ; Sun, 7 May 2023 18:44:59 -0700 (PDT) Received: from kwepemm600017.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QF3sF2GZSzpTRk; Mon, 8 May 2023 09:40:49 +0800 (CST) 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.2507.23; Mon, 8 May 2023 09:44:56 +0800 From: Tong Tiangen To: Catalin Marinas , Mark Rutland , James Morse , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Robin Murphy , Dave Hansen , Will Deacon , Alexander Viro , , "H . Peter Anvin" CC: , , , Kefeng Wang , Guohanjun , Xie XiuQi , Tong Tiangen Subject: [PATCH -next v9 3/5] arm64: add uaccess to machine check safe Date: Mon, 8 May 2023 09:44:34 +0800 Message-ID: <20230508014436.198717-4-tongtiangen@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230508014436.198717-1-tongtiangen@huawei.com> References: <20230508014436.198717-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: dggems705-chm.china.huawei.com (10.3.19.182) 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 process access memory fails due to hardware memory error, only the relevant processes are affected, so it is more reasonable to kill the user process and isolate the corrupt page than to panic the kernel. 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