Message ID | 20240710192250.4114783-17-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 0D0CBC3DA41 for <linux-mm@archiver.kernel.org>; Wed, 10 Jul 2024 19:23:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 638DF6B00AC; Wed, 10 Jul 2024 15:23:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E7626B00A9; Wed, 10 Jul 2024 15:23:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 39FB86B00AB; Wed, 10 Jul 2024 15:23:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 0CE126B00A8 for <linux-mm@kvack.org>; Wed, 10 Jul 2024 15:23:47 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B8D521A01E1 for <linux-mm@kvack.org>; Wed, 10 Jul 2024 19:23:46 +0000 (UTC) X-FDA: 82324817652.12.40FBA9A Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf16.hostedemail.com (Postfix) with ESMTP id 6B41F18000E for <linux-mm@kvack.org>; Wed, 10 Jul 2024 19:23:43 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=mYnAFHUx; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=T3v2a1ic; spf=pass (imf16.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=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720639398; 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=CVCfL5gmp1gv9bRyInG7BLU6ZsYmKEMst6LlVCnlESE=; b=AaJxIxtYUC+ODY4LrLlOedPGHYHsj5oxX/Vh7SqnMhWwqagvHmg/Os/liVlVgMDr7OBBQ4 J8t9BGvixkqp8f9HE79jQ8GQjXL4RdazIYpQ8iDUWKimThjDx6kTXnVvOnU2BC2ieGv5cM jIJyphnwXgJdvVjW7yL7zCE6gBEmjgw= ARC-Authentication-Results: i=2; imf16.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=mYnAFHUx; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=T3v2a1ic; spf=pass (imf16.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=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1720639398; a=rsa-sha256; cv=pass; b=N9R/yTEL2JwBuia8hUoZJf01eaISyyMOWTqdxApu5/Jbwz8WV1bRbUXNUtbvJCEDiVZWAn 72j//0FObMJLKFgi9g443KUa28wXF1S9ohRhuIleitV7i6B5jdHXQ/flIKQqLF2/jApvlx FUOlH2f+XMYCwLUmMTt+YP5Dr6RNdqU= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46AFu887003975; Wed, 10 Jul 2024 19:23:35 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=CVCfL5gmp1gv9bRyInG7BLU6ZsYmKEMst6LlVCnlESE=; b= mYnAFHUx0rfrEfIVUXMEqY9aryw/PgVRYQHpuTErDtZ4o4V/u4XSJP3SlrD//mUo sTm2JiCm8chRU98Tz3fichWrEHROHSzHkX9gpra2vknC4Se8c92zHJPS3mhRreC/ QrHgN5CGftzWuXVEoZrqpZX4j1t47A8Hyp/hE5R152UxHGHoU2aZHb67VdwI1uK/ RGiL91PFpXvNgl+E0oXS7ViDWme7jlDL6R/v7FOWBc1awe6olCO8/FYKMtYOvdeU GSYnae6JmLyUHqzjgeaD/3/9BoVMz4PMgIc1FD6PTwifHYCt+Rrh1KDFupxCLd54 /WvxzMn+2JYwTpHoeFjo/g== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 406xfsr24h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Jul 2024 19:23:35 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 46AInZer030164; Wed, 10 Jul 2024 19:23:34 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 409vva93av-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Jul 2024 19:23:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hwBqTZn+m5qnhTVD/dBDI5HXMnai3rnYoyYEEoLpjbH5fuxyymFCb8r6pxAkSrVRuUB2lJW4IujuxE0WtlNsmbiHGAU2meizbcMUFFYtQ5jtCS5CXKf3lSHQJoP4qkIgi0IEwZcJy++4AQVP83WpG05aSmkZ3hJe4ZRelA6iYBAo1oBmWT7U9Wf428XEwT3X0+ONOr9yBdgxumccWBwqS+yUEXf7Hwif24KLPeQJlCEeST0d3C3FLFROAN7m7geloVlbWMH5Nbow3W171lUCbBVlR2TtCXMkDVEVbrr7P82sjB5x31fC77WhFpqy0rhNJPyzfbb4KXJzifufbcEeHA== 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=CVCfL5gmp1gv9bRyInG7BLU6ZsYmKEMst6LlVCnlESE=; b=ijcvWHVas7ocI5kuAn1ZKY1CrHpJwzS6XpBmeteHvs80bW/88EtYV0NSgrmP1F+2ZbParOQd5YzYsilhIGXP0Sq5p/aRLzfEm2yh8Mlhyz3sLsab+V/gS7inMW8VX99H8f55fZj66ZpjnZBlRLd4Lr4FxAVFqPsrAGxUUVBa1xjbG0Lc84cQmd8MtQOcuoCjndhg6gGfupdABWfmMCU+P8PIhcyg0kmNRVt7OnjfHX171gw0r+aJy40TvAG4U35gkGWPZQFYL2vowwZ4DgfEChW5MiRKxV2XcgCh0j8ikau839MO8ZIvef4UM/WeeMcPjfBJsYdN9Cu9tS24YkfB1A== 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=CVCfL5gmp1gv9bRyInG7BLU6ZsYmKEMst6LlVCnlESE=; b=T3v2a1icJ7KLzBTByrsC/YDeOxr5B/mO67+VQQ8LFK18aod8MFiMjZebzSV8MCk2Lpo0e5IDJ4+YznYI0/+95eAeVx4oOKWp+8J8DC8EwkQD+uBpBu4S0BsbypCguwEVUAErZTpsNIbQpjY/kDNH6I/sdNj+rrPbV0YxVcQeb2A= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by PH7PR10MB6106.namprd10.prod.outlook.com (2603:10b6:510:1fa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Wed, 10 Jul 2024 19:23:31 +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.7741.033; Wed, 10 Jul 2024 19:23:31 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org> Cc: Suren Baghdasaryan <surenb@google.com>, Vlastimil Babka <vbabka@suse.cz>, Lorenzo Stoakes <lstoakes@gmail.com>, Matthew Wilcox <willy@infradead.org>, sidhartha.kumar@oracle.com, "Paul E . McKenney" <paulmck@kernel.org>, Bert Karwatzki <spasswolf@web.de>, Jiri Olsa <olsajiri@gmail.com>, linux-kernel@vger.kernel.org, Kees Cook <kees@kernel.org>, "Liam R. Howlett" <Liam.Howlett@Oracle.com>, linux-security-module@vger.kernel.org, Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Subject: [PATCH v4 16/21] mm/mmap: Use vms accounted pages in mmap_region() Date: Wed, 10 Jul 2024 15:22:45 -0400 Message-ID: <20240710192250.4114783-17-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240710192250.4114783-1-Liam.Howlett@oracle.com> References: <20240710192250.4114783-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT3PR01CA0011.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:86::30) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|PH7PR10MB6106:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d6a71df-74cc-42a1-08bd-08dca115c8c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: ZUkoAsnTo6Ct97bBG1RuJUZ9NPWUtnsApVKZnjv+/g1Ot7TJyB1/eu4yOY974ESYwmlKcrzk3T5uvXMv+tqHfgBVK2/5RaccWOgzzSY603qqazLKNPysktY7cjKZf5mRug7he9TpWyZSB3odqi4Uk9xfvtEn3fdUwF+fi7p1oSy2POChqVVD6Y73kVpwY+vouFR3/uxjkvO1i8n3zVban/4Mrutw1/IiFvAR1iiHkUd3vST//sq6kr/w/d2CB3NBqH8ABTe4nBOS2MIUSBC8LUlpDrot5+83rfTu4lvgvzS5b1FDJ0n8uohpWnBcq5uR6Ywj0qXHg12IhD/wcX9M5+O5V3Uqoy2G9Pmskws+bCtwgj626rzWJ5MzVnuN3J0wL214uSq4/mgBvgqwPWa9haPz99q9kUWO2LgOjpZmErOJk/6Vueac97RJMTHo1+g1omvsQ11XpxbQSoPDf7tvvdwswn7qBw3EzlXhiYCLmAU1bVcWB53Q5A+eygv9amzAJIp5eZBspWFbMsTUSPVTmObPFjBQX6sFd6ZUM+sUAmE8mQ6bOlDtIu2SlL8SwHMkNtJ9Fy+BoJEAOsWzMRfT7l9fkgtgY7ZaFGnbm8cXLmgxwUsMTw1tWU73S7MjaIbovehNgkKGRxD7tcipkVww3sxKR+LsUleciR+cfS1r2WfbIjkTFkmmqWy841HqKf/yWNakNAPOVhYnGaT/kdjhvDt/gayXR3ULUZ7t9FQzE7YsSXlVIQhNzjvTACB5B61c5mMQVCyVliLcHGeHeBuvednRP2OdWWK+EGFdwXlYNcVjP2zYtWdwFQH+Tm85hp0scH2NPnddb0r/+oxEgk6lm93EY2TEWG9JPzNJo8wKiR51CX+0JlFlU/ATJNzpBqzzfNTq+1rAoOPS+gBZ9/odeDhlB3LfZ2/MRhLUC1bV1OpbeivSsct0K+sJpkVsO5/jv013SW/oKOkfD8j1CREBI0h5CMdSrzhLWwdBF1Xxu9wrZH5wMLBDPL07yLvNnXmxn1vlSJ4H4+ScRgABEk1jtjOOBBD3AA5a8H7HVa4OWjPGQtWfJGYnQgZ+otWKjcSiDqFxNhHr4UuQinayBT0c3DSDmEenLn564AlUuAm9ro9SzlruH3gHqwt5KTN/nlCa+8CVNQS69lOZ0jzgZKO1gWdbUCrfGS5G0JZ8YwqIo8iIB/LSsOyeiyJGs90sVkXKKGvdx1I0yuzbi2pqohfRHkoAG40Reb3l4yLrBiQVOk8gJhuTlZW2Eucp7lys3bwTlanPbsSip7RnypeP+16VVTJetKBw0pXNKG43+EKOdItUWw7MjNXenI6WSo07XJehtCffb6S9o+VQRGjBVLyWWQ== 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)(7416014)(1800799024)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 15IOkixtVaHnCkrzOGKmIuDfFEXj9u1Ub3fJQ30OE8uYxXJg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7bW8ZbUDeVjn71LFoBUhzPxa30aIzUxDKI+OgavcyQ/lDUwn7AGNJv6rsG+WlaM5IEoKZJ0eCH+8qEOBH14SDwJMFW4UDf456bcI87oJofZ25PEDj7TY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d6a71df-74cc-42a1-08bd-08dca115c8c9 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2024 19:23:31.5548 (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: t7R/XsiT7fn0RzkZZwg76yq65gUYLQ45ZQxlpmVhNAFQUk1P1KKV8ViNgnxgCjeVQ57VWGa9EC2U7S3fyPC8Yw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6106 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-10_14,2024-07-10_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2407100137 X-Proofpoint-ORIG-GUID: i7stoI1RQm3SiOycTbMtD3-1duiN5VZd X-Proofpoint-GUID: i7stoI1RQm3SiOycTbMtD3-1duiN5VZd X-Stat-Signature: uzro1zthh9m1e97yiearuiat355wypxq X-Rspam-User: X-Rspamd-Queue-Id: 6B41F18000E X-Rspamd-Server: rspam02 X-HE-Tag: 1720639423-792780 X-HE-Meta: U2FsdGVkX18DI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YiFmWkd19hQ9ejH4ptEoBQQfGcf+lLJLQgQaYeqs2IGEl/b1UOQKZ4T+bSSqXKc86QavE4klaFW3vB5JTWxeb2ETA4YCDHfm7CGL8zYnmz+kbcm+uJB9AX/aWR1OF9Li3b8CVlWR6kJGQff84hIMZtpgjl23V4jp6IN3wwZpvsMQt5v6sWherXPJyZWCDGTQZnKKaxHNpDSGhez5Qs5cztmmllL7MFBdrCOCPZB3vNz49oQZ4P6hzCK+rGnGiJVEBUWPPiCcR8Q65d8Dd/E6CoOWV2cTL/6DrBwl65ADAUC6bnoB/k7wsG2+nWVCpqTdhIKHhhPnKbUovBKZld1ynAoL+wFA07WqGhA2JTQsxvOrfvINtv6eM+2BOQwOHMmSqf5H8xng7JLAKO51+UM0weTRdnEtkI/+XqAcGKJs1INdMezyuuNwiPPlLn5LTobwmPHoo4qf/83Y9HAUaNMeYiV+9Y38VpK3PjjUoU2Cx4nMij5Qc2GrlpV6 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Avoid MAP_FIXED gap exposure
|
expand
|
diff --git a/mm/mmap.c b/mm/mmap.c index e13f032fa69e..d5bd404893a8 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2987,7 +2987,6 @@ unsigned long mmap_region(struct file *file, unsigned long addr, prev = vms.prev; vma = NULL; } else { - /* Minimal setup of vms */ next = vma_next(&vmi); prev = vma_prev(&vmi); if (prev) @@ -2999,9 +2998,10 @@ unsigned long mmap_region(struct file *file, unsigned long addr, */ if (accountable_mapping(file, vm_flags)) { charged = pglen; - charged -= nr_accounted; - if (security_vm_enough_memory_mm(mm, charged)) + charged -= vms.nr_accounted; + if (charged && security_vm_enough_memory_mm(mm, charged)) goto abort_munmap; + vms.nr_accounted = 0; vm_flags |= VM_ACCOUNT; }