From patchwork Thu Apr 11 13:09:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13625900 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 9C2CDCD128A for ; Thu, 11 Apr 2024 12:42:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6602D6B009A; Thu, 11 Apr 2024 08:42:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 61C816B009B; Thu, 11 Apr 2024 08:42:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4FB7F6B009B; Thu, 11 Apr 2024 08:42:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 347946B0099 for ; Thu, 11 Apr 2024 08:42:15 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E70531C0F49 for ; Thu, 11 Apr 2024 12:42:14 +0000 (UTC) X-FDA: 81997213788.27.877C77B Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf22.hostedemail.com (Postfix) with ESMTP id D957AC000A for ; Thu, 11 Apr 2024 12:42:11 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712839332; 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: references; bh=RCotY5OMGm0KIiN8/uBSU9NS4605rv46Tmg+uQ0CWOs=; b=B8VHdmTBhMTnCmvVzCcsrP5ywp1f2Xulmdgx3Yfba226YIHledSuUV84qiW1W3EHAaA2Md 5c2Q7t8bNs6ecLp0fcTsxoJzzKR20DAubj36Osx5p4qGj56GEJkapxYGQ3X8RER5nUaQH4 ZXFxt+LZYKKbjfsJtOSYjspJ2AQLHpY= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712839332; a=rsa-sha256; cv=none; b=5D+fYowkWb9ypAJgn/eNa54wDEah13MRzZJDgFjbA/siYwMUub3EL1dK+8adJHxCXUWTgM LrqMhZQtf/rSb1zNowKdgzXTTI0viYBfd9EoxwSRGlj4KGuva9BXPkoprOnEGWmQeNA9Gi VceMLPZnURm0uO5ar50MOp040jcHeY8= Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4VFfQV5s4Yz2NW5x; Thu, 11 Apr 2024 20:39:14 +0800 (CST) Received: from dggpemm100001.china.huawei.com (unknown [7.185.36.93]) by mail.maildlp.com (Postfix) with ESMTPS id 7AEBA18001A; Thu, 11 Apr 2024 20:42:07 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 11 Apr 2024 20:42:06 +0800 From: Kefeng Wang To: Andrew Morton , Russell King , Catalin Marinas CC: Will Deacon , , , Cristian Marussi , Mark Brown , Aishwarya TCV , Kefeng Wang Subject: [PATCH v2 0/2] mm: remove arch's private VM_FAULT_BADMAP/BADACCESS Date: Thu, 11 Apr 2024 21:09:23 +0800 Message-ID: <20240411130925.73281-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-Rspamd-Queue-Id: D957AC000A X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 4iyu4mqtocsd4wkkzoh8r4ew3ggs61sx X-HE-Tag: 1712839331-33090 X-HE-Meta: U2FsdGVkX19HH0fObHAf/FQHOu8/Qm54/s6fX9qG1tlM8BaQfdOO040ApHM/Ze1/2xSozlVxsjaMwZdc5lNgFKBi72OYZxDIleWsrIR68ell2/8VWHBP0+1dtAmttqiOEqeLmUj/Y59BOLzhV3LimlbBTlsKwdCzF1CPeJXpTv8Hczw+RrQLdA0as8cuvr5ySSJC30FOtAMw//Ost8Mc5zRGORJELCWAo1LniZEjI4ivAFYbBBnVbkq36GfW961tXQw8rx5Ig6VynTm2Wb+C1a4nQwN43yTqwA/gRHcRaPvwbdLmnY9UmIjnCkoDeDrO++TAGtc4Fkuhci1BoMJwc7ULIpOt5uQJzqTCzuQ1ggtUvsHAILj0XH0kZbJjOZr+cJOWiurn4FuNhFje1tiDM5it5cGKKL8DjmAQnBXGGle6CUvivO7roCBA1mkSxjIxbLWMLHSwGT255SNonVf1072uA+o8UjtAjN6oBVCbam24eLkpqL9VV2lmOAztyLYibBWZqtBGFoa9GbXR8UkHG2WfNwxUozG5pmxLjZV8XAjN6jG4eGXRxWuOHmEYC1JIHvGb9H34z8+FVO+6B+8148YtW76IAvU3v0AmJXvHPjegjGNnx3d2LqNvPTZafy8j9AqDa9xmmjMhe4Q/gzUk5DXCiZ5GVk0JmCzPRVfqaZbnA3bht84JP+DCCTkMU3Ajem8AQkW1AwHedFDeKxoUCCQZdqQOo9WGUz/8RyiAzoFHmO36ixCHxw1QzKM39fEAMzuyomILPQh6SRUn2LLxO73wADRWaaHhtFn5pVIk84rsnTd8rEIJRMuP/ZsjLIVKPpl6prW0QyFlSmwRrtN9UtJheGf9e5WQ3OxBxu9gD50IxH11OmkwXyRsXhZJhghdAnFzOuSLENaUkxn0eyjWrmZ8WIKRiSjhqAWHB0zaBB9jadPgMn0Swk6C4P1xm0WOPl3DeGgenTPetO6tncZ vO/AdZby agP6PuvcpWzPPOKLZtb5UfN60Td61zO6Rkuf8OqsxhcyzOC0QxvCyMeSHpEB4sKdORWSWBycL/e+GWM9q5yhIOm3mtJAHVprHQDs50U+wNg8rwKhwFqesAZSGURNlNMYsCbEMfOdbVf+YNv/QYESLFsf09jw3xs53yPyy 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: List-Subscribe: List-Unsubscribe: Directly set SEGV_MAPRR or SEGV_ACCERR for arm/arm64 to remove the last two arch's private vm_fault reasons. v2: - fix unbalanced mmap lock and set si_code to SEGV_MAPERR by default before error handling, which also fix ltp fail reported by Aishwarya Kefeng Wang (2): arm64: mm: drop VM_FAULT_BADMAP/VM_FAULT_BADACCESS arm: mm: drop VM_FAULT_BADMAP/VM_FAULT_BADACCESS arch/arm/mm/fault.c | 30 +++++++++++++++--------------- arch/arm64/mm/fault.c | 43 ++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 38 deletions(-)