Message ID | 20240830040101.822209-9-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 0046ACA0EDB for <linux-mm@archiver.kernel.org>; Fri, 30 Aug 2024 04:01:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C79C86B0096; Fri, 30 Aug 2024 00:01:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BB3386B009A; Fri, 30 Aug 2024 00:01:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 968776B0098; Fri, 30 Aug 2024 00:01:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 61E016B0099 for <linux-mm@kvack.org>; Fri, 30 Aug 2024 00:01:41 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 124C041414 for <linux-mm@kvack.org>; Fri, 30 Aug 2024 04:01:41 +0000 (UTC) X-FDA: 82507562802.11.F1BEB01 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf16.hostedemail.com (Postfix) with ESMTP id A9797180007 for <linux-mm@kvack.org>; Fri, 30 Aug 2024 04:01:37 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=FPgBEyoK; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=eesjldRs; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf16.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724990407; 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=G5x2B6KdF/l+leREmzG9b04kNGdPYnwroP/y6Yjz/QA=; b=LqFfPJr/6iPUVynPoXn8lAYVN9pcAjcanCI7OrjxRjjrvp/nUMuug78aNkrXx2Hp/JbUxT Phrhst38R8F5bmzACh++O1CXck6yVMcbxyHP+mvARHBOh52mA/FRU0l7lNZ+ncc+K0mZg5 /5l6fTTEmHOTmbmCGmeaANXIJM/o8CM= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1724990407; a=rsa-sha256; cv=pass; b=TgElPrjM24CN7gaK0aaW8YoiLJQClk0oFMBJXD4GwQQkfEyK3++irLIjrMuaSCfAfT5+Ub RS4eIXpY4o9i6fs/AUScb1b25/EHtFin9WXy6UAEyonOHP/SlY8dZcEOgow3R/4SVqcArP UaNtl0Efjxt/xXyPcvYM2mKe7ko3Myk= ARC-Authentication-Results: i=2; imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=FPgBEyoK; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=eesjldRs; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf16.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47U2srf9011858; Fri, 30 Aug 2024 04:01:30 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=G5x2B6KdF/l+leREmzG9b04kNGdPYnwroP/y6Yjz/QA=; b= FPgBEyoK266hI6RaIii69d24LM1Z5pC+vEw4uaRmDAd4TA+++A+mJBCr8wk5LQ3r MKOmnmGP93j/ZLrOI7xaymoYviUOT+5rNljovgD81K4wOOIsykCLK/fSO0cjFgX0 fqSa/LzlZ102I9QjarDHYuV+wuswADkfReyXEg4nIAXgF7/jKl3yXPrZQhl7dK69 dDPOGgCu8K+723dzjvHRantGMEVYEvG/70DuodYDJ8IKrU4393qOXMM+XLT2uwvz 7qAdQJETznetUOj6a7FY/ZdO88FuGFKc2RCoTvnjjWitAuZnI5DUSa3LjBG8z5zu ByxhLp1OQ3MCPnqSCQ1kMA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 41b5q3r1v1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 04:01:30 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47U3jJaP036502; Fri, 30 Aug 2024 04:01:28 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2176.outbound.protection.outlook.com [104.47.56.176]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 4189jp2swm-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 04:01:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=amDI/iHlCL4PmHybMRaSCOQw5tKfczKhM7k3IVp33CxI1f4X071oT+UpouewJnubUnnRDoRtGCPETXsgdrHjzgkVem0xlcDXNmZvBmmHRG+VH0SPjDx/mrN4fA3DswEscaQ0FynS8xw8UlkKBL04OFkkxwxIOvsqDcAu5r6emE+pjOT7SxR2LZgoNoiSW64/7vIGCOgBW8B4wjLkSfj2sblVq2Rl8XzysSPojUHWOsgQXXq/ZXXftUVWJlQfXGVQrvGSmLbLplfc5/8is6EsiVcqLpwxPv8zhu5xfgfOM88YugDmzdbtIH7Q1dZXbfN4CwmctQskrhx418w0yyvI/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=G5x2B6KdF/l+leREmzG9b04kNGdPYnwroP/y6Yjz/QA=; b=R+xUvc4qEfHUGf6zmTqi6It1bbZtzJiixRHVOOmWRKY2J50JtKmVnvoyzEsc1HnFeV9qcxEao+msLnV+FxuhiZfjNALJfctSWkFbb8uOol+5ThWkb6MT0+htG6B9gSWju+c0n7C6VXlvESXcKV4n57hy0hiGf11fRYsTwKCC673xLIs1XDKyCRiG8XDJib4HexlnffVDQPEyTHjRMC9BPjgeFZ6FS/BxJwenBHHJH+Fgu3FqQCKsvAm7FwpFxGkCfrWpHEV/XB4bvEKqA4EhtJvtvW5V5COeYmPhstPajoaX5UD3M+Z906i8eBYXHYF+jsT4AzF2X6YR8h+ncrtOew== 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=G5x2B6KdF/l+leREmzG9b04kNGdPYnwroP/y6Yjz/QA=; b=eesjldRsMR9BDidWbZYoTk6CM+HJRFWjMB8CIJ/TrB3lfakvFsQP0GX++UqMu00hAqzwjoM5xzHNbUq2eZIFPuRB/+U9q7A50lgiv3n7695OLEdgSQ3vUQ+xzLEfG5Fd9wvH9h3ON7fW8O1E4o2wgcLLq2nPEsZi19fE+icRnBg= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by CYXPR10MB7949.namprd10.prod.outlook.com (2603:10b6:930:e3::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20; Fri, 30 Aug 2024 04:01:24 +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.7918.019; Fri, 30 Aug 2024 04:01:24 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Suren Baghdasaryan <surenb@google.com>, Lorenzo Stoakes <lorenzo.stoakes@oracle.com>, Matthew Wilcox <willy@infradead.org>, Vlastimil Babka <vbabka@suse.cz>, sidhartha.kumar@oracle.com, Bert Karwatzki <spasswolf@web.de>, Jiri Olsa <olsajiri@gmail.com>, Kees Cook <kees@kernel.org>, "Paul E . McKenney" <paulmck@kernel.org>, Jeff Xu <jeffxu@chromium.org>, "Liam R. Howlett" <Liam.Howlett@Oracle.com> Subject: [PATCH v8 08/21] mm/vma: Inline munmap operation in mmap_region() Date: Fri, 30 Aug 2024 00:00:48 -0400 Message-ID: <20240830040101.822209-9-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240830040101.822209-1-Liam.Howlett@oracle.com> References: <20240830040101.822209-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT1P288CA0031.CANP288.PROD.OUTLOOK.COM (2603:10b6:b01::44) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|CYXPR10MB7949:EE_ X-MS-Office365-Filtering-Correlation-Id: 99322462-6b0a-49e9-0da4-08dcc8a86a59 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|366016; X-Microsoft-Antispam-Message-Info: zdi5fsZWBtshPrFg4lh1DRSdILh94vOoXBnrOrD+1P7Nt3GjxODvP6SmaKrDcl1BD/reETz9cLgG9R89QM4py7rt4z8LS+JEP5xIz5zepwvnO1Dg6DqP+YHY7gzjkD2pLfCQWdZjHLj4ajS/yLJSb6wj2N83YEqCIRO6xhaD2U0020Ztvuwqo/vpHwxM4I8/tyUpSTi8AEWB6p3+cr8ylAo/SaFb+ZE+8KLXT6dCh+rCiFD5K1Tt6IiIZ4CXZHpyEmZIAWSmrB4enLrDq2yOD2euLxiAy5FIxUeMW0q25Z/Q248Ko9cQtVTYzhtbPIAafYghIFiYkV+Fdw7Sw15Euw9EJZp6UIRn8YTiaEDMae6Xl+l76dtCnsYHPTmlvujv4Cw4QfuP7dp2gasplEW/zVRpkSHPUaXx+UDuquG3VHxAAJqdxYjAbTgk85sQg3Hvmo+Po0BaJ8ZXPnj7II2a8g05TT3tiRVQTnP1oUoe7G0eXv+0rv2PZktaXsT/GHpyUbmncFZZisyMSO7Ut60Mpt6IyR3u+ecNvymY+nkCl0ke7LhctzaiNZxAwdKpNoKNFhKnemgsWML6ryxYdY/1H2Yi0pUIX89MkRAzGzF+U5Xhak6XT8u5bD//PYbq8sPM5m4xJzZKZB8XqcSoZgif1ozjPid3PFTvJCnHj2rvSlCjYdjlXOycPwH0xGjHZK68DHFVA60ZKGbfcGOmjLrvCaMxcS0pLzjy2z/6fof7gVxR79CYE0b4W1JHsPCb0zeXZEURelOb99aqrHgVBwaWeGynSHus/Oy71zYaGdl0ocQ4gKKnhqq/AuXRPjvSARRaoYgVuZS0fWA5cit3eBFu9YEf9wBtiOZhTPvnMAH3EP98IqdFqxfvBHNLM4uQTVJBour2fJ8TBwC8Gn7ElPUNLl/14emRh4Jo81URT03Is8C7Y9RynoJWW2+G7hTHpr9aLyOTUKYv6n45RShjgX8EuS+eJkA8hDh+NsgEERcmgKxZnQczEtkomN8AUmtoQ4UMhxM8XPUtiofHq3/kD0kxF0GQiAaPk/b2MdSACfKtTETod9dHqJA2ecPbGVcDKMA36GKgVUw3DJRgjW/VZEo8P9Jtr9UR1vmhr4ClfggyjSdvUKjeA+kWjORcB+4T0Fsr6p2g/jmypFd6hPl1KmzI0KPCSlQn0dAMkFIHU3H81NLaRb6mcM9Til401b65Imfft9nPD0pj4THXigq64Kt+wI01Kg2FXGsV+ksbFQsYBaJ7OSbUlA7j+ePkfsWAHmmnxjpaGlVDBAcO2Ue9wJRPPwDcXLrRk78GJdruBThGM+NkEaYSzPv2u/7I5rNLjQeAznaEHkrbtTvkTWO0/gc0ig== 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)(1800799024)(376014)(7416014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sn1m9z/CzIccL7qUR8FyR3R2fXBxZvdvPTgsjEwRdmU48T7E/jJbFGSGK+E89dcEZ40ROgyuEq0Z/mV0FlWxMeBm8pMjEIKCfKDthjZBOjja63ev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oGHf7AW3oG6GRJp4zuj4FKMOCb0gWixuBsc8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99322462-6b0a-49e9-0da4-08dcc8a86a59 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 04:01:24.5268 (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: p7P+praqS4KVKW8aL4HF3Mll3nI13SaMXtm483nlhD4BoI6XSd9R1B/JFtJAYlT82O2w9azispgaXs2DuZ3Wxg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR10MB7949 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-08-30_02,2024-08-29_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 suspectscore=0 phishscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408300028 X-Proofpoint-GUID: qWbMrd-yMzxYTgqHDsZnajb4gbBE2Axp X-Proofpoint-ORIG-GUID: qWbMrd-yMzxYTgqHDsZnajb4gbBE2Axp X-Stat-Signature: 7oyfkuq3z9uazbzrse9jymfpwqghq48i X-Rspamd-Queue-Id: A9797180007 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1724990497-314109 X-HE-Meta: U2FsdGVkX1+DQFgDnN6E7+wnf2qf98PPIbwUwFP61SmzlFdSQ53oRd/ofKqv5w8RXPOscNeuQTxKVuPNdTvomlKThWyMIV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H76i2CoqEu1Tmhs0xtwNtQBfWAu0uyLjaf8lY/jOo3s0JBQXRry7o804OpPAThd19SzYmMbyjWt3fG0xlNMBIE1VO08XPRIrs12zm+a9gEYFuzzYxnSz/zzE1dmXNhYqyxicQwRLqyvCjqAtITBKbmy/5/2kFk3jq+lbf/PGudHsqW4jhF75JUEUNFiS7z8OzQ6Ejcy43/eIuxM0/rOaVc/YqiDSYRNmXPZVJJqNnggNza3Ny7QeOMcsxPwp6g31HPKHyV8/bvbl+zd0LfcrhwiqMRxhw5hEyoAy7oWN7OklE241B5qblCtXnvzzyhR7BXZGv0CQGxktmqD4C2Wn9Xz0qsMQ3W6oU9SYbjxubuIGPUbPMc7r/uAkFUGofdd85zyzQFR6BICDMJTRCZdDQmq0lzMu481yEVgdUfsDOT77iDOQTTwBDAQ= 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 dce1cc74ecdb..ec72f05b05f2 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1388,12 +1388,15 @@ unsigned long mmap_region(struct file *file, unsigned long addr, return -ENOMEM; } - /* Unmap any existing mapping in the area */ - error = do_vmi_munmap(&vmi, mm, addr, len, uf, false); - if (error == -EPERM) - return error; - else if (error) - return -ENOMEM; + /* Find the first overlapping VMA */ + vma = vma_find(&vmi, end); + if (vma) { + /* Unmap any existing mapping in the area */ + error = do_vmi_align_munmap(&vmi, vma, mm, addr, end, uf, false); + if (error) + return error; + vma = NULL; + } /* * Private writable mapping: check memory availability