From patchwork Fri Nov 29 09:32:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13888545 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 AFC2FD6EBEE for ; Fri, 29 Nov 2024 09:32:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0D7B66B0083; Fri, 29 Nov 2024 04:32:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 087EA6B0085; Fri, 29 Nov 2024 04:32:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E1C336B0088; Fri, 29 Nov 2024 04:32:39 -0500 (EST) 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 C378F6B0083 for ; Fri, 29 Nov 2024 04:32:39 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6CCC114022A for ; Fri, 29 Nov 2024 09:32:39 +0000 (UTC) X-FDA: 82838617386.12.193C66F Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf14.hostedemail.com (Postfix) with ESMTP id 50115100008 for ; Fri, 29 Nov 2024 09:32:27 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=ikKi20z4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Tuq4xDh7; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf14.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=1732872748; 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: references:dkim-signature; bh=EqPaJ+f6IqDHXVwjEb4oeobqDiJig3PjykG1hHYR/+4=; b=OehHmYgt2HTpM2C+4TxaPAy8Cg9QMrbuVcVZsqNbc/27PBHqOfIVwvDYAEpH5ayp6vEbJ7 xaU4/czc2BQyz3Awfd4uKOe3Jnr4Co7L4BJcvFruVhsG1v75t84blHn0slj7n6jvlQ/Yl3 4pARxyNH2TUxzQY9WQLduvrecF6bT/M= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1732872748; a=rsa-sha256; cv=pass; b=7wsih1Mdq2dD7UTBsliqcKYkVlLMuB/I1Xv/ajUiuvpYio/8gljnng7sy7krN8aNx4dhJv s7/eOIx+rJdqlTTDzk2OYBEo9yvxyYzrfxQ3lEmLTeY7vWAHNKMtyoH8luD348h2MNWCmy 7Ap82q3MDcBybeuJPIwYM8spUPuXJ3A= ARC-Authentication-Results: i=2; imf14.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=ikKi20z4; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Tuq4xDh7; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf14.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 4AT1ffGv025226; Fri, 29 Nov 2024 09:32:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=corp-2023-11-20; bh=EqPaJ+f6IqDHXVwj Eb4oeobqDiJig3PjykG1hHYR/+4=; b=ikKi20z4Vv8iOyryhpEsVFXehZUV0DyS epw1NqTRauDH/rER1bPKTSh8zPqWP3Qg87M1Us5EeMSNMsG546e6MpHWdbyQlG40 IEc+LqyjSUMRG1wUl4kI4jF2wm6Zgyr28FWkRPByub5GHjUhYB43Iee+Vmn9xJwq 8/eGosHzm1Zo8IPeIOdL7VxXPgDpnnJ1S9Bl3xiDMBPbgZExvn7tXXxHM8bsaxCK pjT+h4qEu88lYKSlAT9yzejOY2HutC65ffK7KPw1Fp04ShT/J7mpllvefC59QRuU cuj40yHWGocx7Kq5BkGJlNCfZnbD7AmwpBRZacEFDoOaXNYWR7xfTQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4366xyb00p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Nov 2024 09:32:26 +0000 (GMT) Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4AT7FjsM027428; Fri, 29 Nov 2024 09:32:25 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2171.outbound.protection.outlook.com [104.47.56.171]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 436704yr8c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Nov 2024 09:32:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PPUqIxnRohemLxAgtz3Ga1J68P/Titf+nYRTXQPZSjc2OVcwYuLV0YyMRD4Z8h2GDneOVgY8jI8wrSYHwGXGlminMGolYd48JGja/DJ0Tm9r6IMgk2cVAnqYqFjzVizGu5USBQJayWk1/i0oq4wChpqnU3IPEmNSME4OnqaEy9gCtUWylJtjW6oLHk6Ba4/5d/d8IBbwlF1EMn/UVZXVpK32VNwrQkduwdFHW807PFymL/r3svrqwiEIrdyIK41Tg6QjbY7whddBRDgc/koW76i1QhEg94TQ6hRPRfLPXJvWzmUYhuErJDWgxDrxV9jNxaNc+8n4vKQxyf9LfaXMUQ== 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=EqPaJ+f6IqDHXVwjEb4oeobqDiJig3PjykG1hHYR/+4=; b=yTWBAJfxFGgfHMXu984JQsGHdZLnX4wgemEPg7i/7jcxX9xbUynJKSSWruDy/f5REa+iZCIr+WkrBsgyhg+BV0b4UFJSFdJXI9RjnaSwGo+akNk7W47Q1fmJW8bUA6Ev1tEA2Z8+3WGG1TCVBmhoRVzAzZG8xbScMRwiDwYXT9cU7CwIpCpKG9x5z9H/cnBeuuEtleSiBamRVfVcHzUuzPBL2MxvOcW7flG/9nkoHW78PyhFIkcp2e5vexgveHHMAieRLXYpG53JZOU1ECSG1Ow//c8N1ZONgu6ErJ+FNCuwSSSgj8s2u3dE99qpCCyewckhFv/riV5dyKNHNuOPxA== 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=EqPaJ+f6IqDHXVwjEb4oeobqDiJig3PjykG1hHYR/+4=; b=Tuq4xDh70lpAH1+NT1HDdbRyGFISrTERSZxYmmWcNKe90fPKqwb0Ir9IbXL+XDEVKU/Eksq/J3sHxIkq5vl0CtEbyaVJfzVzRGdJb1O8UXVgPyW3J70jXq4T2xCWWmWKOk+FmOSvpGM4EqhZMb+G41Sd1v+h0T9jD9sxSiSoziM= Received: from BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) by DS0PR10MB7455.namprd10.prod.outlook.com (2603:10b6:8:161::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 09:32:23 +0000 Received: from BYAPR10MB3366.namprd10.prod.outlook.com ([fe80::baf2:dff1:d471:1c9]) by BYAPR10MB3366.namprd10.prod.outlook.com ([fe80::baf2:dff1:d471:1c9%7]) with mapi id 15.20.8207.010; Fri, 29 Nov 2024 09:32:23 +0000 From: Lorenzo Stoakes To: Alejandro Colomar Cc: linux-man@vger.kernel.org, Suren Baghdasaryan , "Liam R . Howlett" , Matthew Wilcox , Vlastimil Babka , Jann Horn , linux-mm@kvack.org Subject: [PATCH man-pages] madvise.2: add MADV_GUARD_INSTALL, MADV_GUARD_REMOVE description Date: Fri, 29 Nov 2024 09:32:05 +0000 Message-ID: <20241129093205.8664-1-lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.47.1 X-ClientProxiedBy: LO4P265CA0122.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c6::15) To BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB3366:EE_|DS0PR10MB7455:EE_ X-MS-Office365-Filtering-Correlation-Id: cc3b15d8-d782-4c54-4bb9-08dd1058ba73 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: 663uS6F7yodu9CD5RPhrSWfzj7Zp/sinH5g4HhOVnEcvoDd4p+wCeB9hHSZA5QymuJYstiP0owqWdJR4i7LU2VN4UE5TWVaIt5rFkHE5fxaaQgR2ZeIe6clKGy1UY40G+UCSaLnqezROqX+5WxILCmLOr3MlOny65YDjtTWQOP0UZO9elQqeoYH5j6Axr7RrAagkhOl7Tj/GkbKSrG2e0/wcLGXcskrEDm3eIv2B7cb3trWq8EXtC0DYCrgRbgcT3tN24mgiaVPT5ny2Roj2T7SqEb8A+vluT9YGxpxriZo8sClA4iQy49UzHm0Y4ayPnPRvU6vo4INA0b/J+Unn87991NLn6oMvwxEWw3748/+EHf7O+VlSETRrTZmA0TdGnBrW3lsjW2ZQpRXb85HqPXBEJdAGEPhalcLW6DQrDv3I9CXPj+50F+dpLSz28eK94eVM2wphnrdYMLQq4gRg8oN+0xsPt50ptCKCbB6YkaME7j2pg1xsl2xKlaNm12m8H2WGYRfdnFn3VPblaYLPuS1xQHu/id2kW2maQdw4P8AU25UoBQrpYGaWwitmH2GiGJctcpCZSYntlxAizSBV72FMEH8VR+0v51W/so8T9VtGqxlpULzA6rVdyTt6Om/+dHN8OBxmwKs9P5JLhGXcHWAKUGV+84f5llzajFnjQwkIVaqtajLRUj+fJSbnuJu0/4e5GD++HyhbCYRZ91OskSddhKo0fzgCW8WAgQwVdPO1UUpbvqEjAbOVJk7LSrWKv0O8+MOGSvpt7IaKLECz2DSEaxfbZxQi23D9mMbqzLH+Ck8lLUIaFibRVV4ChwMarrZOlK9gdYZ76HVmvaoXl8JRECWgqPqVCGT98uHsJhZsVo0pahh9fKDVAdFNSzZx0svEY1xTzfyXX4+G5qbdz7YWYjPYSNJEa9R1jc+CNO5HVqSBuEdWJGs47o3bigYSH94UuDjun4rUvxNPGFldZl2Qr6ZgHCqKAvAJA8tNmSqmNtLkjFJetFD3H2r9u1ZbEusDNJpX2YBP5DPlYiqaSC71ENlsWmfuxFHGN6bdytL3qFGvD/qrFp2MCbGbEey/DWatapAgeRBMJ/+RSexT5hsioXxZIJIwcGAF+xiAhUMssWGgQjmeWqcdVa7uUyOivgNp3EC+A3aBMO4JM1wRAhw2707HKspMdPCLr38Hnh8HYcZAAjaj525hnBX5vcrwUeSbSR/lj1nEZnhubqr/RdZej/lp3lGyn+fmaoeV4RvwojooJPcm4bgF9Q1g84dAwUak5PLJRiYKEAZiWZNLHxIXiezPRiJsj/zJYN1PqzyKGNsi/Lm8MpCs4g35yxj7iD+LO50JTkL6Vwf6EgVjfw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR10MB3366.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +xUp7HdENP3vtKczh0+50Wbw8XfesEklbPpz4TL44qly3s731VmG9I2gkJdklSMuRVvh7Gnl1cU3s6TN/FeUV+2Ac77VBH04mWmMCI878PX3JdvgISB5wVreDXwOFEbkWfODKft7/iZb7VcK9gcpnd0iK1s1/yylwLe2e6VgKL4iYh7SbmOEk2q1BosDuZj0wBnFifkLskI+cIrN+HPRQpOax8MYCssCjTIBlbysUiHmqjlbiuqScI8wqpRKW6vFlUnnmkLzoSQjKqFZQO6ueKMSQw1GhUMC3UC9/sP1U/HuU4JU43b+RpSsGTLGMyX9OdGw41CbSTS5VBe4mtzWMbZ9H7DoEKaG49e+JIQhyYUYIyo6lM/ceoCKEwTz7P2wh/eU/O4tymvkOZEXY8FHNk3YvdVpvEKYaYZ4a/8jM0h/Hl4n2fXm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8aGSdTtkMMGCpAaWbwZXHNgHcBojQJmCF3MBVLaZInbn8GfX6wICk8pPE+hZFaSz0jxVUk6Nlgr3liMSDtg5e0gRM/FqRbwamW0WnT1aA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: IvximdN2vU9iEGYdBo+9v/724ecSXaIflJKLJYYM1ho31xL8iyBrADOq9y2yYnNiVsmV9bt2HXD7f4a3bAWfCGBm/lTrxGakEocwwKLAxp6JM8HMp5WRQW61pZ6TEcy6M50qvug14EjT7a2v0xW8NJFD9poIqYYs3dewdw8chb8sRP0Wf4xFOGdPuPjjFks1AQ8dWUFmVAMejgWUXZkItF7aq46dodVjw4ANE9CaUgxkZCyCdMxQa5V/sHuBbuC6A3pAQXEGnkD+k2xTUeV9xpYigKPhSR1i/2dk0uBtiSPmY6dxCkaC2iBjFFx3tA4BMqMn6orMvUQxI6a2RFOopfX0J90pt4wTWkMYxoSZVqabfNvo7TWvN7wQ39lDw4zA+d3yhWM6zuUfbWGwk+lKGj86AN/hn68zGjpyxRKANz+ocw8OV5QK+BB5Q7BjCwERvL/Zr+7QrR0te2PtgN1IFMe0/Ay5e+ipxODNdpl/YMcaKHpObEG+d7Oq/9MKYJtNwwE4l870509naYE1bzfH2BnDCaiHoaroYd7Lhr+rUy+l/FyT5MJiiQz4+U67J4lDKyU07Awh3s15TncutloNMPq0BfEWvkPawCsFOaOCqQU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc3b15d8-d782-4c54-4bb9-08dd1058ba73 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3366.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 09:32:23.0659 (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: xURCVJmXdeMLj6JqKOYnKLVtgyenPqbu1BrBLBErbAjppxS9ElSl0g0XUPZMDtPeB7tnU2V2Jq0pjtXUdDe0YwMs3YSGM6Esjn/YdUwxrF8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7455 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-11-29_08,2024-11-28_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2411290077 X-Proofpoint-GUID: umAfArFxmDI3N4eQc8f7XBx01wj2GLWI X-Proofpoint-ORIG-GUID: umAfArFxmDI3N4eQc8f7XBx01wj2GLWI X-Rspamd-Queue-Id: 50115100008 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: 7zphzihjfxoeu3r6bieoi7xj9sofgbx7 X-HE-Tag: 1732872747-387418 X-HE-Meta: U2FsdGVkX1+B/kusb5F2++Hsq7Q1gT0UZ7mgfSU5YZ8/VOz2JeZAZb5J3QbqLtjrO8N3RQTnQobQ3+nPgy+Oh+1ZhBzBqJRTLXSHBWcq7TwmKEiBD5OeRwFfrtmmflzd1e3XRouowd56UoCyEOsICCZGZ42uIbijwvmbZXZeh0zPfSu1DOng5UEgvgcpu23R55H6reumBBuRPyDQahBePX3M8H7FPM3TgqE5Z20fJcKxuDMxGgxr9KA6w8cch48nQl12FohMqaLWY9/yg/QnVKZnbo6BZyMSToxRX2AaWdAKs2t3kZQqLo4c3zpegmgZWnZ0fpd74qG1bnnY36q6ZRvJYOUjJfqauJz5MCA37X+/SIlPw1ZgZI0QUno5TwjcA/m9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TYg2+1t5x1Fw59lixw1JUuEZYdF5hFV4lQY7pT/2DX7YWv+8zqi7q0FAd3BVzKS4ArMLthGFrQ1jw9moGJX+cqjF5mPU9BFjq1eu49W2QTfnndEEIazWNKJKB1dcQxlcTOL9oss= 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: Lightweight guard region support has been added to Linux 6.13, which adds MADV_GUARD_INSTALL and MADV_GUARD_REMOVE flags to the madvise() system call. Therefore, update the manpage for madvise() and describe these operations. Signed-off-by: Lorenzo Stoakes --- man/man2/madvise.2 | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/man/man2/madvise.2 b/man/man2/madvise.2 index 4f2210ee2..e539fefe4 100644 --- a/man/man2/madvise.2 +++ b/man/man2/madvise.2 @@ -676,6 +676,79 @@ or secret memory regions created using Note that with .BR MADV_POPULATE_WRITE , the process can be killed at any moment when the system runs out of memory. +.TP +.BR MADV_GUARD_INSTALL " (since Linux 6.13)" +Install a lightweight guard region into the range specified by +.I addr +and +.IR size , +causing any read or write in the range to result in a fatal +.B SIGSEGV +signal being raised. +.IP +If the region maps memory pages they will be cleared as part of the operation, +though if +.B MADV_GUARD_INSTALL +is applied to regions containing pre-existing lightweight guard regions, they +are left in place. +.IP +This operation is only supported for writable anonymous private mappings which +have not been mlock'd. An +.B EINVAL +error is returned if it is attempted on any other kind of mapping. +.IP +This operation is more efficient than mapping a new region of memory +.BR PROT_NONE , +as it does not require the establishment of new mappings, instead regions of an +existing mapping simply have their page tables manipulated to establish the +desired behavior. No additional memory is used. +.IP +Lightweight guard regions remain on fork (except for any parts which have had +.B MADV_WIPEONFORK +applied to them), and are not removed by +.BR MADV_DONTNEED , +.BR MADV_FREE , +.BR MADV_PAGEOUT , +or +.BR MADV_COLD . +.IP +Attempting to +.B mlock() +lightweight guard regions will fail, as will +.B MADV_POPULATE_READ +or +.BR MADV_POPULATE_WRITE . +.IP +If the mapping has its attributes changed, or is split or partially unmapped, +any existing guard regions remain in place (except if any are unmapped). +.IP +If a mapping is moved using +.BR mremap() , +lightweight guard regions are moved with it. +.IP +Lightweight guard regions are removed when unmapped, on process teardown, or +when the +.B MADV_GUARD_REMOVE +operation is applied to them. +.TP +.BR MADV_GUARD_REMOVE " (since Linux 6.13)" +Remove any lightweight guard regions which exist in the range specified by +.I addr +and +.IR size . +.IP +All mappings in the range other than lightweight guard regions are left in place +(including mlock'd mappings). The operation is, however, only valid for writable +anonymous private mappings, returning an +.B EINVAL +error otherwise. +.IP +When lightweight guard regions are removed, they act as empty regions of the +containing mapping. Since only writable anonymous private mappings are +supported, they therefore become zero-fill-on-demand pages. +.IP +If any transparent huge pages are encountered in the operation, they are left in +place. .SH RETURN VALUE On success, .BR madvise () @@ -787,6 +860,14 @@ or or secret memory regions created using .BR memfd_secret(2) . .TP +.B EINVAL +.I advice +is +.B MADV_GUARD_INSTALL +or +.BR MADV_GUARD_REMOVE , +but the specified address range contains an unsupported mapping. +.TP .B EIO (for .BR MADV_WILLNEED )