From patchwork Wed Jul 3 11:57:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13722135 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 57E25C2BD09 for ; Wed, 3 Jul 2024 11:58:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C50356B0092; Wed, 3 Jul 2024 07:58:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFEEA6B0093; Wed, 3 Jul 2024 07:58:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B74B6B0095; Wed, 3 Jul 2024 07:58:13 -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 7696D6B0092 for ; Wed, 3 Jul 2024 07:58:13 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id F41901A0188 for ; Wed, 3 Jul 2024 11:58:12 +0000 (UTC) X-FDA: 82298293224.22.0109915 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf22.hostedemail.com (Postfix) with ESMTP id A0C73C0006 for ; Wed, 3 Jul 2024 11:58:09 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=dN9Iehes; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=BWTYIwvf; spf=pass (imf22.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=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720007878; 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=VT7yY9rq3+A2Q3ck4A/5rX1anSMuYmfTcfC3oezUs2rDhG+TOKNJMVAn6PmJOdmcyB/6rF Km6s6QLwBTjT/p777am19WIRBAv6FQzWHwm+ID6To4yJJ+5v1LaCujmecFiX31/ByKN8iU DiGXm5gcubC8udretS2FDZAbsmtFwDs= ARC-Authentication-Results: i=2; imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=dN9Iehes; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=BWTYIwvf; spf=pass (imf22.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=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1720007878; a=rsa-sha256; cv=pass; b=8r8k2OgYHOpDSce2I5DktmKgNf7VB7QJmh0G9PKC1DOX5fOnJA/ym0Z1PGofwJXPtPzqOG uyS8RKZHsUNggN7gSFRlpok3PKVA2CyYErN+fmpU7LeifK+//ZhkTzH09Kl8pTPiKaOhIp tjKtu9gBiRw07Ou/TCQIsoH6C+YgxLA= Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4638OEA3015994; Wed, 3 Jul 2024 11:58:03 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= dN9Iehesf3sF/JZx9cSYvNCSJ3S6RKUkjzR4SHe/Q5oTtuz26EcFovg/tDET0ONo 45VoX1i5TsNFkh+sBqcKKo1NjQspUn2+Zhqw/ioExth+5kmVln++ViELVDtSLIqT kNARuqYMEWHKHKiVVkv4mPiSSeF9x4FWzlRnP5hQuTKiJxbyWh4mEHtj0iV87DmQ /yFjRes+zhn9dHQeo3j9Kh8BhTfHihmKV3oSeGELdMnagAYhh2huBGeuXd8nG9v/ J76jYzvD6sSZjprG8Hpa5CkRUCzm8MI0xi5Jfinkk3WOGCAbGV1tem1nwoSSc4Jz ny5cV+yld9tVMz613S8Wlw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 402a597t25-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 03 Jul 2024 11:58:03 +0000 (GMT) Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 463BN5Cb011150; Wed, 3 Jul 2024 11:58:03 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 4028q94qwb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 03 Jul 2024 11:58:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aDkT+6ELJfItLUro7PYC0ITfXxMpGuToxNo5QXMzIfwn8tAuiiLITTDW+jNOe/FNgB7Fg+pRkUU0dS3v/nJi6EbcS8EGzTK/c2qKi6UxL5imnekcoK5K6sl5yGojZalspUSYfzdG5g3burwranEOtNHxdganjxvNfr5Fwy0pKsIMDEL5/mRr6GhbXLYjPlDeA2FMcRebVjSarh4afNXPsc0nbTrdfkXyBloYVKuvxNB6AcAB1/hcAwpMHRJkEn7OUmq4LcqbhJkgt4zzo9A2a78JoB7yBVuC6kCaPwZ3IYY7T9B8LNaFT84s6UwUXG5vwAtbUULKAsaAzxdRUnmO8w== 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=El79l+rZxvsF5XCzve44uDZnD+RkXbM0nhoH7ebDLFYhk3wG7ceLxHEmFuZWklYJMm4xrutvU1MV+RkH/eY5Mps9hNPUu6KMgHLUMF73rE4vl6zaXKoSJu9SHtx/et6Q1fG1vfPphSVU0pNLCF0sei8Y33mfhu/sU12YIBn/EJZfw37SOcnUDW3i0HeRzKKRJXZTi9DKySHNEf1fNnYio2pW6yaxCoW3LKosrsskdfZSXtrG4XTIoBsIvJjERHA/Ek3lgfpIKhFMbewawThrwj8e2jznb5nnuEtTwPpaYi0UG2oR7YS+7pjJEFBMxsM6F3ekcPEYZhyYm7YvRBFnCw== 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=BWTYIwvf6w4SA7G7s7PIryiulNMV4k4eTkUbvF/WiM1r5fo+/MONxbP3E61Ykt7JAsaHe8p4Hq6axISzrC6lKQB134n9mikaiEoy8Yn1WN8Fq3LyZRCXFv/WU9KbddMnyMCYO8mJ5PKm9ClKPDQHZFweOxGkIma2dPZIv+7/Luk= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by SA1PR10MB7832.namprd10.prod.outlook.com (2603:10b6:806:3a9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.32; Wed, 3 Jul 2024 11:57:57 +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; Wed, 3 Jul 2024 11:57:57 +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 Subject: [PATCH 2/7] mm: move vma_modify() and helpers to internal header Date: Wed, 3 Jul 2024 12:57:33 +0100 Message-ID: <2f6f2495f8c821d30a29939a2a2c0869ed6205db.1720006125.git.lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: X-ClientProxiedBy: LO4P123CA0616.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:314::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_|SA1PR10MB7832:EE_ X-MS-Office365-Filtering-Correlation-Id: a8a3de96-a0f2-4e4f-12ef-08dc9b57610d 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: vJ9KXN67Uot/M3pvScGJblU6CQlSHjNoP3UOC+SdNShvMtugvbWyDqD/mesRXEkH1zG92F77l7PqXIQUPgJEcAWxR5KxTJdie5HOBJwKNLe31WFEMwPX/CESh4I0Ke/GL8cTbTioXZjVCnr2d0ZKrdjbWZIX1hN1ryKIvSFonLp6oD/Rgi7wffst/di43iCtTnk8T+9l02xeT7GVfUe+zm6KPEuTawni3u9/XopHOXa6YaM3Ebj9VM9qXj3IRWtUdvbX1Ce0PaW3ZA6idm2Td7Npv3SZJWO1wz/si1AepgIrsb+EdnMYBWPJsb8c8oNkTU91yOTUobFY2nkCQZ4FwynE9BAizXOcLpjAVBR5BjpSBxQxLrQW581P4uxhfuxcznYGkuQ82+faPGXoXu5DDDABKCQwc7bpUy72b36KkrsUN8d/Zvbptae1DJJ2cAeqE9/EZv5jyk76nD1/u9J2iuIeDp8544ABWVc2yrRAvKSi0MfHXtvCqbQ2SL+jhca9rAgZ1k0EzCFecVlaKGEKGJLf86IPRMGBUyRAcPV7W0Uxr2ZBJuAsbSPFNcmj+FEuS68Mcvc1/K5WxrRMsvocjzewMJIkrZe9Wpz2wlXGm5EUg1RLvEjGdPxeDf3VHWnY6Va7Xxi3pcX1gKtx+khMFnNckBGCeljuv6o5ufOMotIFTr+hIrp1d8MG+AFYrbAwtdkx12uLM3CvyQ/I99xd5JVPUraa+rZrjnm97f2M37Emjuqwad24iTgwD8J2mEHgzXYVd5M3QuBMfWKKlHuuDR+1xF15yb49X45GcoI+RUEbHOMLFGSxIkV6IYnUB7vOwkv0sZdI3FbyiR0XSizlKG0a066rCukcTBlKzQuq6/3uBqI63NxfJpxcCJolVOpwBqqqBjBbD+I3tNplqiNYUZ6/0WjU+gy3JpthLilwY5UScv+lUyL9QF/c1geb5LMjWhaUVbK/4WIQwbRDdxO1EL0cvRN2BoRt9jwjRu3OL6h1zUceHQM5iVmKzJ/VcZs+P+E+lsV906p0NGI4UHagSMWx0ZSaIvz/WUFJq40GLfF4zv3mYIR+Vf0Wq9uoYdtJzKn1ldThMLUAwVGcIXJDudZbVkzoAVfOAuXqj8iyzY9r0Ds0u25Qmt48TMEKaHIJmeHoxXxvMxpNCqhtgw0ys6IKiMdCtuFJvxFxQO/K9tA+g9wj/qd5tQMu3pXfr4lSIEBPUdsgzOMdxLory0N0j9YbGoMy87xyGqGKLPx9M+z4Xb7PlHzSc3OcEEM0dZeAi6XKDznp2ntCFaIa4uw1nj9SSnDe8vM+Fxy/clAILBKSJ0HXzLjvJ52tAxKpVWSEU+GQWVJ33UhpnL94wbGNvw== 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)(1800799024)(376014)(7416014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RHkaAHpyNH2XKEwo/6KBR5SPyUB3TmbyNcnVfC1Ytonnrq+RM+Uoxf/eswdA7zyhHDeu5CST9CyJ2+xLT2Y+b5YpUcoC41D8dPvjlq5CoSZIdNKXlByi0vJ8+qm73oy/cc91sq58w1aL8Ox6oDyP+6wl1o834d4tDhJWcEFWcbqjKdocF1qsciTUtEYwFuujc1l/gQfxmuVR3tcky5MEV0JNP5OR1mhbxtw7HtHGBnMjr+0fN49oSUHqrRJGWCDA/MO2i6cUYKU7ZhtTNJvm+yoXULIPI40DAnDYsvyi9DHEMMM2av0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z+5DrNrC7TlnNEU7hI0FPZ5PxcAnWm6nXFeUOnwPqfqgtHpkALJYzljIId7GpowliIWu6p6CZJ5u4RSbhww8ABZXugpgjfrRLaNQPLLOaaezqmlKENK6lwwR1hI2dcmHUtxpgvXvmHtU1fRzqz6FG+5qiiBZz+Y8bBmpjSZ282KJhAF4z4EhrhqX41X2uaLdMDj5GtAiA4vsMX5EfmQCqsXUVLowi3FFGnjJ4Q== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: pShGckQX04/NBsn0kARmkX1nQsE5Lh9hMeNuUuVdpANvQZAGN7/RN6MbEjpx8WFCaXTmzIxSJJcdc4tFHgMQYkbPmEMzyHRxMDsi5qnrczuc3LbfntW4TDfPw8z/EiJ8Z2JanDnmWsQVB5NIv9cXZH5lM/zbvb1SK39GSeFdG/RoT21Bm0Y5iKUfYJIU7IM3ipfOhj9xkPXCHeupovsvCsB0hqSglNli6icRgE9pUYUy50bWt+Y/NoxTisQsz4dHJLC+wXmYKbyoCOgu/p5bo1wsK6gBiZilD0p+V0KxbAFK2LW0l1BuTv/mp389r+j21B8cUsRwrQzLiYBhGwMhE4+KmGBybPYHPSZ/Z/jExoVLAAUg0z9HVt5XtM6iqLLw1pQYnK6mIdbqotLmUxQLSDdkvUGauGCVYtiYcauljWD4Y5dF2thO4ZWfDAuHjTvx6qB9TZmP4j5L7IZQBHo+aOYG/wuFHNNiQO5avEK12JvrrCyB6kjYOXIcRa1ETZyzX/gwJsdC+jmFbNF7K23NvLBXpTa/bKdDaAsKK39Ke0TZroybIIstTSOqBQqsupq/1r10Px3s5jiOOe/1RQoPma59k8b5l1zIBUwzOGlfGxM= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8a3de96-a0f2-4e4f-12ef-08dc9b57610d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2024 11:57:57.4588 (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: 2vJZa3xwMrTn6w3nADsg6FUESyC6Z0/4KebzIkfR1sHbGG6g3EKa0HbeZ65Vj2UuYP/ciskILOjvdHN0wz5aQbqeZzePncjXBUhSAXizZpo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB7832 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-03_07,2024-07-03_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 bulkscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2407030087 X-Proofpoint-GUID: vl632y-O6NRTEeUT8MezFWmNChGiz6qE X-Proofpoint-ORIG-GUID: vl632y-O6NRTEeUT8MezFWmNChGiz6qE X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: A0C73C0006 X-Stat-Signature: naoo3dndctimidjpw45ufbemdh41yckc X-HE-Tag: 1720007889-6610 X-HE-Meta: U2FsdGVkX189Hr0Wt+RQMEgMxXDnDL74jz35k4wVPWA27cR8CTFlmJe8h146yLedCQAvN3/yLtmdCvjn7wXnedEWJ6dTpWHkJThem6JmkHv0YA79L/CpH/nmJPli9YGPMq351juhvveor7mN9/uEuOLqsIsd93rTQPmK9i/TOyg1MyycHnED+p5C7fWgQs8a7bVirOr2zdUUsmEe0iNCF603xgRZfsJwGUE4WZjfwl7R0Gip77jBENMfP+d9ce0pDFPb8ZjEZX4rU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4Lbd6zz36edACCWNJflX1SBYdHfMVm+nvzZ8l1r9/dpccP4Kv/8QXfMJhxdd6H6Aj1bKGxW39xjR46JRxBFFhiPj4sLB/GlJZ4v/jTKLp8g== 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 --- include/linux/mm.h | 60 --------------------------------------------- mm/internal.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 60 deletions(-) -- 2.45.2 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,