Message ID | 20240822192543.3359552-18-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 CBC75C52D7C for <linux-mm@archiver.kernel.org>; Thu, 22 Aug 2024 19:27:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E7FE80056; Thu, 22 Aug 2024 15:27:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0994A8004F; Thu, 22 Aug 2024 15:27:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D90EB80056; Thu, 22 Aug 2024 15:27:01 -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 BCE548004F for <linux-mm@kvack.org>; Thu, 22 Aug 2024 15:27:01 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 5DF76419DA for <linux-mm@kvack.org>; Thu, 22 Aug 2024 19:27:01 +0000 (UTC) X-FDA: 82480864242.05.217119F Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf02.hostedemail.com (Postfix) with ESMTP id EDCC480008 for <linux-mm@kvack.org>; Thu, 22 Aug 2024 19:26:57 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=lSHD8SxZ; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="y8oj/EAq"; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf02.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1724354752; a=rsa-sha256; cv=pass; b=y8b0TCuiZTP4qgfzo0h+Btn781g2sTc6WybbTkg62oOlNY8D7JZIwB400GNuepHbLU9lN6 A16AuZtUIMZoAQoI5fY8JrqFAEkETH9XXmpqt8RUDfQ9sCrJW+3nG8VXDVPPLydSaY0tZ3 J8w4qNaMlwVK/sTK9qTgKN8FS7uKFdY= ARC-Authentication-Results: i=2; imf02.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=lSHD8SxZ; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="y8oj/EAq"; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf02.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724354752; 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=ZVYsOiWFMcykFDuOByyZ0ITVxyXF2Jr6xdqxlzJra2c=; b=HtByN9wFthMSMOYZPYm7s8f60D+6v9yyWybgIRP+NMbkBRtVMMEetrSIkvk+82et0j6sqI Kdhv/CuOUYtjw4BXr3LJ7kSPrQP5THrwYp8jbaUdkduOijiWm4Otx8ogvCvNfGiOjblHt5 IsjXLlGv4+KyRbdH+LNI256bsS7e6S0= 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 47MIMUUG021048; Thu, 22 Aug 2024 19:26:48 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=ZVYsOiWFMcykFDuOByyZ0ITVxyXF2Jr6xdqxlzJra2c=; b= lSHD8SxZnLGoPKzrAV4gSu3/j2L+QLkR3IXhOXmiXh1ulVdX7dVFJXwfrmzhEOBH KL7o1AvF1Wzej/65bwN1WVSUxMaPQlRV4I0WyP3T4Zk1lGup4+oQ0qRsUCI37DKR rCTjHOGQlwhnUOozlkZkPMzFLDtczy212OCVoinngPqCV9ltiVeRt1/wt2ELJB9G uWMV9b03CuET+mKvyGT/9StbCWF7TPIFR00+aTgZgTXXd/R/c6bZORO8jKvOP+1l 1+ahNvaOghhbZgK656S5r56YgD5T0Itz/2Fq4cQZKbJo8s0HkiqqJBlxIfhzQct2 KM9UMWXshhyWZWwdBd1a6g== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412mdt2w1f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Aug 2024 19:26:48 +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 47MJ3jw8020777; Thu, 22 Aug 2024 19:26:46 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2174.outbound.protection.outlook.com [104.47.56.174]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 416b5jrykb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Aug 2024 19:26:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TlJkLjmvD6TCzUqNzl3cuMjqyQ9qxri/ud5/ydWgFOfpkrnty1j4LItdsb8tXUG34EDTRRkjwPIqiIKqvhFSra3RBmXAs+TbwM0e4IyJOhuwKJBHrQm18zyDpkCPxfMg5sIZvTad4CV7h5rb6Mz+uz3pF+uYwDnQkUiivvSEMi5CXLMyjwfhaF0hAD3zTsJ378YNeQZYF6iJ5ZaLgtbmqTmTV7VtOp6A/mdeDgWfN7L7KSf8vmWGZGJVzMA6Xsb3rgxD2kRE6YaoZskkUii+UtMRIfBR9497o+uu785NrT6ff83hphIGk5zMRjgz3TCzJ8SF0/6MWaUAXrN1K6O+Cw== 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=ZVYsOiWFMcykFDuOByyZ0ITVxyXF2Jr6xdqxlzJra2c=; b=azRFUAKN2eiNDkLiPDfvecsUIDts828rz6Kei01Fp7r+DEJ+g1p+FuiNTkV8YwhsW7iYJosLXjgKlcu9g+3X79T2g6L+iqxX1l6uw2CLofmiGTNjyMJsoBxgeIi60kwkNp4zhqtpfHvN5xTza0/i+rrO070vyNjeidCyaPHh+NfLeXB1E8p0sj1M74Sgu3Uwog+QZYRlxdHqNQRI/FisxLiDEtF7u0EVXk2r0kqZLaW72cGCqpCA8J02aqql8H0zrUd308exsAz5xCq3i5zKFN2HEUHu8Qqa/dL+BeQpZYFYY7pCiLyreKv8krL/YW0vTy1j5Xu2iS4m08QFjg/AXw== 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=ZVYsOiWFMcykFDuOByyZ0ITVxyXF2Jr6xdqxlzJra2c=; b=y8oj/EAqET/pxO861qxTkpL89SjiFS+5B2kR5z+KJPUfTYAduTxtbRitsal5aMkvyVh4XyPzDjhwWXu6uVm7kjunw009aEB+T9yt3bE5NNOlP6VCDBeEd0QqWUJ3Ovw9DaixNHkLTY/6Cf9L21M6lp+G8MH9TeRruRGRAPy+o98= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by CH3PR10MB7761.namprd10.prod.outlook.com (2603:10b6:610:1bc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.16; Thu, 22 Aug 2024 19:26:42 +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.7897.014; Thu, 22 Aug 2024 19:26:41 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Suren Baghdasaryan <surenb@google.com>, Lorenzo Stoakes <lorenzo.stoakes@oracle.com>, Matthew Wilcox <willy@infradead.org>, Vlastimil Babka <vbabka@suse.cz>, sidhartha.kumar@oracle.com, Bert Karwatzki <spasswolf@web.de>, Jiri Olsa <olsajiri@gmail.com>, Kees Cook <kees@kernel.org>, "Paul E . McKenney" <paulmck@kernel.org>, "Liam R. Howlett" <Liam.Howlett@Oracle.com>, linux-security-module@vger.kernel.org, Paul Moore <paul@paul-moore.com> Subject: [PATCH v7 17/21] mm/mmap: Use vms accounted pages in mmap_region() Date: Thu, 22 Aug 2024 15:25:39 -0400 Message-ID: <20240822192543.3359552-18-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240822192543.3359552-1-Liam.Howlett@oracle.com> References: <20240822192543.3359552-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4PR01CA0332.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:10a::6) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|CH3PR10MB7761:EE_ X-MS-Office365-Filtering-Correlation-Id: e3695565-e080-47fc-95f4-08dcc2e059f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: URcT6e/SAVD7Lad5bSOqLIRNxajJ0cAXHFCVm6J320bEOGtMA8qK2G/TpJRzkuVgU+u9DbZSWWxgyKkZpsHR4xqi7G4ByhlRBQq9kxPWmQSOWNYcoPf71tdex/SuJ9t3jF0mTmEWdaKWcbAtpBeZ5hIBPuDlURItIOU9iCpxvzBjdaWSTnkPHrybBRu2ENMi1quULEsQIZmfHuCH+gvgvw+HGjr8ytgmrGIhTimiJ+MZHzAGhpmgAmYfVV9nEp54V7DN38scbzonz8AN0z4Q3GQgmsH2OHY73sgow+rIIQZ4gGJFYzQEWR0nZUjGW2YYD9gwXhjKG6BJcd8JiMY7dn7sgPEcD2KE1di7lbP4ctH6C3tvZEu43+b1duOl4+JSG1chzMlng22/CsJDTvn0epxI5kM5pmGQb7OWMaX1EMp7xrEEbzTgwb6L8+3RRblerB0JKR620euhnyRlmMovLa1P/XXnGz5DUpQjHQnTr9B+OtIZtmNAuZcftXZahHIrikBuQmHuYd7gAu9pkDupuDjMRWAYjejH/AwM81+08Dr6ZssMfsY/Pk1L5oPxiB0JJGDfGOfXNGZavppa7y10O1S1n+OHvunodkzTzpl9akroIGKcL/JS4EGct3WaF7E/IwVQSZCFkMAk8VBNF4hGkZzrbqy3QLrxJgRLyJMepeYI8dei7ZxO4MzqPoSb41WK93hDdjolTQoeoM9J+0wUTSLdFOvHxPZNzezCqc9dq6vfiLBzHyxLl/gdW0Qtq9TuFWGXF6tqxXspLYncfI4yXheJIbExth3bePM78Wuc0tV+bTQj1yn90PiwE1BsV6GrBIqyAQjLyESf8t1o9Y+/J4O0NclRO+9vHwJCs2xDVBmb2UY2pbwf8X5C+101nY4lGr1Pcoy/I4S14Ileitc1gsELFgRNHOL6h+E5DRzHXl2C6mfluC38hxTKU+aq8c3cMrd1Hxqkete7/e36llXd0nxvyH+LrFUx+O5NB+NnrZWMQZUMWo57DJw/TMbMQLhx6lLTu8zin8Jlm+DQCpzRU16oJ7iP1DOW6urwxxKZYhLGs+q3qakdv5UJfAkWiUSqlDJiZsChFcYfVVaahPy6eHrHGaIVcTuCmJR1aOqZD2fSF6HUsO5kmGGB2a+A7FK4pSO0sbZOzAzd9WLazAi/tNEW/YurJxgNTaBBZ2Ijn3m/QW8ZKhdJ7R2LfM0bxmqD07/9bTdBoHHlsGxddzY6ctUFSxwFrql/2CxqgxpAmJ7hUKyuqO9UDKcvIQZsHcDWCUnTsDqwyh8xmy/iuXweDUa/xGzP19qqZ3FoSGBF61WT1YpdLVFBxX70Odlowcw64sFf/Amr8iKk6fNmnH0qdA== 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)(376014)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GxXykM97A893j/ki0bZbOeLVBw6pKvnMoULzeryQIn8EBKqYFXynK9st7CIT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cRLlL3WSQnBb4P6TuN4E0LrpXaK4248x43eBDpw0XYdZn034LMz/RLZ26RtxjHwlahvRmiVxbnYCn8EsY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3695565-e080-47fc-95f4-08dcc2e059f7 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 19:26:41.9154 (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: /ljBBHeME+r/QmTipq5uY0Zw1qoeVjj+unGy/OA7tup74LJt4pSAVX/5IEG0b+s5TpiEhEerIs+VLyZpe9MInw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7761 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-08-22_12,2024-08-22_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 adultscore=0 bulkscore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408220146 X-Proofpoint-ORIG-GUID: wLnVLnmcQ6AXPqzwX6EZxXtDiRQHr5FG X-Proofpoint-GUID: wLnVLnmcQ6AXPqzwX6EZxXtDiRQHr5FG X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: EDCC480008 X-Stat-Signature: f4uux5nu97ub7gcicqsorn696ytc6qcf X-Rspam-User: X-HE-Tag: 1724354817-976803 X-HE-Meta: U2FsdGVkX18qRihd7hdOF15ivL+XlQ/HIhXkNyBEj8tY/CSk/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fSIGj0ddh3fX+fXG5IFQ2U6BVfFQc2s37y7dSW2GTdy2OzbYwdQq532E7Z+jTY3W2WSb8r6yiFq4kf0JExm7D59loL0bWiBFyAX+y0JgOzd+uSQqXN/KqHQvl1rjVIlv2/5jc9H2fWRICiv/3ubS7kXsiYR6JWJZCgOgD/FipnGFA1yd5n+SwlwdprV+C4Mkbas6Mzu8fkzq9/6oL41NJusWdQiIlg6vWIdy1QCaJZlj0H1piWlfOh5Hs5WjDKxvmDVh/XlxhQN4ICYza79Y2bXgQ9nW7a0voHJRcXk6ylIBodYx7Pj7uyFRCSpzQyGqP6dYawXWvYGaoj6M9lnkvN4ws9CiWx20eJV3W7QdJERQR9OGNAb08U62NYNDyVSqrSCBXRLLOZsAgVkBfqkHi+VZJ4IZQsjIBHvyCYcUf10q/E1F85Al81bW/9F+TGvLgYCDEMtoE/BJKg33WJ35orIulwEhzLqSqLZOwU+OJHwnodRPiKQKHWmEvd3eaSdErYC4Hq6xA93RA0zzN6ienWdUoXbr4 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 f8515126e435..aa4aa49f3b97 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1413,9 +1413,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; }