Message ID | 20240625191145.3382793-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 28E60C30653 for <linux-mm@archiver.kernel.org>; Tue, 25 Jun 2024 19:12:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C84396B00A5; Tue, 25 Jun 2024 15:12:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C5A2A6B00A7; Tue, 25 Jun 2024 15:12:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A84EF6B00A9; Tue, 25 Jun 2024 15:12:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 8031E6B00A7 for <linux-mm@kvack.org>; Tue, 25 Jun 2024 15:12:13 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 262BF1A057B for <linux-mm@kvack.org>; Tue, 25 Jun 2024 19:12:13 +0000 (UTC) X-FDA: 82270356546.23.C163614 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf13.hostedemail.com (Postfix) with ESMTP id CF87A2001C for <linux-mm@kvack.org>; Tue, 25 Jun 2024 19:12:09 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=geKPBgWh; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=a3O9nx2l; spf=pass (imf13.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719342709; 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=zSu8hDWlGjMxPlRgldY+gYYh1jH3ES1rfBL14tJEjt0=; b=4cZoHfXVdERTDD5kCi9pgQqaBvlH8rav2oEa9ROpQxSbgGpEQ09/twK4Q1I+aB9u1VjiyS jHcvcfpwMytYyXfhnD2h8oz6gek7RvQzCkFgwyanDXVq9h0zwSPELgKg9dGS2c4ZOpiS7K SL/nhxk8Sc+1lZ3rh48w2f9lBnuop9Q= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=geKPBgWh; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=a3O9nx2l; spf=pass (imf13.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1719342709; a=rsa-sha256; cv=pass; b=x9DtyAsvQJpJUvViQVrR39+eBs4IbneJIyI3gJTi7Cru4OrUZ5EaU9rTsK/6fWN64xivdV uX3p4ornyUmhQnuX8/uRcAm82cQiwK5NdBUwcC+k+JP2RfGPWrFszO3H8Q6AWN98ug7rKv KUddK2udRLE9AqjfAfGvWFEdMwfYOFQ= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45PIfTXk018305; Tue, 25 Jun 2024 19:12:02 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=zSu8hDWlGjMxPlRgldY+gYYh1jH3ES1rfBL14tJEjt0=; b= geKPBgWhM5WIp2+ekoXwDoNwufxBJj6bRgerNypGXAtUA7xW3ZNNxoUVSdGqXbRJ aBNX4C578kFSazvs5IZODIW8cE5rvpXFozxsaJtMwsfFzRQLr7NrMS0ciPt0mp/v MFneqkDrTWAwl/Lve2qZsxS1KJiM1FXVDNgfkbvMJg4ruhc6DnLRUZXT8o+vr/J8 wNFVUxJjjsgNky6ekITINPuLKtlVTbKtk1ZeXOR/aNx/doMRNOV47ggxeQeNehLd /3IxnJ8jboqTbU4wt+WfNpYjia9vl5eNEhlMq35RdOM9Xt94cqxIm3+wGSmsgkbg l1gFkPxXArJiUSdG+RSLVA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ywnd2hmby-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2024 19:12:01 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45PIrYKp010721; Tue, 25 Jun 2024 19:12:01 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2040.outbound.protection.outlook.com [104.47.56.40]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ywn2egtb2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2024 19:12:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RnMtv6b7znPbELE25pRfsGA4dhQEgmzFIoZQLJLsaQaszzT2myG55Q+s7Jn+k15jwGaTNs/gk/oGLwvH9/iToBwz0RAfmN3gB0v/r7P573zb/fQ4HXPVlqcfM/d9yXE8hbT8/EdgJliW7l87JjZITwmHCDqYZAW6DKgG8ITWzViIjygV7ZKCBO/mj8RRLXsRsL+mNfqB39Q2MGMk/6WF28PsDsxXZgqv3R8b2dSjw0CJV18OGAfJGPtJQWhaSap6UYXsBBSF2Kp8tlQT+B5+0UFBWk5uruIQdHVSo4iNElpDH/2U9NtJi0XVqu0WglUR6hsORue2eYxVi6B8OLbYMw== 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=zSu8hDWlGjMxPlRgldY+gYYh1jH3ES1rfBL14tJEjt0=; b=aiiFpfm2MLxPy8cPZrCQ1VaLeUrXWqmvObgzQhJ8cLdC8VkSAbI3BeGAtd0v7MLsUxwi6jLPYWywyRAcm/aT238YpjddcF3WRAT5iUX+0+twMYFO4al8XWvK4QOBciY0u7SVGpG6a7wgZ2H6hDNCi1GpLuMEmmCHyUN56oIQS7x0MoJX2ZlW9mv+3NC2uqCCDis7XV8AKfg4Kl7wJPvDh1+t64YG+nr827Zh3qbrDNjIh+p8qLn28gzQ51fdoFJ7EPSIB4w3A4DaPxJ3Je4Vu0Js+vsGtbFLXXoyY54+ggUHWYyf3Qw4RcS9fRyPN1JvtPoYcRFtp8xHonM9eRz/FA== 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=zSu8hDWlGjMxPlRgldY+gYYh1jH3ES1rfBL14tJEjt0=; b=a3O9nx2lOKAGh3dnVekeXdbA2QoGK7yqMC5KNM/Uv0xzLBvrv19YGcr9BDefzkSRLW5DCg1nTfiwBNriwS/zMX/QyHcekfvjzBCVPB4tEEjmC5sCG5X/qPYChEnBirSRVy2W2JLdxA2P/5ql10AB37u7eA6XU/qGRqQp5szAIbY= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by CO1PR10MB4707.namprd10.prod.outlook.com (2603:10b6:303:92::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Tue, 25 Jun 2024 19:11:58 +0000 Received: from DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490]) by DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490%4]) with mapi id 15.20.7698.025; Tue, 25 Jun 2024 19:11:57 +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> Subject: [PATCH v2 02/15] mm/mmap: Introduce abort_munmap_vmas() Date: Tue, 25 Jun 2024 15:11:32 -0400 Message-ID: <20240625191145.3382793-3-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240625191145.3382793-1-Liam.Howlett@oracle.com> References: <20240625191145.3382793-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4P288CA0057.CANP288.PROD.OUTLOOK.COM (2603:10b6:b01:d2::14) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|CO1PR10MB4707:EE_ X-MS-Office365-Filtering-Correlation-Id: 36296a7f-ac08-4850-d64a-08dc954aaed5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230038|366014|376012|7416012|1800799022; X-Microsoft-Antispam-Message-Info: NwbYqFQpi44WKwMz2ua+aosjy/aeBPxdj0XcvPiHNqSG1gPeTxeYhcDkRZhkCwh+75iVHNFMj0Uydm1kGR+lk+fTY97DuoH+W148JKIUOiDUgbyOT5G9xkai2fIq8N4w7G7pDo6ZaanbJK26SwN3z2mp3lka8440Az4hGBOoZrXsiSimEw0BxFL+/k62ZoxXHGtiQD0To+/wCJDbTz9BnFyOCJTRfaIFt5hc/aoKnce/GwzyShQLve4Uw+f7OgJ7R/fvXTiJ45KI29Y0YU3UBhcguQTVQdlHGaAxo+quPs19effPMwrWlUMwkNMjfDxeFZG/oithNYYVMJdJegPH3x8egi27pBQvTrKoCxtb8Ajyd/B0CtTydIdAtk+UHXzGjiSw7TH/V7ZjfROR/8KFpawofR9Eu6BCqvF9sPm++rma4Nymf5WnsYVWQBGhhGD0LPGnfkMCfIeC5TgA0TYq+MkSM6RObQOabNn4saIF0IjHzVl025dKGlq3OOwiZLicV5gGB2W1VLGwiLSLgUFJZjfqAPZ8N9Hj7czks/nL3HfS95wkcc9Xwk5bID466gbSmeT1OD3PUgO6hq5udTpbFbkJ/Rns7YbsqOw5FAVnrOUTmuwds3LWcjCheaQu9sv7eQ4wRzgI+46LW9/4DLXh1Eq1OCqjgoU0lKWVtzdCr8sX/3zfaeTozy/HLLj8rBlrpQJmCuAJuo+qmXaMFDJEvcfeDenBi9f1WLmWwpv4HL/SsmdtPZ6GCjo3gCgSf7ntrXl77O9PEusg+yNkv4TOSpXivUzsDIMx5TNVIvXCj9bicoX4gyGDKLlENjY052FtP5NlQBOpapTeH0b0ty7D88MszwF6ty3B0IiOhLKS2/JzN3KJoruZuvrRto2X7DHs9INRHM13X47flaR64tJw8cpUEti1lqullI+mA7Q3/uZMDtufuaa9h4PbKAsTTWL4eS8HS4vSnGhA04X5ZUm9aRF1c0BjJYahXWmKdU/22B1nwjPkr8hKql589IR2XmCBR4I8dSSuKRff6NEU2oDk1pQSHacYjXSvsbUER8YCkVXYCFvE/tACGvh1CDDg5bBn0E7b81/+NxUTlS+a1+s9yXnmAAgUp6RdUm4J2Wpl9nZSgDE1eR0rJZRFrUGpPRUkWqvTK2SK6oQ0poXoyyFCK4L9O/ph8U4S0ODJC8RvPi0WLNjXkGxp+v7LL1oPLewJHjit5fRz3VNn0S7tHa0vmFNMptT1gJJpgX5bg4SUq4gMpEZ7LQJuS0s0L2pC7Y7xHh1Ku7XUH+wQ3v2NpqZmjyTQMvVGJJWwpvVvyvTfUFw4KlI/L0VfBmnZf8qlpLgx 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:(13230038)(366014)(376012)(7416012)(1800799022);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZmGh4lWeZyu1V8C28NP2HqGxJA5f7XghJnpgzoOWgKiV+CkhW6au5o1W8M8sHwclAxflOOfjjMsjByhiaany0+ArZ4xL2tCDBBN41/YMbDMUNcfqJv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cUur1ENpglsvt2ir8lU+63hAi1XLeaA6oWPQXK1v3+RUCk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36296a7f-ac08-4850-d64a-08dc954aaed5 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2024 19:11:57.4211 (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: DSliW50W3k0XYfzLXr28pMJ3Th/3QMgf3FrlmPXSOnqfhCvMZT8IBs4WvkvClr6i1lUWqv4wzdD9WQh//w7aOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4707 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-06-25_14,2024-06-25_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2406250141 X-Proofpoint-ORIG-GUID: wwxhG0xOyhSs-M8cgL1YVo9GwSdW2cxm X-Proofpoint-GUID: wwxhG0xOyhSs-M8cgL1YVo9GwSdW2cxm X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: CF87A2001C X-Stat-Signature: czic3nfpndtbonwtsndaw6rrcyn94kg6 X-Rspam-User: X-HE-Tag: 1719342729-912985 X-HE-Meta: U2FsdGVkX18wYduetJu58MJvsXF3BqylcZrT7f8me8htu7AHim77NTa8q23MRny4nw1iRq/Z9iWrqe+A1oQUyNZ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OmQWxJOrQBsQPO+osyN3r9A6O0TMfFwSNDGBxRR7bfB5Ic9EtWu4FE/Xq/ggEAQmZAe/g1DcYIHcSTwX28IkjnoX6C23H8ruXvkCQRxbiRRDaLKo36uQBJ0Ueg1cufjLCquQYMFmyqSAUPUscK1jd9WFCa3ObZJjTQhHq48LeIpPjm6XBjWpc19OoH5FQlvPihF5xmdm+ic+2/xaKLSEr4nxhNVArq0Ti9he/ObsAQj9E2zrSMqwfqGdU5jr7HdEuyhTqGVXW1aPfO9XEb3Tj1ODrtdqtRd00tzIlZAqWX/jWg== 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..d572e1ff8255 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2586,6 +2586,25 @@ 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 detached vmas, free up maple tree used to track the vmas. + */ +static inline void abort_munmap_vmas(struct ma_state *mas_detach) +{ + struct vm_area_struct *vma; + int limit; + + limit = mas_detach->index; + mas_set(mas_detach, 0); + /* Re-attach any detached VMAs */ + mas_for_each(mas_detach, vma, limit) + 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 +2759,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);
Extract clean up of failed munmap() operations from do_vmi_align_munmap(). This simplifies later patches in the series. Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> --- mm/mmap.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)