From patchwork Thu Jul 4 19:27:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13724231 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 AD332C3814E for ; Thu, 4 Jul 2024 19:28:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D4A66B00BE; Thu, 4 Jul 2024 15:28:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 383836B00BF; Thu, 4 Jul 2024 15:28:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 18A626B00C0; Thu, 4 Jul 2024 15:28:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id E31496B00BE for ; Thu, 4 Jul 2024 15:28:31 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 59453813D5 for ; Thu, 4 Jul 2024 19:28:31 +0000 (UTC) X-FDA: 82303056822.13.AD773DF Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf07.hostedemail.com (Postfix) with ESMTP id E83D840003 for ; Thu, 4 Jul 2024 19:28:27 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=F45mFxL4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=dx3V4ZWg; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf07.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@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=1720121282; 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=7yUoHz+y4bBA4WnYst+c6VR5ABPk6RgWVBzoDEOoRHM=; b=K+yr7JMg04KNXM0Yp+Wq1fDJqoKcDUL67V/0RpO/J1s+wtpFhay4KC7xZFE/0GsZdcQrhj 0FvOWcxdDAZyixQCmvNgc0rIg55ajf0o0TMDP1Uk6z2owO4zXs39AqemKkNXeSgWx6K5YJ IUp1uBIkaG70cG/5tikr2r0axL4AwtE= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1720121282; a=rsa-sha256; cv=pass; b=QiCuAT1NdLoBLzj9sud8zVIc+967V1nsQrAVNkqOSRe+TJxO0ZUu5EboYLuPxDDEJmyVE9 00/xGX1h0VjcDLUiv8tSaYqBTGUQ+kcqMY61+1jCngRMF9qE6nKNfKds4CTcFYKybFxSlQ TRTlDqoEbrxz4zDEmkAhve7FXJCMPbI= ARC-Authentication-Results: i=2; imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=F45mFxL4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=dx3V4ZWg; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf07.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@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 464Db5Q0016625; Thu, 4 Jul 2024 19:28:22 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=7yUoHz+y4bBA4WnYst+c6VR5ABPk6RgWVBzoDEOoRHM=; b= F45mFxL45bbD53C7JGPnbYZyhqh4eHfw44cITTrhhxIaFiW+vmSUGL2JsM0aMWHu LPOgJFYVaDEYby5P8UNnYYJJ00P77V5BnuprJc3kusFUfaX1Mozd2f3cAez3+XsW T7yoi63b1//unOznrLMvd4Gu7y9ZiZtGC7RCGfNe2PoDyC//XNcQe/fNVlAKKUk0 eb4nByi37XicOAotqQL+rs/YU4Fx2Ew7pFJV2fxO4QNqENI2KTeYuk9z4yeKjjFq 8qa2dsfhI6DK+8AI3kxxQmuyHaYCObjbDxO2kf5zWOSKldbzvIiCIDsizaLOjice tw2YTzxzDIdYc9rZFt4lyA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4028v0ts4q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 04 Jul 2024 19:28:21 +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 464JM40S021502; Thu, 4 Jul 2024 19:28:20 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 4028qgrd45-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 04 Jul 2024 19:28:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F6mXlmmqFOLNBpc6zKcbHkEO5wIqMk0U1lDnox/EY9/H4qE3o5d3AdZaGROQEHzaN0jjfsVKfZE+NCCPs+qJyOeOa8gRYMRp9eADgRn8fJam9/YiC3almFvJQyuuyoL48CTXShhKC4R3htKw+DOfF/SY9l00QXWm458th3Mf/rZ5aBXmJcG0Ho9/BZgs4EesRdUBsTnvv+tddX8Y7CjTMoFnlWl/OMHDVJ4uskJfbrHaSJMwsuJakbRfjFbR4ogWCxHqTa43WDAFRocABE1SD6SwzeQHG6wcImSn2k++Q1UF/yc5DmpxSDfs+HkqgFMU27akwmH3g82b7L6XwQacIg== 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=7yUoHz+y4bBA4WnYst+c6VR5ABPk6RgWVBzoDEOoRHM=; b=BznmoJAUjpCAT6RqVDQf4ldip99XImr05qkLY82xGB/2YX+ttrghpTgTJ5X8/RY2AmmOaBP1AVf7fkEYIsN0EpQaSlsQVUmKhklaG7zROWq3E7b59QykjS8+k+6P1hAW5IToJyWhBD2gX+8SCeOARqG5YILFaCZYhjkhkynHYXJLjC3lB2o8wm6HwR8o5ItI9HrGpzmv03hN+JHtzgtaMGtnO8oNHK060RWwf9Krjh78b9fda6tLf3OKzKyI/f2T+jLnLhATTzdNodTlEXonxzU0DS6E8RsnarFOeNrVtgce2O63Y1o+YTfyHWu8kMQrg+EalSVLdSfLHMFzuZdxpw== 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=7yUoHz+y4bBA4WnYst+c6VR5ABPk6RgWVBzoDEOoRHM=; b=dx3V4ZWg9E5S+Hn9aiCIIQacXcWInrE49j719lRam3lSnuPl9Pm2FIrIFacnXkuQmImk17g/LGAQcsGplaeSKkD24ZlxnPfClU5Cy+9eiGewTAkdw6DHQ+/FvV9+aMTXySA2qyUIiJim1P7dOMNCW6//20k1gqE7YYGeS9Ejwmc= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by DS7PR10MB7228.namprd10.prod.outlook.com (2603:10b6:8:e3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.30; Thu, 4 Jul 2024 19:28:17 +0000 Received: from SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e]) by SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e%6]) with mapi id 15.20.7741.025; Thu, 4 Jul 2024 19:28:17 +0000 From: Lorenzo Stoakes To: Andrew Morton Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Liam R . Howlett" , Vlastimil Babka , Matthew Wilcox , Alexander Viro , Christian Brauner , Jan Kara , Eric Biederman , Kees Cook , Suren Baghdasaryan , SeongJae Park , Shuah Khan , Brendan Higgins , David Gow , Rae Moar Subject: [PATCH v2 2/7] mm: move vma_modify() and helpers to internal header Date: Thu, 4 Jul 2024 20:27:57 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-ClientProxiedBy: LO4P302CA0008.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:2c2::16) To SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR10MB5613:EE_|DS7PR10MB7228:EE_ X-MS-Office365-Filtering-Correlation-Id: 69a90efb-ed20-4075-5e15-08dc9c5f74ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024|7416014; X-Microsoft-Antispam-Message-Info: 54yqzmlW6UU8T3RqkyItjWB1RO5K8WGtRc11C/L94q035J9oRara9HzpD7ZhGBhy5v6LzgD6IpyPfQEdr9aImtojSSTi1897IHOQU82JyExQfmVD3s6oSBjNya5aK0zQP5JwzxXkstTQIA4cL7Py7Q9strmL8B6f+KR88sLWPsVEN4QP6+6p7wtF311CG1YzvhLSoNlntRYW4O5yA7sDoyo6Zvz71zH3CkBGJlROV+dmIUQHWm3bbksEJ/rnbhVF+6597R+QPrpjK1YauozWCrnJBk+vDTbRR/al9+GviR1K/PKldPjFZAXS54pC+Dg0L+FWy88n7cSEWATTYqDsRDQbYca7EXMD/o9inno0xDbzlRFs6VibxR2D0PwkNwAoqBAYptPw+9xUSj0cgfCD+xEFQ52xf3yr35cc9AOw1yE08xPeszUoFZCxxU81JlJBVv0sVsiXFclZ92uJwVliMPvyDekLHxowD4lIrsfo6u5U8LXUIVR2XV+lU8sI/Yd6l+bGU0qTeCI59aQtaTpbFk5I6krVunft3jfK3ohG0DKWN++VImpNNGVwFOG6OYJucKUoCDsmMrfJWvevrT+a1iaLXsKJeWsZ2khq5iaK0vbuTNfdnONKu892FSxwVw11vxynW92Inj5rQSSwcqQblaUFvXyOE8Fk8fsWJOODHNEflSbG35itTAydh8D2p7l/TpjhRiA+lcFIP+Ne3BLUtUpGNBO6wcV8WJgjfp52OzHuKPsrR/qTu8qGFNZctnI0BYldTDFGA2vzIRoQfc3txMMFVtOI3A3jbjIp5MX6PeHPsRPThv3z7JAIZ75vUJzA7m7B839PGUiyr41FHI6otTVHouQee8jqGNrcVvDwrnJwM7MurP0W0nIFRloQ3fSDSuT1U17D00Ovbcd7vezqLuF5GmGOu/Uf81ZG4f6wRJgsYgAqODFiflRIF7zIbJqxlz38nJ4NBmD09GDzaJXpe6qSZg1QdzL8GEs2RLQONaZJv1RiW/oUwhmqoHfsiMBU0s81G7P+B3b2MzEmbRvj7LlNco5cCZQeV6L+ksTC9NY3ywzK0/bC4+r5TJDTRREPjwGF7Y3m8CaBvAb4RSCF1AkSV4MWD4C7sJowozFT3c7CuAP+DudfXLfnFyT2KH/n9xMLEnW8sHRODiPUWMMfkk+RbxWggv/NMxls6AkkHzn7kOI9m4t0JgoIKH4wJ5JmpE4BHJAgQzEbS8yzzMvWMigrQTAgajVyZN4lPSg7WpBsT71Fvlp9Vy4C8hogbxt9WeB9zCVz2BsiIcTpJa6oRHup3N6gtbx2H2h7j7EKP1WbY30Gg3suSD4bOCmIlt4rccJ7djNTdX1dvZyreHkV2g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB5613.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(366016)(1800799024)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2dhTn7cYXPhCrFL3q/eWd1WlDzXExCDN2LOjGVbAuUtW0wW/eBZKECBC0x7L9GmyZC3P3XYzcqpjvwuwnfn0dXNy2D5cHFt85jEoGq9gB9anwtonf3Zus6/da6ACsoW3fg35t5FTMYfJt3IloSC9hTLDGvN1rYwtOdEe6Q7Rlq79aXfbKTGfPKXlNHH9hFdIHDBvHUe/AVpE2WaHFzCMDoRg9Fsp8Ww9lL9KAG5QFnwxmGNL+TnKtUIU5frvHwYZcM8TwTRNVPk8ahIqRYOwBXISL3eM7IfELo/uvzUTB3crWwyKPkHzNcLghpJEEgl0JVif9mxB2iGy6dtDz9Rbu6mIYjYGYhRo/yHVUz116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W76K+t3RFEh9Fv7s7Iehwaw2G29YGmM7epE74754BO53oixdQSz4m+UwlLQXU4OGG7iFe2F/n1eoFyvp7Hw0TrZ0uRwCUhu1p01jh7D6+Ub7+B0GE0Yizs9e60rhBvoKUWZV6UkK1QYHuAU0wTstTL/4xzYFiNX4qLG6IO/CCrTuKYAxx4Ff/NTEPKibeNUhZlRejhnF3jvbwQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 4GRpH9AbwCb0Rvx9o8/I3B7POpq+R3pQUFpCx+LUoTlqgGsIYQA6IJppBNSmmNjBSOW/yW6GHt+SG4n6jm2TjabO1bwnnitBB5t1EcyMlIGQz4jI5ulmuFsZ9n0vcVXqM9iiog34GyWgFHCDFzUv9cYZFfNl83tq+RcaH67uMuCI9Kb/5WBaW0KpsKRM3URXnwVNs4u4429v+ysoFDC/a7jgvmmvBWZiBxZr/u7fXNibmEO6MBEXyozQS3UVUqNeq/b9PexCkWfA2APOsZBAMjrqzNrJuXI8j3kysSIGpaTCGInpN++U49PV3r116l3WtzaGT6eGjqcVmZRbBqECN/SWeMisHZowHL1MLTHkxYCYoQviOg3CXz0O8rWyA1435aciU5dBrTjqq3F9z4LhsEq8HYpTd9OGiKaOjo/10oNizfL/YXHD/BFHXgLwC30NsYdGgdWnnWQnDDqwjzGFotwLgYzMffjNs+gJQ7RAtX5Y2Bn3/IuOz4U6Se8G2Uwo04YaT+UIi5qnYXjjBCZ/EXq5OtRgZL3TXK0gOyIlt+8prjVUDYWqLODM3RNP5vQfEAMkuK30M2752WFbRhBfnvUC6UqP1b5W/8Vqr9JVZG8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69a90efb-ed20-4075-5e15-08dc9c5f74ca X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2024 19:28:17.7042 (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: Z2xiD1FVCYBOSaAFA7eTbwQO9jLNLEgvR6C0tLYR+mhIpuidSqYRmJ0UFXA8PmY11KVOnbMUbCG3Zf6eGBGllLVa7FdqBpm7DSqqUPNknsE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB7228 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-04_15,2024-07-03_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 mlxscore=0 phishscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2407040140 X-Proofpoint-ORIG-GUID: 26jo_-iDfH463KtlcrHMzIllazVgkicm X-Proofpoint-GUID: 26jo_-iDfH463KtlcrHMzIllazVgkicm X-Stat-Signature: 49of1qeiqgywdjqrrr39sotyxkz8o834 X-Rspamd-Queue-Id: E83D840003 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1720121307-590641 X-HE-Meta: U2FsdGVkX18EwEFRY+eKt8M6DQjoKXwhJbcRzdDV9BYGJmDkI0v3ar+KFZwOCU1eFRfJq2fDwDEtfSsOibNIOWFeqC+q/Q2rGYETXr92PFyGVPYJJVvVCeqdwbw5PY/desmjBWMU4K3muLgcZ/q8kIG4dNTmmMcVwY6uryTQ74WAixxVQ7gPiwMEb7nGSWFcWy6GCix9BLe3c3PDPw4VtcTWxmQnoWGSPyOI7YtXpOdEcScJpJVFJvLTJxjD//ESNM0sWx7nOpjPjb6Jv17qJzi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ZarnmsKePafjx8pMHJwgv3IYFpc3N2QAB1Pbznlu15fg7kM5i4JzOJEvzSRIYCv2l1nZXptgfmxYlWvU1ctKGtoo84y7YGPS09yjV7sNoO+EZn9GNw643Vi/eun9N9lhIUlS44zplfcXT6o7r4q2blft7HjPb7q/jrY3Zsk7vruHg5wO9TphDbPitQ2m2NItNT0fpKcCef2CQkF3TtMFFnxg3OJz5Fka5+01J1omwCKdzHKQWpSy1H5Hps 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: These are core VMA manipulation functions which invoke VMA splitting and merging and should not be directly accessed from outside of mm/. Signed-off-by: Lorenzo Stoakes Reviewed-by: Vlastimil Babka Reviewed-by: Liam R. Howlett --- include/linux/mm.h | 60 --------------------------------------------- mm/internal.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 60 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 5f1075d19600..4d2b5538925b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3285,66 +3285,6 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **, unsigned long addr, unsigned long len, pgoff_t pgoff, bool *need_rmap_locks); extern void exit_mmap(struct mm_struct *); -struct vm_area_struct *vma_modify(struct vma_iterator *vmi, - struct vm_area_struct *prev, - struct vm_area_struct *vma, - unsigned long start, unsigned long end, - unsigned long vm_flags, - struct mempolicy *policy, - struct vm_userfaultfd_ctx uffd_ctx, - struct anon_vma_name *anon_name); - -/* We are about to modify the VMA's flags. */ -static inline struct vm_area_struct -*vma_modify_flags(struct vma_iterator *vmi, - struct vm_area_struct *prev, - struct vm_area_struct *vma, - unsigned long start, unsigned long end, - unsigned long new_flags) -{ - return vma_modify(vmi, prev, vma, start, end, new_flags, - vma_policy(vma), vma->vm_userfaultfd_ctx, - anon_vma_name(vma)); -} - -/* We are about to modify the VMA's flags and/or anon_name. */ -static inline struct vm_area_struct -*vma_modify_flags_name(struct vma_iterator *vmi, - struct vm_area_struct *prev, - struct vm_area_struct *vma, - unsigned long start, - unsigned long end, - unsigned long new_flags, - struct anon_vma_name *new_name) -{ - return vma_modify(vmi, prev, vma, start, end, new_flags, - vma_policy(vma), vma->vm_userfaultfd_ctx, new_name); -} - -/* We are about to modify the VMA's memory policy. */ -static inline struct vm_area_struct -*vma_modify_policy(struct vma_iterator *vmi, - struct vm_area_struct *prev, - struct vm_area_struct *vma, - unsigned long start, unsigned long end, - struct mempolicy *new_pol) -{ - return vma_modify(vmi, prev, vma, start, end, vma->vm_flags, - new_pol, vma->vm_userfaultfd_ctx, anon_vma_name(vma)); -} - -/* We are about to modify the VMA's flags and/or uffd context. */ -static inline struct vm_area_struct -*vma_modify_flags_uffd(struct vma_iterator *vmi, - struct vm_area_struct *prev, - struct vm_area_struct *vma, - unsigned long start, unsigned long end, - unsigned long new_flags, - struct vm_userfaultfd_ctx new_ctx) -{ - return vma_modify(vmi, prev, vma, start, end, new_flags, - vma_policy(vma), new_ctx, anon_vma_name(vma)); -} static inline int check_data_rlimit(unsigned long rlim, unsigned long new, diff --git a/mm/internal.h b/mm/internal.h index b4d86436565b..81564ce0f9e2 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -1244,6 +1244,67 @@ struct vm_area_struct *vma_merge_extend(struct vma_iterator *vmi, struct vm_area_struct *vma, unsigned long delta); +struct vm_area_struct *vma_modify(struct vma_iterator *vmi, + struct vm_area_struct *prev, + struct vm_area_struct *vma, + unsigned long start, unsigned long end, + unsigned long vm_flags, + struct mempolicy *policy, + struct vm_userfaultfd_ctx uffd_ctx, + struct anon_vma_name *anon_name); + +/* We are about to modify the VMA's flags. */ +static inline struct vm_area_struct +*vma_modify_flags(struct vma_iterator *vmi, + struct vm_area_struct *prev, + struct vm_area_struct *vma, + unsigned long start, unsigned long end, + unsigned long new_flags) +{ + return vma_modify(vmi, prev, vma, start, end, new_flags, + vma_policy(vma), vma->vm_userfaultfd_ctx, + anon_vma_name(vma)); +} + +/* We are about to modify the VMA's flags and/or anon_name. */ +static inline struct vm_area_struct +*vma_modify_flags_name(struct vma_iterator *vmi, + struct vm_area_struct *prev, + struct vm_area_struct *vma, + unsigned long start, + unsigned long end, + unsigned long new_flags, + struct anon_vma_name *new_name) +{ + return vma_modify(vmi, prev, vma, start, end, new_flags, + vma_policy(vma), vma->vm_userfaultfd_ctx, new_name); +} + +/* We are about to modify the VMA's memory policy. */ +static inline struct vm_area_struct +*vma_modify_policy(struct vma_iterator *vmi, + struct vm_area_struct *prev, + struct vm_area_struct *vma, + unsigned long start, unsigned long end, + struct mempolicy *new_pol) +{ + return vma_modify(vmi, prev, vma, start, end, vma->vm_flags, + new_pol, vma->vm_userfaultfd_ctx, anon_vma_name(vma)); +} + +/* We are about to modify the VMA's flags and/or uffd context. */ +static inline struct vm_area_struct +*vma_modify_flags_uffd(struct vma_iterator *vmi, + struct vm_area_struct *prev, + struct vm_area_struct *vma, + unsigned long start, unsigned long end, + unsigned long new_flags, + struct vm_userfaultfd_ctx new_ctx) +{ + return vma_modify(vmi, prev, vma, start, end, new_flags, + vma_policy(vma), new_ctx, anon_vma_name(vma)); +} + enum { /* mark page accessed */ FOLL_TOUCH = 1 << 16,