From patchwork Tue Aug 20 23:57:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 13770661 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 48A51C5321D for ; Tue, 20 Aug 2024 23:58:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D0DCC6B0083; Tue, 20 Aug 2024 19:58:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C20BB6B0085; Tue, 20 Aug 2024 19:58:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9630A6B0089; Tue, 20 Aug 2024 19:58:07 -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 773676B0083 for ; Tue, 20 Aug 2024 19:58:07 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 324F71C3ABD for ; Tue, 20 Aug 2024 23:58:07 +0000 (UTC) X-FDA: 82474289814.03.F93A1B6 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf13.hostedemail.com (Postfix) with ESMTP id BAB4420014 for ; Tue, 20 Aug 2024 23:58:03 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="Me6zM/ZP"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lUAxqbuI; spf=pass (imf13.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=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724198178; 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=+SgEZNii7vamI+Wr52WRA094htKGd868kPJiAHCbwa0=; b=3Yqk3S2hEddldm6CFLJnnZQrsowOiWhdMQbQfpg8BiOxQSFQJ3nTQ81N8QHG8o9vbR2sIt Do+RETHV1p5iif61NoCRypoWRmgIn5blviGZy98sRKWZZAd+og6sztwaUpCe/O25HGRJpQ RlM81KSqZgsO6sqFpPxIMUe05VFCZqU= ARC-Authentication-Results: i=2; imf13.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="Me6zM/ZP"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lUAxqbuI; spf=pass (imf13.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=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1724198178; a=rsa-sha256; cv=pass; b=F9jZMYKldd+uuYvVoux6FChHBfVjZK4Mfdwcwc4/DPJcBPV/5vIZlKJJZBcBVA7pwGX4b0 eancO4qg/L14WXV07VuQBtTyQMSLtru8/oFpt9mvJYVtdDycp/AX776a1VxfakLh7YYwqf FAIWJXg1nP9wwy3Z0k2IIQ9UnjSyiQA= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47KMBboa017802; Tue, 20 Aug 2024 23:57:57 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=+SgEZNii7vamI+Wr52WRA094htKGd868kPJiAHCbwa0=; b= Me6zM/ZPC9I/tL3gi7hWIGQM8VfKqlxm6I7DsMR7gBNk9k8tloSDLVJEc+YOWJzM mXgjBYSSVJIwnG8vky+M8LvlBPSdCk/mjU6PnIP99oBCmvzCDszzHH3l26YR/ZIO eMjpRPitBWGX3tRXGh/ip7euSDuPRpA8jzExWsOLX/82c2xsvu8GolKBK/SVjxUC Hn53d8cyYGYDskTbROjSfdFIkk5+AsK+/Mlp/yzxo1zpPp69pXRDMDf/IVkJ2tjP bI7KvL5DQlpCSOryI7kTWAalY0/r3Z7fqmV1oojb4RAiggzPpGFfw+gHYdWQ6gZR 2FXSN9B5myWDe/1a1+PSKw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412mdsxagg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Aug 2024 23:57:56 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47KNY6L7023532; Tue, 20 Aug 2024 23:57:55 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2171.outbound.protection.outlook.com [104.47.58.171]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 4154x78fsn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Aug 2024 23:57:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Tp4n/CJyYRd2aY9WcFrs7EMMtyCabnLoxMd1nJNTzweu+E13Smp+C3Evniu4fLZYzHpVg8eihVFAqdsJGc/EH+yLq+rdwW26h22AZhVJL5BxkB4IIJm+wj0HyHqOR94kpP2VN5T597hQIBjxnMTMrpdHBAy+yyvkVy/SJrfFiDp4rFoiL1HMnKAn8d+3i19s8PBGFmFOKwztSJ6B1kU0ySE3En19AMCg0j3wwFBk1vxNsjIyzvuNKFYKE8KHDRS2RQ5ob4cc1iYMWy5DxDmBFVPy7lTgwXB/UN7jazv9XEjwUgfhTJsxHy7PoKqiF3lCsoAkGt4/wQY3kIKOTOZpAw== 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=+SgEZNii7vamI+Wr52WRA094htKGd868kPJiAHCbwa0=; b=C0efeCCiJCft2R3dIY5AJ0Yee//Y1CyIg/6pN4cZPQm9GXIJypWQa8jEMKSCDZrkDUz8Mui9YzE2AXisVB5eclBljbx/CTpCPmGvrkToyIsMlh1RPNMLABqmlpKIh0p7m6MtcBZoXoQmJoRx/raZjCgAxtEO1LTONBA+zE6v1BN633XV1ri99AilFnC4LMhC8N9G39FrM09WOPEPdy08SGwbaPotDQXv3kkeVrrnS6dIZvEuvGjW84w/7t89DdK1T4WXIOXHNU9SjKXOMhek5yrR8JLxY+YuiD3uEyhiAlieGZDg3QfTDF3j0q8hKRLjcq7jo6uiV+cUUjCDmkFRUw== 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=+SgEZNii7vamI+Wr52WRA094htKGd868kPJiAHCbwa0=; b=lUAxqbuIfJBqgE+7RK2cS9igh+O3CZCVNt6ZF9BInRCoNkLkP8K3t6hY1OV9ifdhj7wj8FvnD3onmHtaUz02UvocrLVt8PiAuE7Xt9IoXcND+EzJgAs5q4NSJ8pxs9eDHka9DzrjeGcLheUk33raX7+hr9mUpzI52pcvDaDTHQY= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by PH0PR10MB7099.namprd10.prod.outlook.com (2603:10b6:510:26d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.13; Tue, 20 Aug 2024 23:57:50 +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.7897.010; Tue, 20 Aug 2024 23:57:49 +0000 From: "Liam R. Howlett" To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Suren Baghdasaryan , Lorenzo Stoakes , Matthew Wilcox , Vlastimil Babka , sidhartha.kumar@oracle.com, Bert Karwatzki , Jiri Olsa , Kees Cook , "Paul E . McKenney" , "Liam R. Howlett" , Lorenzo Stoakes Subject: [PATCH v6 01/20] mm/vma: Correctly position vma_iterator in __split_vma() Date: Tue, 20 Aug 2024 19:57:10 -0400 Message-ID: <20240820235730.2852400-2-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240820235730.2852400-1-Liam.Howlett@oracle.com> References: <20240820235730.2852400-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT4PR01CA0112.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d7::11) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|PH0PR10MB7099:EE_ X-MS-Office365-Filtering-Correlation-Id: 353a9446-2b49-4b15-6eea-08dcc173e5a2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: DH1k4puYGZFjcfFEAavWg6e8sMHhRmbBb+mNFeSXi/yWD4tt0sAadRBxVSAoo+ADlWW+nLnpC68tT1ojl35x6yYDkqHLDpwpXwp+881j+rFL5Kme0f+mV8LznTW+QlZMtklawzE+IVKyHCDnCjTA2SFr/bLIqSMZ7k24lhNCMT9HJ4zpa98m2V9Ktd/OcfoVyorI3V/Ss2T1eucxxmUtFl4/lAcTvFRH1KpPcJeKikEdBPc68YoeURPgxsEAr+TJcJ9LHfM+60MYgJhqhPOoO133uU4bmq6PkbwWklfX0DpM+qt3kLqeb+ra5teKMl71CkoEw2BQGOv/Wqt7NGrG+03r00eJ0SVor4eePapWpTnMdeMhaGWhSkDB6BIDQ4SadFBl9XHcGkNs/5I0ekMGpmnGjywe33vCj/eivFMwEG9WN1CnaDACmYKEVq/9paJWedjZyT8oDseymNNBiAVPYrFpBUtiMT9Wi6co5aZ0kyaeJ2eeD1y4EVYlpx6RenAXoCrHTjR2Mzqvg0cy68GjYZ7C3v4UTkG4GSQFPlSG21ZoYkXNMrNeH0CkwsRW7jdGGepUoJAfavgb7RneKmsLMb9botA74qOR6Uaw1Qu4ACkyykrNn6CLvqXW7VBYyWCSvcYSXqCd7DOCTWLUsonSJ9vreJmON+G54kjL4gp+DP77pWBOWm8RkFogsOZQvFh8Ql63hjyWnCFO7BlmNm0WiKNMRGT5GnXn6qwI4sETzgqSBTCnV/KMkMuGoS6dwbdXi0vLnJC8bWAq+Iw/pColRB5yacc3/K40WxTBa6pkfo2Am9bKA5lS49lSAroaiLVYwFZDYXb2g3LBpgk60qVlWklgamfsIKbYgd9IWQmb+jwHZiLQ2je/3wvz9UbCD9FfVyEZHx7buf8i4a2SctqTEvjK2L485tgFjYI/emlX1x+s8qzAa4WTPIUKKHk4eHZGAMVgvSUISy/cPOBL34A/dQ//rA76sXy/wSAEY3kbUzxQFL7ka1oKpEbYiV/JAgHjmHOvgQhJzn4Ok0RBU2h0pqefhY3b/d3rIlwyVVzMAT4xQWk4Ykgkwii/++Ee1M/jM81SdRd5k3hxTZR0sWAEWxlThAZJo1HvPiOcUMNN1hdleQviS8Beg61Cc9b3v1um733wCuFIfO6Wuv0jkym0bD3YRsGjrVU3GmXWAmx5XQXWyhvT5Q8IbUIH70iiqH5jVkl/OWa5I58EBTlKPQI16HJzogj89GkQxSrpJ4d4swlI2IQZaNxuasxsU7jN3Qds41ojf+DVom3ucFOg4jWTzDtn+lYZCTQs+DeWqoLlhrJTEZr2k/RDk4PoK0caAqXzSesChwSlWiABpMHFlUKEsw== 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)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LtpkUH/Jrrb/wrVcS54Z8NwmSZaC/IYMIUBd3H6SRowEuYmO3rMYD85GtFQr3jhxn4GYS6KsGXmoD3npOgLeVV3XA42pXm3iMwh2z+EskSkWJ3Iy8Lm2qLwHW0LN6MK7YajL9YHWOK9i2ZG5eTLFH80X5cgKSr+PADBlfeRrUr/ANfxjY7vajz5GPxANW/BxJLB3ypZHgYpEZWr6CijCanMDyN/y49OswcqYHVGO5auQio0MkdbLcr04kV4C10MsA9reQYSRjg/qK67oIJ9y7CJiC0etbI4nNxGpv1p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PbXgCcspozp6mpih4uY4cZ++OLwr54D18P6KiTvFR+va4XU6efmZzVqzl1G0SOTtOPkr0zz61Ouu1U2FEzLbhholKTZ0Bladj3Yd4ouNAY4y2FyADwUXLtJ1pcEIVi7UP29nAFyl+DH3CV13S4SWHtu/MD0nwjVtcH2q08em/WpaPHEptnntGf+U/PldQAbdqLOraQsCMI3BsurKpu89h5uanxhO6a8c4MCcEGciE1L4bX0kuALlII9ujboitdQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: K7oM+dRwybG6AOR9JDqqDDH/mdAdzCaEbZ7I0wnpMXvi53CLSX4RW6GX3Hj1+ORy9ToBSvuxG6Z6HqDBG343n0DVsh2lorxuhNxBpyq73wTmqvrLHGELC3/UsaXTVugpXim+rWrgi1TmqOM0o4aY4FSNTp3J95L8ZkVx8rJQflQsStEc1X5RvXHj+xb5y2KUAVKbWnhN6zD0AWn9E8g7l4afP6xFlF+dIErWHHAuRXI2JG87k2752T/CBDE4SAKi8HTp8k6jMYQ5Aq+dtAduMtXYRlMyTAzaLuD7aaxGc7YN8hYFK+xJWBrP+ClYAqXYSQqVRmdC4pAc8KkNwezxhS894K96MgAxyIlmmzqyMpMf/w7cPBVjvg0RX8x4SLBl///gbBg4DMazbebwHbrij+3SQTEsjqZB0Vl8Il0Xz6HvIVxOg/Ob7MDdl7kK22FOJjIkoiATJJ20VZyS6WfRiueKD4GYMWxhtnDAuk9NevQtvhmeG1KgCAeFEE0hILYIL23aBsMqONdAxzRtNEHnpizn50F2RIuZH7M2jZ3mLvfKEH4ciCr5Z/J5/R2NU4nGtBTMHHm4TeJ0ITJn9R0AhsZHx62iPyv+nizqNyV4pJk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 353a9446-2b49-4b15-6eea-08dcc173e5a2 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2024 23:57:49.9065 (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: +XMlbSGQXJegV0dgU11gqbOE9em6V8eV89iasrRZjKjyvm/LMSXMWbB/4eHmaraQSSK08v1lr3AyD75aO0/QCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB7099 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-20_18,2024-08-19_03,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 bulkscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408200176 X-Proofpoint-ORIG-GUID: Pkly3eK0LM7nZv_XIHanr2QxgglMfv0c X-Proofpoint-GUID: Pkly3eK0LM7nZv_XIHanr2QxgglMfv0c X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: BAB4420014 X-Stat-Signature: y3oukj8f3wkq5oh19ipitbqdaa7nozao X-Rspam-User: X-HE-Tag: 1724198283-31034 X-HE-Meta: U2FsdGVkX19z68dCdUKCnHuTOv+jzg0arzvg9Zl0ntx+XDis/s7F4qeVFKxhWKD9QsqaqsSjls7iwPah9rJ8meJA9QhpRDPCx+35UJwb6l2IthBmrH/NiFRN+SIMkXjFgQrjlewldczE13/VpQXdcnOLH/8S9imkQu/sMTtdxruAskl4tLaGGw1Z3EkH4x9FzVUkEBJJa2KnQDebK9LZT0CS4Ce9tuMQ0Vc9k3AyHpNaB9VFYUM1cDuwVRiZI43XFqvis4UhmvIP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ndT6T5ubHH17AlznXqvJa3NttG882awCTjva3WqtKvXFeP/MUCtFEgS2voPu7bqCzyDYP+W4aPpitzWE6gZ8ulOtKpCXdU+iHO+TtKd1/VDO1NJ4tg9Q3iYr5AZwn6LAUOmrk04Uf4A+NMjLnfzR6wcfVEjO+MXH1Drlsg= 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: From: "Liam R. Howlett" The vma iterator may be left pointing to the newly created vma. This happens when inserting the new vma at the end of the old vma (!new_below). The incorrect position in the vma iterator is not exposed currently since the vma iterator is repositioned in the munmap path and is not reused in any of the other paths. This has limited impact in the current code, but is required for future changes. Fixes: b2b3b886738f ("mm: don't use __vma_adjust() in __split_vma()") Signed-off-by: Liam R. Howlett Reviewed-by: Suren Baghdasaryan Reviewed-by: Lorenzo Stoakes --- mm/vma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/vma.c b/mm/vma.c index 5850f7c0949b..066de79b7b73 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -177,7 +177,7 @@ void unmap_region(struct mm_struct *mm, struct ma_state *mas, /* * __split_vma() bypasses sysctl_max_map_count checking. We use this where it * has already been checked or doesn't make sense to fail. - * VMA Iterator will point to the end VMA. + * VMA Iterator will point to the original VMA. */ static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma, unsigned long addr, int new_below) @@ -246,6 +246,9 @@ static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma, /* Success. */ if (new_below) vma_next(vmi); + else + vma_prev(vmi); + return 0; out_free_mpol: