From patchwork Thu Aug 22 19:25:23 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: 13774110 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 63D62C52D7C for ; Thu, 22 Aug 2024 19:26:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CAA5780050; Thu, 22 Aug 2024 15:26:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C0AB38004F; Thu, 22 Aug 2024 15:26:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 998A580050; Thu, 22 Aug 2024 15:26:24 -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 6265A80049 for ; Thu, 22 Aug 2024 15:26:24 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 00BD3A048B for ; Thu, 22 Aug 2024 19:26:23 +0000 (UTC) X-FDA: 82480862646.08.8B74ED1 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf20.hostedemail.com (Postfix) with ESMTP id AA25A1C0019 for ; Thu, 22 Aug 2024 19:26:20 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=hLXbAvK3; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=C9mABP53; spf=pass (imf20.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=1724354672; 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=7e5BvESY5NJKY1CEM2o2471gYr3tXX5C2wYhnR1UxHMpWMJ/lVDrPfnxu06GmBgw0d+qBk +NruNrlqHIom7EvgQItUYmjws4JgzXhI4K6NSv6sM/S6IC10GKzFl2jG1IGnSYIAMDzRnn yXalTACxca3VrcmhqctoulFTysCVVRE= ARC-Authentication-Results: i=2; imf20.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=hLXbAvK3; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=C9mABP53; spf=pass (imf20.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=1724354672; a=rsa-sha256; cv=pass; b=pCRqTnhGOwkj1tdoTK3ENy1nUqgdw6nnPgP4mI2oBnv/98Sq13NB0UzjFTVCl5cCYUIdae K6v0CPG2MjO08/XufIjSmzvKIHJz1ALAnV7/UbuJaTM4ZTUuBvC9+5jhoELyoR5vXHbO7T fy7mxRM/HQLlJzSkPtsFWUhOMTXIEps= 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 47MIMWwB019187; Thu, 22 Aug 2024 19:26:08 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= hLXbAvK3NkbS75NtQvpc6TD/FnM9BFdqq4+1JAWZJQH0jkhiwXVIDaOecLPLYnzJ ynVbllmPKc0+MMlbuPZVkmzmBqmr6t8PYwz3YaRyIx1qjQG2cJX2l+zosYMJdoJB ifP999VS1TWyexO/+YICQlSyj3+C/Al1ZgN/ObGr0d+Iy0BKXehCd7FhjzB+1j33 b+KELZmo95B2CX8cRPGtPI5FcsD+70/brfQ/Lz3xzhwcbd4vHEaXP3r18sanRIrO Jq8uhLeJyf2MyWn+YpRwpG2uRFW6fBzly+5M+BWkLyQb0ditX3jJAoyfIl2eYxYC idm+UgMs91zd3X/FQw27LA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412m45jw8v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Aug 2024 19:26:08 +0000 (GMT) Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47MJJBvc028114; Thu, 22 Aug 2024 19:26:07 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 416bct87dg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Aug 2024 19:26:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IA0zdRyndS7PQUlwnGqe/mtzqnw1aPzzkENiuCCFWjVY843nkD6FPi9b5cKpeY/3eZQhn/CohAsElQcjlOk43Zy1eX6ec2j5+kia2gl5MWaU36qg31/7P1Tuk8dBd4a7j4F6CnamcOFjAur+r/uUdIKLEyL778IQFXmncXBZ87UXjpScX/y0ypXJpZ1OzVe+Smw9BYI4g5MO68xuhxMxyjr2BgMqYSuYwWMFd9bq/878MOMCipvDJ0qRC0eYt5O03xXA3ANmikOKTnNmtUtaDFq1yKLSdkcHg2pXBuWc2ySMAbiR3UNyVwRIo4nf02ZIeWVH2XeJT2YiEqYMHaaQJA== 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=Pl8KLi7BGF0xlZBoRsYKBk8OGckbP1CY9NZc4cudMjK8TK5aCLV0Sj+tMp5HUVCLp1G2QI5UuPJmBLlA1b5lRiv35sUgpD7MIRra8G0EZtNzYDOHZlyoqFO7ppo8vh6fv2HI1YyJEIxLibm64sNn/jhwSKRW07Pm6hRim0xnD6jVzA65HzgfySsxNRN8xg6t3xXG1rZuq3tmmbOw8Q0peOg4w+76U8Xc6krO8jogSU/nkIo3rQe998I73wYWKbfJYQJge4UTTqlvNtnsVbTpn7B6e8E4dEMijd8is5vxEVml62HQq+YMlx4Bb4DR9eN2UGrAB3KFRHkB16n/4nZFhQ== 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=C9mABP53k2wuLEAf1X+r9YKLOIG38XD0zfOvZD1c/v/uq3I0CAQVX5/RDfqBUUamc+P3Pg0KFsHq7k5WT9Wz/XMDAN3gmjm8x3m6bRsHJ7ZLJQfWxEIyb/Wqu0aV7Xy1jBPQREYGqFUgJW57/2vw461c5509SpfjfzuGPqd/UYE= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by CH3PR10MB7356.namprd10.prod.outlook.com (2603:10b6:610:130::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.16; Thu, 22 Aug 2024 19:26:05 +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.014; Thu, 22 Aug 2024 19:26:05 +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 v7 01/21] mm/vma: Correctly position vma_iterator in __split_vma() Date: Thu, 22 Aug 2024 15:25:23 -0400 Message-ID: <20240822192543.3359552-2-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240822192543.3359552-1-Liam.Howlett@oracle.com> References: <20240822192543.3359552-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT4PR01CA0155.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:ac::8) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|CH3PR10MB7356:EE_ X-MS-Office365-Filtering-Correlation-Id: 9bea9c5f-499c-4dce-0f17-08dcc2e041c1 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: nrojkfse8nWjCvRRdZXsssK3/8SXgusdz5b5kjjsOzJXsvAPMPibyWbfsmpeGr6m89Jg7T8T9PT0V8LJyouNon7RMlYVz4fQAj33Z02PSxBEevbdJ4HFz2K8nTFgnE3lES1pL2IFlSN/JcBg3yuUEwVqoC3yHhZJwPOy+g5WSKlhzbDiDyMvanqxKyYd6XycZORJqmOra/IdeW2BTn7BMme22s/wu5naClXROKlAeVQjbRskm1p0wOyp3Vw1d+8kzxnoOTfMHDEbYBhi46lvUznnpjvRuD+CLNiGwIOvJ8wZJIPUCfJTxgYuggRos49kFIe2U6UOBx7wAGnB3RxYeM91xPheG6X17Am4Ieq/h2PpnVke9mMBYpw4T+RRjlzxon66/1o/IHhZPfqWAgBWMhvfVkjMcNS4Obtd6cOHUCpCjNSGJ/L4u2ZQcX+kSYTOtDEcWzr82tAJPs1xGXgXErmjNWMieKQAmREOnVuMeSmeW1gQiysBjhyxlMHfLDbdfNiu9RgZZuIdJTn/Lax3RzsMtQGgfYb0NVYWJht43OELvMSmoYkvH2DsZmGvoVbMdww8cOi9ho33S212+gJbbiGGvXA5a1H2JwbPPNKrmCvWxFmdrrv2lttzBuEPS6McgeIivRJc/2Z8He7BlEaUDS1XP/DfwbgbURi8YcNFIBB8YyP9ifM53CER6e/bn2oWaq4MsqlLG+UC75EV56Q1PuBbX1XhIAGZX9ONCLizPQT+kMQ7q4qp9/qewME/jMQS7AxtClyRNn89CknRMNrCtwBdzCWM20cvA5uQI5iKk23b5KOtnMndJ6tqH8U0OLCTrFvnPhLkGdOrw5DRXuAQgZkkMFrxNXR3Av3r0ZLosNEWrq/723w15BW1O9UJuaJr5RI6NGve1tcvoDJvjVxmbhs3L83Ew4JSypfb7TMvMBWs5yEcVI11dc0FocXonAbCM/TA5J2EocnYM2vdQIFK0JQUYppgGD/SduN71lSit55/hEOscnGgUaJXJBunbzKVg7+ZaCOh7tYgf7Etp8Gr1W1E6TMUmJ5Ob0wxSMMRFIr4E5jz09pEOAOqXUf7UkCszE6M4wRq1axFiwNIcsKZQwNCLAfRBUYpw2Q62Y7g670wyauLG2bDryJGS9NF8VlFuQshYykdauNddt6JLRlJUzrT/de8Nozk18cvAOVSMTp7icpUzxR7DOEGo1BFflhyuXTYaVXdUqGDiNGqalxGrk3O/5Vv++vnNKpRuJZg9lI49bdGJcTjKLAAtYOx6crmJGFmnEj15hs4fsnp9qUVUhCHIwX4yQdVoodoiVcwYob6leDur5hLhhNkBTwYUlOj9hVPrkYzpgz5tRFCJVxS1g== 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: Z9ebnDYdFG2a88J8qCAsaGDqcYkuHw4eeUWqdiF0gFO5NZZj4zv368krdcCEnO4e0XDUiFwe5FAQbw1zsr3iiAEMtfKIYFgdrT7b9YhwmKkqagX7mZRh3LrPk3pHLAbPkXrNdzF+P2RUa90kfqZ/7PgSDMlmDq+OHIrZfqPmX7aamoUTXXsheQqwIctd7B21OCf1m7oBA/nl2aGoFqE7mdiJEa8FFiUotczUzt24GvstEvL7791Zb3oU3bLUKlGT8RCp/5PuQny65yeULAPgqCnO/AFWNCnecD5+5O7D7bxrRdLb03tsOqpZIY1VBFA0u41vl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1RnRkVyYXuPRZnegMEzQekzhvc1+nOmEFnh9MmDmKgyaQOCVQNC7djEDhIpDRZ7Sjar3PJyH5dHTrvUoGtQd3UwPDeudrCaQ1MhApwKZevMW9L6OuhocarTAvr+o5WR32EBPVSz1ZX6hB2CbKcqFcjB+YkHIMCyCNUSqbnt2VcwablIhi9hEKcqvUBFMO0zRfL02LCfe1FlNX9MqEgWQjqOQnJZg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: +qh3KrdtlvkJW/kb4UCEdgADbMkDE/+PSQMLDCYCNmweVj3cFcpHZ5bfosMBh18bqjKwxHw6UarDI6CylinpQNThAwbf7TffdXs950+++NtWFhW04C6VQ+7kvyb4beNrQlZm8PqHCLBJ7LQkepnV1Ym9WgF5vBtoqljwM7WNqTDWbjSoarBoZE9GWiGbu0MyavUDPM2Xuy52DlXJUJ9CxNKuQjrx7zZSmGb3OQcw4VzEikPkAJnBDleoQqPXMJdLT490yQ8Tc18Me6/p0lB68qoxBvpq9eONJalNrkWK+yEyEcKOP2p+zI7cywKW6lpIYbb55anr3c8rApUkVCk8sSzqAQFEjExUKKbOSs7ZrT7GofYGA/Tlr5nh4Umal9EdB/+wHz03tItlMnNubg4iXICWQsX5qQNaPFZm1AQp7wHD8kULwvDjm2BuGTe7MnADgzquTZzLOVFT4SGo7QZ7hLQ1sbqSN2Ksgthyz0mq8pPi+n4QzEplFhcV8nJmCs2apwdqyZVBXCF+g4U3AI+ihcuO3JpDWPKh9uDr6kTE5gQrQaxV6G4PTnVKij4Tqeb640omU4iFyyOj3b1q/pViWi52ctPCErPxWKX0MYbKu/8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9bea9c5f-499c-4dce-0f17-08dcc2e041c1 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 19:26:02.5333 (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: 19c+xLbuu8cD8IvYxsyXaN5sp2Ej6TAUG/Imqk/Z6/qSM6zudNhgIvTddtJfX8cItOBQ4/KY4TjAMULEBAM4SA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7356 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-22_12,2024-08-22_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 bulkscore=0 malwarescore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408220146 X-Proofpoint-ORIG-GUID: PM4w9XTmSZB4njjbw5GPv7D9Scax0FBb X-Proofpoint-GUID: PM4w9XTmSZB4njjbw5GPv7D9Scax0FBb X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: AA25A1C0019 X-Stat-Signature: y7msje4r3saqfm5pihb5fs58oedso5zd X-Rspam-User: X-HE-Tag: 1724354780-943845 X-HE-Meta: U2FsdGVkX19U+ZghdXYM3AK9FQvQAcxa9IHkcjfdfOxh7+5dm0+0dARM2ca55SpBlkiSFnNzWU8EiaNn5WTyxOHoUW27toPrh6AKoZNdW1nmOlG/1TYn1/aCUNGbMcxjBLFEUqYEJgswvlRqEIP/PlhdijU2nSPJYYOCdkCH+lmfhtYwRXHcHmFbxWpRcCJMnO9CaDH16lqKDQBPGD78s+5ErLIRFeG0yEjePo4N1a+VHbk8Ksmrc4tM4t7uy7Ohbs/s7gI0rH4Q7xJfMV1/iBy/LEoT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xErPqSAe0xG27dFkwWcPfne3EeGpsGZ+CCXhEgEPtR7VlXAcQ7WlIa9Y4u6ydpAsAwguDRSs5JLwnklzQBx6To6oUt45wqSons8MhSTIqiPtFQXGr/1J6ks5Ww/uEEXX5rGaXKKA8yrhxR/eeBom/Aa0f0Cxs2SZfcF+Zhws8Ebolfx/radLDCOqwBVsmcoElZqAAMpT/PW3Kkrfj2A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, 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: