From patchwork Mon Jul 29 11:50:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13744784 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 53E1FC3DA61 for ; Mon, 29 Jul 2024 11:51:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E0FBC6B00BE; Mon, 29 Jul 2024 07:51:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DBFB16B00C0; Mon, 29 Jul 2024 07:51:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C11E46B00C1; Mon, 29 Jul 2024 07:51:18 -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 9F1226B00BE for ; Mon, 29 Jul 2024 07:51:18 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 59A52A02CB for ; Mon, 29 Jul 2024 11:51:18 +0000 (UTC) X-FDA: 82392624636.21.714F1FA Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf24.hostedemail.com (Postfix) with ESMTP id 07B01180013 for ; Mon, 29 Jul 2024 11:51:14 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=BC07gggk; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=cQJByGXQ; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf24.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.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=1722253821; 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=bCGB4cbvYKZKvzaKlCgplmHcT2xJiVG546dxnLnY9nw=; b=Ub3JAYUKfLJKPjwQzsfkTIRlypAYgeFmn57acUkgigcrzQhY8X1L0qVycOC+BCWGHO/R8I WNyZrGLj5HRR0EE7Sn8WTfcFJkmuqBOtnn4AOwnuouSRvF9OCjcZHIdjHuIGIN3YT25Lbc alSgzQKb9FSjNmghCE3oLbgQ1twE5x0= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1722253821; a=rsa-sha256; cv=pass; b=0JdwlheI9pwD7t/EiIhF1+SBop+pHtN2TT6/d4GHOKXdI2S/0XjnqQWbFEU7p2m6uAc9BK mlSi6Cb1tPMvGiqxjp/zyXoht+OtzuCylJLbKVlfvzxFLqFRoffrgaT4hlFYVHDe1KUhdv f2sMROxIL7B+UGrAp4Tkfy+uhB+B12k= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=BC07gggk; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=cQJByGXQ; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf24.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46T8MaCJ031626; Mon, 29 Jul 2024 11:51: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=bCGB4cbvYKZKvzaKlCgplmHcT2xJiVG546dxnLnY9nw=; b= BC07gggkSeNaOcQtJrDCFn630YjiQAxqDsGXdkQB7LHsfzcHgSEJl2W6up0sXaqJ j+1ukojLATOnr0j5xoVlHA81vppJkGyS89ADQ2UM0ucO1VvLjcRhDW0bBItV6x4G avjSBpbIsSRwh1D1Pp6CS8nyYyIZlO2lRxL59Ld9/IqH3cvN9e2p0AtApjTeCjYP Ii79CSdjjwTxES4xhPZGK2k8h2ezxyoWj0G0f2oRkECBBjUjiMHESYUUg6ydNYMF 7soaWM88Kinl1IEuEGMHv24EzoVzhk3MXgZVW1Cn8uCat+kFM/wuXwtrbPp6BLp7 wbq25+Qf99/2fCG6K+fr4Q== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40mqacjcbt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Jul 2024 11:51:02 +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 46TAf61g010104; Mon, 29 Jul 2024 11:51:01 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2042.outbound.protection.outlook.com [104.47.74.42]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40nrn5q3py-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Jul 2024 11:51:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AAIJes9tWSznYvWEX3QmJLpr8rvGb/e7U4gZawATq67HdGbQksbn27S8j6b2+Mew5m5zZiTOqsQXWIObbOzB2pDGbuB54v3YU6EaLu4KjC80+0KQpj8KgHTTlwDK5DXIygtDip9p4dUC7yc35ErHH9/yOHKAsl/NJXGjKZIEva0cZtIs/UB8hhC2jqp+d8T3o84CN2sOtiAAHP70PLds+iYySllhuHQXQwFC1G0ZPbxWFrB8tX7WSSgA5L1IBjxAexudeUISbRWJpnmXpPNpWdWdK8lFVaS35JmVaRf67mlKtpGJnJvaW8lTpZPFsm++/s704y3H80BiaUMBagpzgA== 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=bCGB4cbvYKZKvzaKlCgplmHcT2xJiVG546dxnLnY9nw=; b=Kgwuq+L7Z+3L0NtEQUMSA0RKbgLLMSS2Jm6AYi8hv1iHYfBFUuiWj4EfDMW1Z1EtkfWnnWy1OVOwuNm3onlkmIIAq7bDCqFkFGxis4phOOdwapCx/2bBP0rUdyMg6HScR39qRDbnkNEuvn9Ld57O1jFJFLWVruHRnWF283JeYyIDNduYP1hNhSR/7b0LjEG8XdMpSFEmF16LRynygLpI5k93ZJFA7s0dN2CWYBZbh1Aog4f71j7H0PgIxwYYFVOrjoYkxHW7+nUzQXWSPDHeHlf/LebspjoNvLmoCV5RpriB4YKzHYyUa9Ci2kSNLAUrafqITaj7iEfolTiAreldbQ== 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=bCGB4cbvYKZKvzaKlCgplmHcT2xJiVG546dxnLnY9nw=; b=cQJByGXQwywW0BtKJ5L8RssFZVwfcQAM0Rw6tU9hl0huFfbKmVsxmhBA9kr2kUxszfi5DudIJPzK2201wxY5wEkM6KeyE7FtzwXZe76qp+j6nMy3kmF3yOXnq4hFmuvwtQH0gnJh3HfFEy1icsW6OQ/pIL/3Z2l/1hMGl8AAyjI= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by SJ0PR10MB4543.namprd10.prod.outlook.com (2603:10b6:a03:2d9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Mon, 29 Jul 2024 11:50:59 +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.7807.026; Mon, 29 Jul 2024 11:50:58 +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 v4 2/7] mm: move vma_modify() and helpers to internal header Date: Mon, 29 Jul 2024 12:50:36 +0100 Message-ID: <5efde0c6342a8860d5ffc90b415f3989fd8ed0b2.1722251717.git.lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-ClientProxiedBy: LO4P265CA0229.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:315::18) To SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR10MB5613:EE_|SJ0PR10MB4543:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f214b83-c4bb-467f-6129-08dcafc4b643 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: 2I93gE+4bzVjbBGkjetexkQZ/0ppJ7d7nfXTupN1HcfQqD3kg4bGMl430/hcq91hdHdt07S6vM0KTAyMvNkBvR/KAc2xVk1+pXRhIxMRkZcaJWiJ/82FXDoZLR+RYLgVquoBp7xKK+YdLA+n2FHZiBVILoOcHJDAI5uLPucaifOVNRObBRS7wRq04JlVmtkgx5m2LNG8CvkUtUWuwShJ8ZqixexNVf5KXM6l/L9aiqOyGd0o+pSakO9j0s8cUKbjV2bN8FAufmq+keHTOwy+zMhjxX2lInQ0eynlJmI3kd9C8L47HCFEYeYvPo7mtvx1Xmrljwzv0iEBIEueNzUyjVHYT8h8+NcUYrr9wivjLHDIZOnmKpjZHb74a7IDPSjPwwjRB8BR66hbii2uyAoeQ/CbvuV6nXJ1GWnK8omDovxJQeyzJHSRwkFrZ/NY0VUP4RMwRD85bEAfWbX5AhiDfF8PrCj5C4UDXEtRL1MU0no7OAwfabeNFOJ7z/PIcxec75rikFtKvXRJQejUj4FMUFEIrkCHXtXm/iyx2Rjk+lI2yJx6HxzfaF7S79pHlKlZ5jJyG1LJdqPvQ97Nvryukk+5fmE1wXzM0olF7m7mFJ0xJzbbULHXjriIQZVBHP4MdjFxb9A8L3zgy/KKMe9wdWGE9fEMN5SBeqf8RucZu0igl2piblfBeUn/YwtJoiXRAgJ/WWVhWinp/VwU3hU2ykRWmZu9QCuTd3H36DPBxP5S/IqXXdiirF3M/F3udcy0ghxVl/mXCCcCH6evd/dMbRuNB1JiF0TcY/u+MQQaftMp8luVHfk1ud1wuRhxxFU983GhD8fBBOtw3GFNeBkMLI68qTxKP9inu6xfnJDuAgZFRh8uOz0y//gNEYL4G9GgCufBt9HPVIXq6oKvfV0FEpTwT0Z5drBWlFXMiLO6wp6+/pZC6jTRZkCX8Z7RdwnuBXxECTG+pzbB77D1x94y90XLsf/vc1/tXbtnpEOcPCjMDdE4vpEXHWtKlNTkP2tGaZ/oJULnE+1qhZUkHlx4GDrp4orR0yVPhCuzB7PfAlMX7rZxbKCLWL8izud3mkvtYN0UoNXJAgwr6KoOjVEBZXoxzrtxBLrvjFRVlEtee7CQI73/x9HfWzi9BHEBRG7QcEVjCXm/xPF7KlFJuMbBQGjAr1rPEgL7xlAH4FKC3me3SzEISSgCBt4ZALJomJncKJVRIr9JCavHEaxLLCK/JtnN2LTg2O5PtElGAMtmJaXv7sZFlGQaasANJxrmp5ZVYaDCVTxgNir7GEEIgcQJ2O7xlaTfKilecwyBAfr26l9wiAQ1r+2LNCvSQ7G5/Js6te3uRcEvoaX/9XkfZBmEBQ== 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)(366016)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sDwiEhhzwRn9307MhA7R2Nnq8JxfXJqSkqsnfBIk/06uUVXfSLoQgGG/j61jjAmEUi2Z+fgWqPg2lzBAXVz/TLkrrPTTeBIi2e+iiHzCHqNhDzg5mtixyDTWuN765oukdh5fGn44cOEJSgBj5OXsCXhSNTj0cug013TG3Nhq/nOeBHA96yZ/x4WFdaPLfEXnH1ulL96KB5ssOO76XfR5Zix0fn8XSatWxMR49VwrBgNHts8SwamSrGEhyvrgK9FWIdU/fUZgFesA5j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wEg8xY+yKAoZ9CYKNmf3sKG3U0JWaxvvfvlnxkuQvGtdACYFttG7sRtHBD3ZBXlauuCtW/y0sm/KszptG9TGHWjskvDhzxqI5J8A4CEqYxMPRvpDdiSAmJCz46xtQdX4HvThTkgM7JfNRjYB2T7Z0Lblie+MpkTadYUKVR7eunhZXw+W5oY0PElzCYM4Ew6dZIyN5CCm7YSggk4lj+WqXu3u8ZBv1p8pZZ9pWVTunSGbn0rED1GQokhRKD28LXdgeW6zQNpqIJ4rOBflGMw== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: iC/O/m0U/UW/1lNQtVKaQN84fLb3dLEK9pW8nfZ/NW9f5//Q4v4YbHiQhhIzDygNpIwDN0xIe3KOcA8Ae1lA4j/7RuWZxmzqLev/Aep5HVIlYO3i6w+8psG6/MPqaWzfOUOPWnzwMgTg0Q9u+tduw0qm0ptz6/K+FptIktdXLq1T2y5mxbwbz9MwlZiRX8rw7DeSxS8M8G2ZxxI5QFcv7xSxre8HIM+hIL0PM6OHUHKg8HyRbtkVwNVriqDTJlhcOB3n8Ts3oT22bFJT6wrDb0idqi42uwPr+WjrZM9OX9bGC1GTXiUlb3q8W8PIW4W8RqBNhD48d/yYyr3Paan0N1EaELC/gZJOkXcq9pFTnJd1GKEVMNzAo5oipNwu8js6Rlpm3RHCbc+TsbmZXq882mNsKNs1Vvb1u34FX4ramkQp5igFM1vGMWbU3NLvDyx8VLUVHoGIbaWhmUEgxRi9RSx7pGivOc20IMTvdg16CYowh8QIfCqxlCnCBmBTXVJakjaGWEX9gnUFdz+m6w05bmx8uQdmwgyV1jsCu2NOtGQV1fbOeKUf+Ex3PCm+ONpMCKODUMPHS3lzZsjvNZjckGIBQaLeXuaNN0NvBxWKdIc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f214b83-c4bb-467f-6129-08dcafc4b643 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2024 11:50:58.6862 (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: oPhh/CWH7Q/MMLr0cILYuiC4d0qtb2t55ZEEuCRWUiNPbv0QWKl+A9birYLIJZ7XKdZhY0PKox4sKVM8dR97xcrXIvnbF0HhqyuaYnKQY7g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4543 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-29_10,2024-07-26_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407290080 X-Proofpoint-ORIG-GUID: LKyVgv6RPcShMT321Cgj8e3hElCvlGL- X-Proofpoint-GUID: LKyVgv6RPcShMT321Cgj8e3hElCvlGL- X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 07B01180013 X-Stat-Signature: jkzzsqi5mhsk3b3oye7n61qwb5gsw5xn X-HE-Tag: 1722253874-95918 X-HE-Meta: U2FsdGVkX19SZjPrwGvoOhtXJ9OYFr1cFwsa0Mos8PU5jzY8m/pay4p+Ce4Rs2PsluHHNfNYtQ/CFa2KFxKmzKmqBP1yNx6QixwhlaNfwkzWwF0//D9/df/QB0hJBKwatWio44pM/DhqJJ/k1pbdrEtHHUTeiKI5NntRZO/WpBw/L+/RH+7sbpuULDNZmiZd1bRyL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VM3xGGoPBu5TLE7sYCCWrqDYbyyyVi4PEw7LLimDBzIhQlASYZmOZcv/zZaXtkSieNgfMJ+05x/msmqlfRLKwas5V1FTW8nLCpNAAo54yT7ab8Ij7OIf3QqdR58yRKiPR7S9JQ3Kc4B8QFJwiotvrB8LfpdQpkN89Gut2GsfGVUeeq3VoJNfWIrpFj9Tzqzy+GjnvaOa2IyIHG2cWwBSW3heSgXSa63rLcgGRUVqPIjJctu0CeH++DQ== 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/. Reviewed-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Signed-off-by: Lorenzo Stoakes --- 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 c4b238a20b76..2d519975e9b6 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3278,66 +3278,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,