Message ID | 20230508014436.198717-4-tongtiangen@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 14538C77B75 for <linux-mm@archiver.kernel.org>; Mon, 8 May 2023 01:45:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B6D5B6B0080; Sun, 7 May 2023 21:45:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AF5DA6B0081; Sun, 7 May 2023 21:45:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D3986B0082; Sun, 7 May 2023 21:45:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 7CA406B0080 for <linux-mm@kvack.org>; Sun, 7 May 2023 21:45:03 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 3EB4C14075F for <linux-mm@kvack.org>; Mon, 8 May 2023 01:45:03 +0000 (UTC) X-FDA: 80765394486.14.622F57A Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf02.hostedemail.com (Postfix) with ESMTP id 199CF80005 for <linux-mm@kvack.org>; Mon, 8 May 2023 01:45:00 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; spf=pass (imf02.hostedemail.com: domain of tongtiangen@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=tongtiangen@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683510301; 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=BNzaMLmT/fOSvwJsmb5uKyh0qMThOxpDTIW90fWaaZ0=; b=N5vBtB6149z1obKEvRnldv6l4w/zkPJXDHGdtt0yxc+WWRtSuCZrGboRAHgXs/hd6Nq8Ek s6/JksIi082sxwS7U6GUiWr35VEhYThugnX+T/AZRorcOYAwXPcFWzBAUc+PrV9FS26hXc M8FdAf/Hcx5wmP941FXSyoCvpywMZgI= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; spf=pass (imf02.hostedemail.com: domain of tongtiangen@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=tongtiangen@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683510301; a=rsa-sha256; cv=none; b=204s2pfRsPT2QMRI9AsN24qCjyDNPbAHjFpCkVo4dPmm5bOUO/qzNPBnmZGSAOpORj3GFa kAnNqYfJUyV/Iu9uSMxSlJ/6e0CEXdGHnQdV7wGOHgBMNTFsEoQwi37OO7YdAjT4CP6jLm jZJEnfT+fRY8YObmygPK/5w7K2q5tmo= 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 <tongtiangen@huawei.com> To: Catalin Marinas <catalin.marinas@arm.com>, 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>, 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 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: 8bit Content-Type: text/plain 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-Stat-Signature: apqbxaxh6irkchx8j7ohwawcgnuu5ojp X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 199CF80005 X-Rspam-User: X-HE-Tag: 1683510300-142629 X-HE-Meta: U2FsdGVkX19nQ+FzZLffhQ85u6LTzdu1DoIDXNu0ggMjSJIckLCPEJ/VjEYOMm8w7kuH/2EUCO/aMF9iC7k5dDgFLpwCRdmAvP/u/NuTH48nz71Qbk8i8B3Yw5dBtZUcGNzAVVKxFRtMojGARYfB88hzgHeScglw1aW7q+tYuMNqwRM2y8utt20k8v1z8S6NUCDCJFXuL58k2D3smuY9o7bsxgUhiT0+s6zt3icrKDvPt7/sTVGA2mwS5YgFH89oRtPl6QO/XstakIa/Be45EfjS7L2fLlZ+9B2CXXYPjFOmvPV8RXJHgvgKWtCCDzIOYe98NZ8RK0idPjM9q6U+jX6i/gG8XffBWFatMXKWtzP3hRs9EsL3hguge12g2LADPhyGm0pTkXNpBUZibz5zghml4caqbgi0EGlpK9TgrjXekG4YXtNhiSUyHeaOxSignNenjbn4x9XnAmQZf4SQLTv9Gkuwtxf17jzdXvuhK/BbLlperuUjtdyNrFRmEWWF/da5KdrNhP6LS/NUxvcxULMIhzuiTkK2TM+WEFFHuCnOiYI2H3/N9cdKOOIc/9W5J1djHMlxIi14kL4xhIswt4i0IyNjlHmubgsSV0bRZ1kvyvVCkFhiFwwZBs1Jrejf087ibw8gG6z3UpmE/IzBfwlNg0wP3PnlGVrZXaANh0tqkewiYuvJO6F4M+WwElHW7XKJhCtJLIVJ5KawLEYr3j4M1PZEcS8fgm2GpuJ5CT8nwM4Id+yRWi6SaeNiuFVmxtpiY9NLyxvZRRx8HrUfgToNlPyoGLHGaV6nUCWuMxo2Dlz9a84v99nPKSG8p/GI2tmTUznvrJxo7no86K4azbQFor7+PzWfEsmbg7znbD6dK5gQtG2vTEthbJ7/+zeRyYCDoevXX8Q6rehuN1Fz3qxurmIMSsjMqEj/W2bKvId6jFZnzr/phj97zycivMkgFLupzOzlhv8vcb3sXYA VFjCaid/ n84kpLFir9xYw4VluVfmeFyhCxheGOOmOAswhZhlC8O6cSKnc5aAHTftke3YIM9iPno9J5sfVyPTdzdCIiLF/0A1d+9FJYKBFpbmsmDml/jq8CPd+rZbVEEf2kiwU1H9746fBvkGrkCfkZAX74FjFxxMrheBWD0JdzrZvEfkcpajfruw= 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: <linux-mm.kvack.org> |
Series |
arm64: add machine check safe support
|
expand
|
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; }
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 <tongtiangen@huawei.com> --- arch/arm64/mm/extable.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)