Message ID | 20240710192250.4114783-3-Liam.Howlett@oracle.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 C8350C3DA41 for <linux-mm@archiver.kernel.org>; Wed, 10 Jul 2024 19:23:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 610106B009E; Wed, 10 Jul 2024 15:23:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C0726B00A2; Wed, 10 Jul 2024 15:23:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 412706B00A3; Wed, 10 Jul 2024 15:23:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 2347A6B009E for <linux-mm@kvack.org>; Wed, 10 Jul 2024 15:23:42 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 980124022F for <linux-mm@kvack.org>; Wed, 10 Jul 2024 19:23:41 +0000 (UTC) X-FDA: 82324817442.19.EA8A973 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf02.hostedemail.com (Postfix) with ESMTP id 486E180015 for <linux-mm@kvack.org>; Wed, 10 Jul 2024 19:23:38 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=iXqu4pEL; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KGdvoCN9; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf02.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1720639394; a=rsa-sha256; cv=pass; b=3z1nasXLoPd1YLoCeH7ELDJy+m2YXfvzjX1yT13yyn6hKOrK5s/1K4B8oaMRD56nhF5Z7d cjFnWb6DSDjqA0kjJfpSrBdDTQcxJy6Q4yfHT8eW4eKzK2X7+s/c+hFUlwCHDqsYzpZcUb jgD9jk3hs2VFtGv2BQYFfzGJppZESmY= ARC-Authentication-Results: i=2; imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=iXqu4pEL; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KGdvoCN9; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf02.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720639394; 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:dkim-signature; bh=wem2AJBoTGHtBckyqvpen9uiSUKgs9mhKNjHQHA0o5E=; b=M1rEIPry5vK5ue5puhlrDhiIEa3dg/FQ6CjrlQYWYd681aw4lgsPd83dgHcvfGhdePGwUx UILtCsNCXNA0i8Hn/qFwwqXZ7xTEqR9Eg0lYuVZ3eMfvGghz4cbGkIyxQL8tiYeu9DcbN/ I6rdGFi9E86t24rC/AimUfzuxHWdxZk= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46AFjKmQ019272; Wed, 10 Jul 2024 19:23:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=wem2AJBoTGHtBckyqvpen9uiSUKgs9mhKNjHQHA0o5E=; b= iXqu4pEL4R3T86JONcL6mO3LUi4elvurQNNkiDIIiwrAUnb5yw88ZY6hSb9P1091 C5J2tcqi6zadycxYUZ/Ltc3hOjjdIulvp1eXOGunqmuXl6kHjgQ/jGeZPqodpf49 fVOXnAVxrcYHKHddo4SF1TkCBMCV9FGxGCoHDnQtE+qlBBAvhG9OGI6OB+NKDAiJ dTALgxTrvvSAjKvUqSxLvPLkIXuWQQCXAHkJRJy2BMcEWiaU2IymRqT4mMbCPO/s lLE3uD4m26S/0U8Tp5pgVLUc79ZkBpc9Tg7Czm6Rt1c6yPxnYdgKkRAy0iTUnT37 jmfYbETenU2aYJptZwEblA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 406wky83q7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Jul 2024 19:23:30 +0000 (GMT) Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 46AIihM9033699; Wed, 10 Jul 2024 19:23:30 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2042.outbound.protection.outlook.com [104.47.66.42]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 409vv1948k-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Jul 2024 19:23:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HhpRj9Ck7xN/rILqUZwbcd7jtsAo75m+Rgtaa3by39DpQ2XnBN3Rwal75qDTnM6vCwC2Z2PXtFRu52ivPL1T+J/geTXZemvoWIqIRLY31Nh9ReQQp5cJXq2sGlYuc3Eu7GryNxW2/2hlyzMxXB9L9sn4TXkVytkb6wAJv78EUJofZjE+n+Z3ZLR1sG4vXSjLJ0eNMxSto18yDOZcsSL2KPc1CTZDHbNA2eOEf49/xL0v/CpN0YTuKSarRM5d4F98He9rBt77u+Ly64FG3u5MfGy84GVcTyLAb8mPVFKgq/qxaBI8BNh9LC8G4VYwyk92YQlM1JOjOSlf8WqRgq05/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wem2AJBoTGHtBckyqvpen9uiSUKgs9mhKNjHQHA0o5E=; b=ZIGrEN6GE6mk3eJLGXKShMCWngDaxw17eUBZGHEt6kojfT32stKJf6w69cp875HQQjV8jXsUOovaLvyWuFcepJesMitgyygKMaqaoMaAunJXoVbZR4WTO9hQFozLyuQIttfqvwIAnwmEyXDQf0LXzLJtne6A+oVwWKIK6+rDxLhirbbewYODAHREotJVK3eMfV/nQxUvCF4I6msR4Mq0d1NbTgiIfxby3exmXHJ2VGEUp0IA1puwDq1bIPFcHKcxtVADA6PqRngpp3bcSOVSmd0vlzTUrMrwqeJ7DMM3/eOXLu0iQEjnGs9EqLM6ZbwcQk1N7w7B4KLwJnIpqdB/Xg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wem2AJBoTGHtBckyqvpen9uiSUKgs9mhKNjHQHA0o5E=; b=KGdvoCN9/XkzDhoxZzbnJpNdPht5sT/aiyHfJgs7a/wys0vcGFEv6JfVyYAtVPn7yzZSoCJzMRaRRHlcLCd6TdjWPClxjOrmfeMwQSCTVP1G4u/GVbimfQR8ONx3Fdxj3eH7Rvfarwh8thuXFuPiOUAYNygNOEleQmCjsu8D2Xo= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by DS0PR10MB7295.namprd10.prod.outlook.com (2603:10b6:8:f7::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.36; Wed, 10 Jul 2024 19:23:03 +0000 Received: from DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490]) by DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490%3]) with mapi id 15.20.7741.033; Wed, 10 Jul 2024 19:23:03 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org> Cc: Suren Baghdasaryan <surenb@google.com>, Vlastimil Babka <vbabka@suse.cz>, Lorenzo Stoakes <lstoakes@gmail.com>, Matthew Wilcox <willy@infradead.org>, sidhartha.kumar@oracle.com, "Paul E . McKenney" <paulmck@kernel.org>, Bert Karwatzki <spasswolf@web.de>, Jiri Olsa <olsajiri@gmail.com>, linux-kernel@vger.kernel.org, Kees Cook <kees@kernel.org>, "Liam R. Howlett" <Liam.Howlett@oracle.com>, Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Subject: [PATCH v4 02/21] mm/mmap: Introduce abort_munmap_vmas() Date: Wed, 10 Jul 2024 15:22:31 -0400 Message-ID: <20240710192250.4114783-3-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240710192250.4114783-1-Liam.Howlett@oracle.com> References: <20240710192250.4114783-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT1P288CA0014.CANP288.PROD.OUTLOOK.COM (2603:10b6:b01::27) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|DS0PR10MB7295:EE_ X-MS-Office365-Filtering-Correlation-Id: 63d77bf7-a659-4962-a51f-08dca115b7dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|7416014|1800799024; X-Microsoft-Antispam-Message-Info: nuh+P7iMtc7k8ZTMONoa+l93MPMNWf9+I7dnUFNvNtCwOAuyMe3Z9YrWfOh1cTajBUUWxsMsLK9xT91xHGaFh3cDiDYrjpCOa5cGgFcMwIC42lt291/5oakaEsFqn4Y/IyLH/Th6o7K7vqBVfq8vUHc02tu3kwnPUI0H+ClDS7+JhlDqgdK0p+1AgTsF9hQP9T0mKt12ODmBZ+Q7wBUQcnxP8GziZwflfhyja0sugyDbiU0NrQmAaAZMXL1sV44rmTsVUP+0M5usycDMJRJ3o+KTdxEbebx6LTfuwSCBJiIvadtpF+7V+DUJPu1d0ldHFhdRaQz6AB0d7y99adDchtpCU6gl3DZWieC7Sj87tzLqW9giM6jUVHpWrnMSaB0b0RnpkSkQQmapKX+NJmuoIOFld24lOaI79Rs2U1cH8d/ylZwubqdgQyfTDR03HJXqpw5zDOMeoHaQlC+ep0UTtS4T260MgCFRKsxHpiG22r4okYKCFQWeCHWw0mc/Uvikncu8ke/a/ieupDzmorWGD8pmcR+PaPlhsAaDQLE0j3HnNHBtL59nDA27g+9qmVOPRen9RoFheYkq7fz6o8QnPAP7paXcP1KDGethcoR8SMolJogMNnPTlwmO2OBzTaov4woJm2c5ZJU8jF4ZknO8DbJGo22iMkfpf2i41JMSARmFHIQzEzramQH3KOOP0KudIiiwpeZzHjviNmmBup7GRz6pq9LPjjFDnVopRXxHEOe5xtahQ1cM0tKg8EHNfcdk0l9yqzmSO/4UvK6pcCnn68WkHkZEk4qxH5f5aHtTuYdPAPKZ/ekQkAncBlXDqekzIhYzc8aTBnT4YlUugs9p5gCTGDKnvRAO2aJAPUvgiIcvk9kgpZqMh2xMqRH/x3Cky7wHGEirsbEpb00s/x72PVClZbcW4lE7Vww9bxvwALk8Sy6521Galt6+FTm5bQPM+DqdCbVZTg+tBUulLnTErLK4zPqT+OHLMAFZ5t6OqoWDkvUecZNZTVrhMtyuKnaFd1Fcfz+zPDUpzOdBLPzDCaamUDgbLfmX+ZRR99AAW/wpWSZ+WNWhlDI5tW6ruEE4O2ty2su3Qbe9IIUyA3XI/Gu3wGIbxRQfnD7tHFc1Ej8Zon8eAkFKsyjLzZzXYiG4Y1Iv+vY1U8G5LKD/EuJ4T4ctR7fH5eSP0q6c/ztlNRiIiwpO/DznYTzDn6h/n67VVNecEf+Rln7keWednvdg/Lt9ZvPptX3FuAszztvgmPv02u765sWsnUzp1EGN0t6iFH1UQAKHPqAFWzdiZVeFkF4Uz6r8V/SQhFyQid/7RXwIYW7GU34XZ9213vPcOCthn0nlnrRyAJwodmsGtBQsUQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB7933.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(7416014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: n6pza8LVajuptPuGlfLqqCNjcuyXIisIB37/ddANrcu1u4CFjN/rBP3zuMW/RqVXZD/AylwsIUwntshe79Os6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Up9GnAaKLkZVU80SqetmprcuUrMO7tkpS+IAZaOYm5egx1BiAOS32vX7dbJXQO4+ehKJ+CJnE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63d77bf7-a659-4962-a51f-08dca115b7dc X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2024 19:23:03.1664 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TeETa5Q/eV16ls5AzgbH7LThokvHOBhZQ6byKTCj/Xf7TCpdEXqL4NaKoFJUWF7gjdnUsFfiY6j4Q4xBH56c6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7295 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-10_14,2024-07-10_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 suspectscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2407100137 X-Proofpoint-ORIG-GUID: BnDWKDQlDsXSIS-IGiGDdWGUXf6w-iuO X-Proofpoint-GUID: BnDWKDQlDsXSIS-IGiGDdWGUXf6w-iuO X-Rspamd-Queue-Id: 486E180015 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: mbqyzso1mfxgfhinpnh1xjwh78o85cms X-HE-Tag: 1720639418-892761 X-HE-Meta: U2FsdGVkX1/YB+wp1K5xT44HKg8klKpsbj2dha5eNbh6z9r2pm+WsP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QpIq06SD72H/DpOSYz8WN4ehihcD5QGpf5Q4w7Apz4JfFIs69fpzXu7hthcBJVJNnw/1kcsvlkjqIUcMpWpfus0drMrtDtnYOxz+pHCSSg0W4CI0kQ6F6ylJsmcGwVGAsQtGA1O8XfoMhgTMAmwfYBowfdtIotHn7hS24ZYtfm9cYXZLmQCpDJZxQjx7m4GwXcdem7K9P/OyPzz3WxoAPcu1/1zrcKRGjW+WH8EbD8Ts2QQSePy8xun/ofygpuCJeo95K5DID7xX1k5j67LvG7HPJSPobVzEc/oDxvtTK9kxvyvSyeuXOK0ljuXc9jt3eWmrBLiaseQJOgzwLZDlmshoM+sG9dOo2Iki7QtfXJ+Gb8NwAxqZ0R5rrI/D07UhVgdsdL 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> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Avoid MAP_FIXED gap exposure
|
expand
|
diff --git a/mm/mmap.c b/mm/mmap.c index 28a46d9ddde0..babfa50f1411 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2586,6 +2586,22 @@ struct vm_area_struct *vma_merge_extend(struct vma_iterator *vmi, vma->vm_userfaultfd_ctx, anon_vma_name(vma)); } +/* + * abort_munmap_vmas - Undo any munmap work and free resources + * + * Reattach any detached vmas and free up the maple tree used to track the vmas. + */ +static inline void abort_munmap_vmas(struct ma_state *mas_detach) +{ + struct vm_area_struct *vma; + + mas_set(mas_detach, 0); + mas_for_each(mas_detach, vma, ULONG_MAX) + vma_mark_detached(vma, false); + + __mt_destroy(mas_detach->tree); +} + /* * do_vmi_align_munmap() - munmap the aligned region from @start to @end. * @vmi: The vma iterator @@ -2740,11 +2756,7 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, userfaultfd_error: munmap_gather_failed: end_split_failed: - mas_set(&mas_detach, 0); - mas_for_each(&mas_detach, next, end) - vma_mark_detached(next, false); - - __mt_destroy(&mt_detach); + abort_munmap_vmas(&mas_detach); start_split_failed: map_count_exceeded: validate_mm(mm);