From patchwork Mon Dec 19 12:00:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tong Tiangen X-Patchwork-Id: 13076504 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61D33C4332F for ; Mon, 19 Dec 2022 12:00:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D660D8E0006; Mon, 19 Dec 2022 07:00:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D1C188E0001; Mon, 19 Dec 2022 07:00:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C04868E0006; Mon, 19 Dec 2022 07:00:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B1C658E0001 for ; Mon, 19 Dec 2022 07:00:52 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7F20F80AD9 for ; Mon, 19 Dec 2022 12:00:52 +0000 (UTC) X-FDA: 80258914344.19.8FBB4C6 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf19.hostedemail.com (Postfix) with ESMTP id 3E9F91A0020 for ; Mon, 19 Dec 2022 12:00:48 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf19.hostedemail.com: domain of tongtiangen@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=tongtiangen@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671451249; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jQKhpRFZYNSMJJ68eyFcWrh5PEMv/jS/d7zTq+MXzzs=; b=1KAewVtpfG+IrezvbUPfGqkmvyq9oLs258WNNraCCKFMrulpyJA9M3O32stHDDzRcgJS8t gpHFX02ew17i1n8dScTI1YRTslrL6YZwYeiE7oQStUnXN0GTRGr341vlPEx7Vt6rwqzzO9 TcKs57BV2jufdq3+4VLAPge+it3wQck= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf19.hostedemail.com: domain of tongtiangen@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=tongtiangen@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671451249; a=rsa-sha256; cv=none; b=t361qP3fGRtQBkrLVNSjOaPS61S5vCcGxxh156PZOa+Yjq2FKLPTZ7RzK3g0iBAmDlZRJO xVU+jFWPaspneadz6mE/T4p+1ds8dz779Gh5DFY92xHc/Xj8tTFhnggTKb+8fOk8w7RP9v +t1eeBxRckQQR2oC3nXOg4CNGFQPVn4= 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 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-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 3E9F91A0020 X-Rspam-User: X-Stat-Signature: yqa7rquj6hhaj8ce9cc8gacksjikzeph X-HE-Tag: 1671451248-981715 X-HE-Meta: U2FsdGVkX18Qtef6WRU5YhFY4ucVBWzyD5/k86EzhYYOjtJexMNi1bD+7l894sO9NVweHwNXPPM2ak3Sp5RBVWpWpxePitGMmL/d4Nu5WknPCG0tGr+oVNfkLYRTy6NVldXLrkata5FqRkBhcsowj4/zS4PJ56VNxrndxo+wNLFfZXSjuyxNc/pvjb6Irv0zr2OJFV7BGaATKeBZlJoIB2A5U62NWmlAnPcGFybw3fwivyPnprN+VZPsU8VDKkrgUTIYmtaQI1qT9M4Ts7sWhHJreQ4U/ZQA1AwLYhW8ghfvSgIJHxmlHU9VjgMq9xtF6iluTWJqbGCFeatgEcVyDtvWuNM0AkMv0BjohvuEqhhJK5ZmaGWpclfVYo3GWa8AqW6Vth4/C0KtLCKrZoj0BjahQ758OKIyt60EtkcRDWKwVfr6ghv8qv4KJ4lwJvlmubszxjerdePdHIMTjJDJZwbsRDmfnZhmN91i+x/ZJOxDadn9Mx82Gsq0MojghEMVtHayulyq3fdiC2dYPW8RiQQmAHz/psxV6Dju4jTY/XRme3cISYx6YPjAlXYhNpVEEF0aH1c0qsnLv+KLj6SUpy8vJMIKCTinuO0xwcdUC6jNybDSXjKqFY2vKK6Wj/KI23LM9HWVLqbBelII2Xg/zWdwMUj5b0kYhHqJAc1tSGCDagLrM08BtlFxXUhvO6eeX6UfRFsX+hsnN+kVGFaKLpulb/KRhFc5KA4ExA7z8PNNw2/WDInXXP+sKP3ogVbF4KbNsB25OTTQ3gvGzbnulxHkjBnwY4qwwDzG0W4yY/ZU51E19hlVmZ+L+qr15v8R869WQ9nfFDYo+bbLLpvrtuLyLxyPsppJH5eC7lhbWJU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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; }