From mboxrd@z Thu Jan 1 00:00:00 1970 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 82DA6C83F17 for ; Mon, 14 Jul 2025 15:40:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2431F6B0089; Mon, 14 Jul 2025 11:40:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 21A476B00A9; Mon, 14 Jul 2025 11:40:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0E29A6B00AA; Mon, 14 Jul 2025 11:40:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id F26756B0089 for ; Mon, 14 Jul 2025 11:40:30 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A0750140200 for ; Mon, 14 Jul 2025 15:40:30 +0000 (UTC) X-FDA: 83663282220.23.639238C Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf14.hostedemail.com (Postfix) with ESMTP id 268F010000B for ; Mon, 14 Jul 2025 15:40:26 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2025-04-25 header.b=Cr4ea1fq; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=sDV5PzOO; spf=pass (imf14.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); 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=1752507627; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=hKSvTIbquFXpvw08+26m076clNI4RTB1UtjcWhvb+TQ=; b=oxE2oXjIPntsE39pHpho+4Wk49G6s6fU4tSn0FK3Z+HuxgWhPzNFZxvaG3IU0eS9pzxG2q yNOnX5NfCx24jWNcsmybHTfOgoCNjgq6dVkAEA2WsjGUb/kMgjwO/mAOUlbNTQh3uir1VH OeMJIEfHnZxPo+8jf+sxCtBGplLlFUQ= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1752507627; a=rsa-sha256; cv=pass; b=lX45kcUubnvJfDEcVUhrInzbr+WkAPNM7IxNqemqQkAV9HTtwVenVe/LhTxfTEpwJ5iPSk e+6Q1Od82rSoqj/vKaN4mnii7pdWwvhytunwsf5UfcVyC+6V8GNs93A6kWlNs72zEax6Kc Obi/MIXB50GyfLWdonrA6xOwrePogpg= ARC-Authentication-Results: i=2; imf14.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2025-04-25 header.b=Cr4ea1fq; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=sDV5PzOO; spf=pass (imf14.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56E9Z238026750; Mon, 14 Jul 2025 15:40:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=corp-2025-04-25; bh=hKSvTIbquFXpvw08+2 6m076clNI4RTB1UtjcWhvb+TQ=; b=Cr4ea1fq0tW87IVWtQGzbJQNE+gMf4s9ua psYcDGF2VHFB1+Qwpihu2gTF67BcXe2QBJAO6sRYSod/lkPIRBaompyCOyByTWP1 Zn3VHZr6H9uHhgny4zpOAuEE+Byb2SuNjbM7o0HQMcWJex1Dm1Xn4jJA0bVsE8SZ pYGrWOo4qb2HMZ6c+2AeUxaHf7h0oFNlgf5BZMinaUhvmkCDoFxE8r0Rip8JOIeQ 8p4kgELFA98HBA0pW28sZo88fpUXDn8KmhCuoo2Uvn2jXE6FS5gaKemypa9DW/6O eMQWooarQRSuGczLQkdudDivkGFntlDH/DpYT9STUiMOxw5K6VnA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 47uhjf4vha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Jul 2025 15:40:24 +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 56EEkidR039695; Mon, 14 Jul 2025 15:40:24 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02on2059.outbound.protection.outlook.com [40.107.95.59]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 47ue58p8w3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Jul 2025 15:40:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T9WCHjgWVM7qfiACMMHcZFqJaBNACuI+3PDRHx7abWRuyBxe35WHI0rUtfDo/oUsQWJD+utZi8KvGRQLRTFoxoCo8ymenSlXOyDvN82hNrJf67aYFSOtCIJsH/BQLthb5ILbH0WUzC8Ryedu40Y1gXFmGiEeadt1id3qmU+ARmTYEpVgHyP8AHSZvplid7drbx3glQbGdio34LEjJVHYDaGYUUfr2r4fj7OfOfRGnjP2hvkJKwmRp36FwJKbu6KmBaMgLAb6YPzcgL5VoNM30yNwQgxITbd2sHQ/O2DsQFBH8XMIVbpJKoRS/+I/qFbcRpOENGXlXzeykYfY5rVfBg== 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=hKSvTIbquFXpvw08+26m076clNI4RTB1UtjcWhvb+TQ=; b=HyojVg/eic4CWGi+yNe0arpd9XIKRamrbEJPUvusOk4mcGB4s34fEGo0lMGeokTqBZMMsOK53KN9k/wQscGEkNPFe3E2RUcVRkheNRw/WePm6Rh1JGTFQP0YR4zk/a/tDicKBkbkaeV+O3DXKREyWOixMgxTkL5Q6hTEI9gIHqEmbVW5QzyPI5lChAp4MWbuq8CZ7gIfnMPXBbjdjw3ZsrnsFODsPblVnclXEtCnUq96C0A4oJ+tqnjIV5xDVNoJDf4hM/7q9lLm58x4pyd2BCQCGoINNIruJTCVzvqpclc4bLrnJX2eamIjhiBl3Maow/+zo2sRVUXZ4yTIRru84g== 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=hKSvTIbquFXpvw08+26m076clNI4RTB1UtjcWhvb+TQ=; b=sDV5PzOOf7+ukdHbCKaYafbedtmUiR75lYfagExRnu1/n014PioWLaXlM19xzuTMaTzk3Re0LZZgy2c002Ggary1ST+Y4KvS+j4MDygrw+Hucmi+kq6QExE4Ur4LvBM02KJV3eJjhZFScG/pJLam+GtAMm5rw86R9xbsKj2WuYM= Received: from PH0PR10MB5777.namprd10.prod.outlook.com (2603:10b6:510:128::16) by DM3PPFBD8703CAB.namprd10.prod.outlook.com (2603:10b6:f:fc00::c46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8835.29; Mon, 14 Jul 2025 15:40:20 +0000 Received: from PH0PR10MB5777.namprd10.prod.outlook.com ([fe80::75a8:21cc:f343:f68c]) by PH0PR10MB5777.namprd10.prod.outlook.com ([fe80::75a8:21cc:f343:f68c%6]) with mapi id 15.20.8880.015; Mon, 14 Jul 2025 15:40:20 +0000 Date: Mon, 14 Jul 2025 11:40:10 -0400 From: "Liam R. Howlett" To: Lorenzo Stoakes Cc: David Hildenbrand , Pedro Falcato , Andrew Morton , Vlastimil Babka , Jann Horn , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jeff Xu Subject: Re: [PATCH 4/5] mm/mseal: separate out and simplify VMA gap check Message-ID: Mail-Followup-To: "Liam R. Howlett" , Lorenzo Stoakes , David Hildenbrand , Pedro Falcato , Andrew Morton , Vlastimil Babka , Jann Horn , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jeff Xu References: <16e8ac61-d0ec-43aa-8467-17a3c2ea5962@lucifer.local> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16e8ac61-d0ec-43aa-8467-17a3c2ea5962@lucifer.local> User-Agent: NeoMutt/20250510 X-ClientProxiedBy: YT4PR01CA0134.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d5::15) To PH0PR10MB5777.namprd10.prod.outlook.com (2603:10b6:510:128::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5777:EE_|DM3PPFBD8703CAB:EE_ X-MS-Office365-Filtering-Correlation-Id: 37a5660e-af9f-45dd-43b2-08ddc2ecbd5d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?HmQbFPYyhWkJ7IVIq/m2wKzDLmS+LAxYtNt/Yv5S2sch6jducOeZZWiASwek?= =?us-ascii?Q?iofOawiPbrTWEbK8v+jrRRecokUmgsp3FlZzl7ekH/d33dVnzd/tnZsx4cEE?= =?us-ascii?Q?BnxfYnmr7sBP+puQFpP8OtaimCGZbJ2xQy0z94wI7OuMlg0M3uJjOZuomGqF?= =?us-ascii?Q?btVt2L/gRvwGCrQWTOm52SH15/b5VluxMLzjvGRMZ9srUmbptK4SHGXJCJbe?= =?us-ascii?Q?gCkbyDzoz0HSHQPI2At/pA2D+6tYY+gXd6PuIlwldctygRS5ltyOB3Aw3yp0?= =?us-ascii?Q?mxp/tGi4nc9+7jx1mxQQJOCUYbP1Na5mD1djDhSYld8TideE2fQeP3Tvdnkm?= =?us-ascii?Q?HpVcx+xpgiC/SEYpnDp8lfu50T46IVDpBdzrud2eemijgmsoZSQsw33Yho6J?= =?us-ascii?Q?A/5sV9wHbriQpqej+HVGpze5XBYG7a+9F4Wtk3I24doUKCww+hDBiotfiK/P?= =?us-ascii?Q?6r3Uq/+RLpXjO4jQrsC32cyME91DV0wUiRkOMcsjYc36lo4Kf/TRt+ZVFXve?= =?us-ascii?Q?qT54B2kQ6qkNZb1hUbKTnZxr2FFcz0XM0TEatdcODi2tjNDsXWAFpYgB3QZ9?= =?us-ascii?Q?7DtR1jKlt1Bn41X1sfPmX0ghU6KPJbwvSDrB4p/Htd679IfhoZ5uQKkIvRAe?= =?us-ascii?Q?OOTe9uIzHl5b0M5Tm6eSPm/P9empzH/wS8cAR2NCiMBeuFcb3ppcu1V8Y/T+?= =?us-ascii?Q?dxuOHHTFuEPPNEr8C+RNGD80d6Q74pTQxVS3By8D6jlBJ+vs+A4dzTev/Zdk?= =?us-ascii?Q?wuNlload0MCRE3KqNtGxgS/oMPEBVwMAoQnqhFSh16WumRO2qRILj3GEe+xc?= =?us-ascii?Q?Pll4K6i0ioGD9uv7BERyv3EfEjwT1YA+0cQ+m/MZU6u5Xaof+OJVRgwhxkvc?= =?us-ascii?Q?bJUfxWKlQY1rONuwybACqoyab5J6N9J7j4HFdJcZtKAaARsJd4YrCYBrQsJt?= =?us-ascii?Q?zss0LombkNlDHPss7dhHASoo08oI0ovNGKyrIynBTWI/hBd4nTnb9MPiuV0N?= =?us-ascii?Q?/PqPxxDJj8hr0O15rwQAU2QpL2s56AsROnZqwazbEeULnv7RF+R08y/JfC9J?= =?us-ascii?Q?UJYaYEQ3rTLsr960DDlV4VJThKygprEzDJ8RdoqN5DFzt2vIoQrMreD+pDJY?= =?us-ascii?Q?6G6o0sxXxJ0++T9i1K1sLu+ZnX9953QpbIV9zmx3KQdqSUKIwsr66MvVSVwb?= =?us-ascii?Q?3dcyTyfob3F3ZsUNRbvf1MEcWrfr0jYwM7jfwGQofcpWFSi67cw3oiddot9l?= =?us-ascii?Q?kuL3x2pDoe+L9Dh6CBGgMsPVNodttWFNY9ChKr+7de5P4484b9dWT+RkcOc8?= =?us-ascii?Q?sdxmoB+dakkuuf6w3f/QHsyYNVl0cZD/GVLgPDJysF4sCnPgovmYM7MhlACa?= =?us-ascii?Q?CbslK1YgyRPrHCOV8RCVyvMSiSnjGbLMAVv5wBPt0LcAE78R+20o8kk/qSei?= =?us-ascii?Q?o4Zm/wYAGl0=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5777.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?1hHb8ELiZP/rCAET/aNbgrRfxtSuYMDrlFuSlHm5bsNiccEaQb4OEsOP1Nms?= =?us-ascii?Q?k/3GFF3ste4Z5HawD0vieIURmmMP3rzTiniMADbjOE1CIFaKlaEYxw6WT1aV?= =?us-ascii?Q?K5YWS2MLTJ522vW9sliYB5yvU9ieF7WSGhHFBhE79x3qcuVytVMdGlq6mFhZ?= =?us-ascii?Q?f2K6f95NzwZgejY200JATdFVG4BenLOE84uqeDCbP5XvROviK/DdIeDvlOh2?= =?us-ascii?Q?zOSWEjYX3ZkIY8SXtMCijXR2j8uCIxIMG/DZwhH4nfK5VPOhjWM20sKZZdYo?= =?us-ascii?Q?WqkeEsba7sjGSqPAJwL+qWfLmT7jZctC1e3q3MGnbBFUVE2CTWEm6izXrS2N?= =?us-ascii?Q?ECN3fVU4C4+2tEBOrlRFnFFDxw8pArwFbgRQqDlT8n4GioGLPaPZnm+fNH/5?= =?us-ascii?Q?EmeW6vwnRe6ldWJaJNOzapMPjMFF09LnhTrPh6DvbqoJUkhe7QepdVUTPWa8?= =?us-ascii?Q?ef7KxMOMfWrU3wrndLr6NiUDLbOt5RIZ83Er/4rr62huF9XE+ETtd2quEvKl?= =?us-ascii?Q?6iL9Ux8dY/Qew2UmUbFesaH0S7044lUZ5d337TaprL+377tQv5IfXQpK9uSr?= =?us-ascii?Q?s2whO5WdCwGzBbwanDRwweuTfZUAI1Sfc2l7mUDESarq6S7R1fyFPCEJN2Cr?= =?us-ascii?Q?N8GRcGBrqlKLxIng3z5WEsTQKiPojy2/cwH27L1EE4jNrIjLXqqImZYJmvCb?= =?us-ascii?Q?WmTPn1wJkIzqvvD0U4LBol9X8sereu1lTPF3wHcZiu1nItc3gHOkuIs3R/N8?= =?us-ascii?Q?w8WltZ/yGjZ0tdWHbn0KXd1tneDPxPC33Toou9+u3vcdkICUVe1ANtfpSGI8?= =?us-ascii?Q?81reT9gvXv+DAHmbIDSYSjyS5Ce3/GYtIKHpIQpp5LE6trMACC+ZYTGMAGuL?= =?us-ascii?Q?2VcR2oiPZN/vB6dH0PKaSOTm1iuSkp2L5F4//0qHJEUJdx5mQQ2LYB4gsM8Z?= =?us-ascii?Q?31NSzfP5OtvjOSBXjD0RwVG6Wn2faI/8ljPeom+jlJxQrJILt0hkrLbXWkcA?= =?us-ascii?Q?6FW5eKcJtFPA0eTWndfxkEPXeseEey9i87h66W0MUCBOnTLVHqsQ5F+tGeUS?= =?us-ascii?Q?0/D6/0ZmjMkcejeEroWu8yMY0+yv2Af1GM9Mzy2GZZgvvDYUp2Uf+PpDrvH0?= =?us-ascii?Q?YOWQQlpcpJ7kyxVLTWRJiXOnZMyewnnSNumrDdnMQmVWd9Vk4t1SC3kisb/K?= =?us-ascii?Q?TcjfVPGzXnL++QwV7EimjfuYZ6TJO8uA9wV4GDRpTqgDkLQSv8hBrggFl0UQ?= =?us-ascii?Q?8e10V3ECcEuvqHSJDXX25egyyihkAAQoht0GQkmUoTEV9QNt9qtgFmWanFpD?= =?us-ascii?Q?RB1CVnqKhjlDNCXcHNtCh3qEXW+UQXpq1CBcs1WhiSwMoab9vKVx5Uxb78nH?= =?us-ascii?Q?XF0bjYs+m3JiJkBfewDXykU5HGEayImU/khuKPJg587I8nC2Yn1y7YaiN+dW?= =?us-ascii?Q?LqyjfhVRX3Yy7PBaeogbolKqMFv6xHKQkdvgsTLFAR+BVRIEYhmUd+6rOyNx?= =?us-ascii?Q?oDXzfv4jzhFrLTEficAY/a8ySrU5f0ZYyI/S4hr32DCHI2/S8UfWdceNR2eP?= =?us-ascii?Q?kD3GxZA1vpr0wRjt2kVROtjryCVdrU5tLKgJ6ff1?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Z2Ufo0mzrBuBmWRr9uwfMT1hcga/Er0uJW52X1fUXg0GilFjp6Lp1t1iLBlE6wU2Kma0hleMgtTPuT00U4DbRXufJgQEiasFRqYbW546aOXhj+Lizz2TS9xbJFdoz8iMdrS5yokIYy4DUOpwo0fXV/4Anf3skKF1IA0ZSAX1FuetiBPCyObS4YJUTpF7wyhskf/9SBcsETOfkLEySAok1tagWFgd8NbTRJk3TKkrQFgFgeusp/OqTuGKft0+JB3nXh1QTnQt9/GYcrwy7DmN4wGoq9oUC5cZz6ow4ySGcU1heaXfgN+agYZhDXUjqjbwabUNASL0nJ/thPOBGnlrAJd9xQPAZGRW3e+FgvZYFxVzKgFA9sy0NT0zOO28r9NSVH8TldY2Ce6sMxjR3EYWBmsvrbVnBGK8TTsqjPfiI9Ywbv2du4zz6wyS8d8x73zf+c1808HMNE7B/GWmydZvwL475FcBmcEKzWGGteF4IIhWsvdUPF7Yrd4aDPq11KCm66L8z4H2DfUkZKDMGGrzt0uN5pBs5qN3tUhS12Mb+D3BNgZcJiTlm9E+bgKpUqGiaHR2VtBkf1GwvMKBXPD+kR7L5+zhqBf/Zrq9sgd56M4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37a5660e-af9f-45dd-43b2-08ddc2ecbd5d X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5777.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2025 15:40:20.3192 (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: aRxq1xvbzuochuuS+RD+WbbCWc7/QgPBn7GABeE4F1dD5PAY1Lep0MMwVnecpXjyUZT+8ewKZD06oJQmlQSP2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PPFBD8703CAB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-14_01,2025-07-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 adultscore=0 spamscore=0 suspectscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2507140094 X-Proofpoint-GUID: jsnPsst5WIBmnsmdimVTRCpWh1eroN1Y X-Authority-Analysis: v=2.4 cv=O6g5vA9W c=1 sm=1 tr=0 ts=687524e9 b=1 cx=c_pps a=e1sVV491RgrpLwSTMOnk8w==:117 a=e1sVV491RgrpLwSTMOnk8w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=GoEa3M9JfhUA:10 a=yPCof4ZbAAAA:8 a=lXgNiro_HRjWA3FmjhoA:9 a=CjuIK1q_8ugA:10 cc=ntf awl=host:13600 X-Proofpoint-ORIG-GUID: jsnPsst5WIBmnsmdimVTRCpWh1eroN1Y X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE0MDA5MyBTYWx0ZWRfXwhBGV9MkrKo3 D8R0Of70GXMyxYtx+w6TJNA0r5e0veB4Smngk1OOOuAy+TunnvUlCN24LgbC6WRLG5vxpQb4whp mQGK9ihjL+UT9GRV7zuJUnOBvvKPJNNKmBpoydyfboJn30uqvOMwDjWX9wv7TwRkn+pLkQaVS0a N0N0LOvhROBUjSdFlDSb55LdB3wQRLEjj1ehD3vA/NyM6o72/qZoaq5mHOhibLL8otP3TQyhqxB rXZwLP58GL0C90ROY6CIDPd4oarAhjJrHHB91GPuMI1R5hqKIRS8ZWKZNwiDqpgqSpHj5zCFudt DuZU83LM0WfMG0RSs3ooPaFMYW6uiNluLDsbjFnQfxPW/bcAExJ8JHa8jB70eQOWKzWX/93SDwW zxdqjMT9JGNaiefoSZgcBHmgb353Zs4hF8B1PzSjCVsgUD9lKqzghVq0XwCTOdrJTzeai1Wa X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 268F010000B X-Stat-Signature: iqkz8pyy93gtg9mtf7ebgopomadsc7xu X-Rspam-User: X-HE-Tag: 1752507626-833642 X-HE-Meta: U2FsdGVkX18XkHfka+JCJDhXsF6dSzzteTvkjmhIDzkoRJ9+zU0g20ndc/eitd2VVvcFKDt7GdvBX0fCbdP3ExYOH27m5zU3tLvRuJQUhoeWB40lmRuyv+lAW6X3iSW0jLQZsQHA0ObjuoW3Qf+qdHdCuuLO9nJWgmQYM88twp+qYGD9HT5mJ3AeF37ro8K0/PZN8J0qCKk0xLHAeNhVJgBambIROlxZCjwL2cmxgqnsE1JL8Ib3/SBOC0bAtl6/YogxNQnkhhELNL0ceQyUgXMvzKxpGrTitCSv4r6Zjnl32IWvqOaDbuD+fSxbcZDTjc+B3xqQSHYaW9ruB49j/5yR1s0au0r6D9y2OOcbOHwsVxiPKGuwfGmdL0eCNCae5Xb9kVSmJgYvKSUMzDtZal6B34VSBMYbFh4YSHM/ns/50mBKKt1L6ZFcQ+HvBp1OcGgmwwErIoSIFZZSlHvYDHtlhMcv0Um0+eMP9c/Fw8DAZ58Dc3MEQzw757QvvfmnphhkxZpc8ha/6WElzpthGYGG37cFLOQLa32zH7RBc85TaYt0ERfuYv7i4POdJWtLN8BWaGupuvNypraEcj2sBfejOELkX5O16Lo2brpXGtKNlcYg7YlSYJyremahtaa93+v/ZN3s9tO/6rGveVWxE+qp/HUvxwmPA7phhZbMnpGq9mdPTgRc9UYhB6Cz+cphun/0VqOskge77qzGnRP+hT6P9GGnOIZhRxMNfymmDLPmUwX1r/DkShM12XPTVya+/hIASrh3IlhAnJH4lqvsHuswWKEqErN1yxabrXWhaSxEYueawCt1o7M4Fy1eogKGfEiU4wJzmztpKdyWmIOTzF1Ozi5S8xDL3S8SBdnWYLNEjaZfkokqMnrX7LZauLxwoSv5J8gWBWsc8E9eQHWi3bUoFDtv05Za4eUCdq3zuWEqj6TXEcLx72/WDytAduf0A9fcTZLb1vYxHpjRHpK ZALLaP4f ibYbezd+ATjlA4pwFUUdv5xuA4nmirHKzxrNFzPLpL1nddkSXrCKvvYBd0CN5sRJQssxMbEMpQT0p5PW6GV4BI7id5cDmVKETnKJZuywSIJPhEt3xAlRNQNDDIywhb1aDaAVoCipaSo+naeVQ247EZUb4LO/59vr5EaYdsGKY0axC8iPOyv7di5x904ogze2+18E+C41l0ZknAQi+JMtLg7tyhXXj5kINBVD3tmuKNUeUUFSSDFa990ijA3ovzCpO0yy/RfnDxIot63UPELZfNpgLkRWqjAOxMN/W1B+w/JXSu7L3bK7ccpWDMfhvis5stbB7EMU0P8mVLFqSa7a5xIQkic2uQ77mStOGWAQ50AYdJFWMdjYWeZVFTEIec/RzO4fBwJEoXH2Yq6p6ETfZibYSPkgTTPHnSzIJldcS6VUWu/1Y48RzKvTVMZiKVMjHd8N0efJpOHOWGUYrty3w7WgAEOyw9KsbQQHHi0RaIKvNOpJP2u8YXv/ptGmk9BJm/BctdkGoVn7Vdp8R45snjOA5SWR9w0lsdbZ7IkWYvKLaX5GsB5q+xR6zb58+uk07BiFZqL2/fwnD3i9AesIBERLzk7JKGMqrQFMGrdLBdKoO4LlLl3h4nayoZbanpF9T4LbP182Mtj4E2+pyy7pR6cJA5psVtJub0QEc4yEzYyh3ubyp10XqK1hwq+Mkw8KwIEQ27VW6tVcFIdA= 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: * Lorenzo Stoakes [250714 11:32]: > On Mon, Jul 14, 2025 at 05:25:59PM +0200, David Hildenbrand wrote: > > On 14.07.25 17:23, Lorenzo Stoakes wrote: > > > On Mon, Jul 14, 2025 at 04:17:23PM +0100, Pedro Falcato wrote: > > > > On Mon, Jul 14, 2025 at 02:00:39PM +0100, Lorenzo Stoakes wrote: > > > > > The check_mm_seal() function is doing something general - checking whether > > > > > a range contains only VMAs (or rather that it does NOT contain any unmapped > > > > > regions). > > > > > > > > > > Generalise this and put the logic in mm/vma.c - introducing > > > > > range_contains_unmapped(). Additionally we can simplify the logic, we are > > > > > simply checking whether the last vma->vm_end has either a VMA starting > > > > > after it or ends before the end parameter. > > > > > > > > > > > > > I don't like this. Unless you have any other user for this in mind, > > > > we'll proliferate this awful behavior (and add this into core vma code). > > > > > > I'm not sure how putting it in an internal-only mm file perpetuates > > > anything. > > > > > > I'm naming the function by what it does, and putting it where it belongs in > > > the VMA logic, and additionally making the function less horrible. > > > > > > Let's not please get stuck on the isues with mseal implementation which > > > will catch-22 us into not being able to refactor. > > > > > > We can do the refactoring first and it's fine to just yank this if it's not > > > used. > > > > > > I'm not having a function like this sat in mm/mseal.c when it has > > > absolutely nothing to do with mseal specifically though. > > > > > > > > > > > I have some patches locally to fully remove this upfront check, and AFAIK > > > > we're somewhat in agreement that we can simply nuke this check (for > > > > various reasons, including that we *still* don't have a man page for the > > > > syscall). I can send them for proper discussion after your series lands. > > > > > > Yes I agree this check is odd, I don't really see why on earth we're > > > concerned with whether there are gaps or not, you'd surely want to just > > > seal whatever VMAs exist in the range? > > > > Probably because GAPs cannot be sealed. So user space could assume that in > > fact, nothing in that area can change after a successful mseal, while it can > > ... > > > > Not sure, though ... > > Yeah maybe a sekuriteh thing where you want to be sure the range is in fact > _all_ sealed. > > I'm not sure that really makes much sense in practice honestly though, because > if another thread can fiddle with things, then surely you've already 'lost'. > > if you expected to touch a VMA where in fact aa gap exists your software is > _already_ broken because you're going to segfault. Since this is applying a seal to a range that already exists, we are in a race condition anyways. If a gap exists it might be better to fail and exit as it is insecure, but really, if someone has created a gap then they could have mapped whatever they want.. > > So it just seems overly theoretical to me. I don't see a theoretical means to justify doing this, so I must be missing something. > > I think we should error out if there's _no_ VMAs at all, but otherwise succeed. > > The semantics of 'all VMAs which exist in the range are sealed' would still be > maintained. > > > > > -- > > Cheers, > > > > David / dhildenb > >