From patchwork Mon Dec 2 16:58:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13891020 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 78BAAD78333 for ; Mon, 2 Dec 2024 16:58:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EA8D66B007B; Mon, 2 Dec 2024 11:58:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E580D6B0083; Mon, 2 Dec 2024 11:58:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CAA216B0085; Mon, 2 Dec 2024 11:58:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id A671F6B007B for ; Mon, 2 Dec 2024 11:58:54 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1F9A28012C for ; Mon, 2 Dec 2024 16:58:54 +0000 (UTC) X-FDA: 82850628000.01.221958A Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf25.hostedemail.com (Postfix) with ESMTP id 0B7E6A0004 for ; Mon, 2 Dec 2024 16:58:41 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=jD33aXm5; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Jtn4kq2F; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf25.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1733158719; a=rsa-sha256; cv=pass; b=HPzI1eDHVK8ytOTblnyPjo6Bduw47IMzyUClqfieyfJ6S1wcqVQ4YgKtEaal9bcdHrp4zn G4KzNzfl8t/Yve0gN1ddKYkyBQ/pEd/QKHHTfchvotpQtfK03KpqDDbtvoxLwddKKT77Ob qiREefyBY9MT5aHXsT6SDq6d9B0xQEE= ARC-Authentication-Results: i=2; imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=jD33aXm5; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Jtn4kq2F; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf25.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733158719; 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=V2iA3NbYomVpBw5lp2PQU8fLP7CTQwNP7vc+7bDBrMM=; b=jlCTTeXpI61jRrrj13Gn0BMobsOWQUxjRfKxgnT+FV06HcriX9Egs83K0zgIUX+z8y07UM nEJ0sEKYLtsZyBVhE28CZbfzSk4BGvYPDAuNWZfiEF+2T9b0Jo+dKZ1djAxjYCyP0OuasV GM9aIvoGuOpjNIAj9OT1KBZv33umYgc= Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4B2DTiRr024809; Mon, 2 Dec 2024 16:58:43 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=V2iA3NbYomVpBw5l p2PQU8fLP7CTQwNP7vc+7bDBrMM=; b=jD33aXm533cR8RzXL28KLunGYqz1Y03g YgEBilp9WvPa7B9gfYt8tov+bvK8umJgZOQzenSb3t3l42l0IqilQZnfcaXdA3zI bUsMnCBYvFQW1fPHUKkJDGeljd98R5xW+CNQLg3YMH9kagwK1nkzH1gr24sqmNFJ oCEDsxmcdCiszQjpn3YvvJTnSepugmDLRJH4G3f2wuzL64EkGQmbPYcQqgj65QKC 4WxSOinv4fInXD3mAHurMdnBU1kBrHGrcJpEvdNT7QPFDBbwRF2Mr+bChfbn34EN qMt2S78u3e4wqL64LO+Tpny6l8VIj2y0rTwCx7k/RffpWPEDqWR0iA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 437sg2421s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Dec 2024 16:58:42 +0000 (GMT) Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4B2GEmf8000934; Mon, 2 Dec 2024 16:58:41 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 437s56twae-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Dec 2024 16:58:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rZgfJPSIjjlIdmsBFTqvn+lR8LnXooXij5iBf3budqxLtsBUpA5NgdGdz6kd7cdMZU8cE8WLofKzc+Z17rbn3TfXKfIP/JXlTIXFWfB2VRHI2x5cTEEW5GJQnilK4hG1ENTcY4Gy8ks7PE1rRuqhJfzAcr1E0rvyFq7PICPmmC1WGKtssrUCyTFpZSx/vT212LLYeTyLVUu6EfEfJ3tzoZnVNkwgjS7xF3waHR42GMsdmHHweGsRl03y+Sm8upC3sScm65OnxaWF5dP53zkKfWoZRqdfGoTfASn6yu9lxCEAYQHsHppvOTa6AvvB3xGwhBB5j606BbqtGhiPXPgMpg== 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=V2iA3NbYomVpBw5lp2PQU8fLP7CTQwNP7vc+7bDBrMM=; b=yT4sZ0lngsxxmTBR4Q0tF1CMnDob7i9fz16A6j4PlOCpq+QVZLgPMRf1XrsBVv1whab5Cnd/cMEOzdF29JaCwnf75SrJ4WRin8xMe9mrHkghesGJBEfVwHJoG/Dbwuy51zpldm9pgcpD5jMr5atOHlh3+9nHGfy/jo4OP2+VyXPJND+Lu3RtlCvAN7SU1frSbN3SDkjS0c2laOwNxHgDWdjZJqH9qddHiTjelEeMeKk0uzEv3yf6NaeQN4q51kdxVOZTKeAxNA0QHYKkIcGKjx76+TiL50bA4Gsh4wCzgxS26HvWk/2Rw6v5USeEkwQqrTpJFEbuJYVv4qul/T93mQ== 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=V2iA3NbYomVpBw5lp2PQU8fLP7CTQwNP7vc+7bDBrMM=; b=Jtn4kq2Fs7r+/TZP8imRM1kZM/F1tJ7afTdxCLkTYa0WkQID9qQnoXMesRBBlNxfnHnyCFskEUgm+W8fOWJJMAmwWT9lqlIMBibvs/SeTYbqeDlvl6bxHLgYGOoZ98FJga3X9s4ILKM604xBLJcxK429gRJNz/np7G+respCb8M= Received: from BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) by CH3PR10MB7459.namprd10.prod.outlook.com (2603:10b6:610:160::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 2 Dec 2024 16:58:38 +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.017; Mon, 2 Dec 2024 16:58:38 +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 v3] madvise.2: add MADV_GUARD_INSTALL, MADV_GUARD_REMOVE description Date: Mon, 2 Dec 2024 16:58:29 +0000 Message-ID: <20241202165829.72121-1-lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.47.1 X-ClientProxiedBy: LO4P123CA0256.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:194::9) To BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB3366:EE_|CH3PR10MB7459:EE_ X-MS-Office365-Filtering-Correlation-Id: c707073a-185f-455e-20e6-08dd12f2911c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: OiIt+4ZyzJvK6e1vy40ZFUq+EtBRPROmDwG7tqQ7tVbWvqTalPICs1iN2ECVX01Qifb8nUKKLbKJ2QEhpvWzm9j+z+a7aGV6RfQSoH0/WAc85yio1QL3gM2tTR559Q/6QCejuBwAHokhwZpZfmJv+8GB+rkAHBiX/y4G6cpD/YQJfHf+qnd3ogHwmw0w3EVdUckAbrab1PqzaIfE7I98srEumh5wWs4otolDBKSAdqus199yZfaWjkUgg9ozOrWt+gogPDS5kn8voLHVhZdkoEHgUbVsxVpPgZ/vv1D9BkBc90R5B5pW8p/Bf3y/rXfQSBWwadHfP9GMRjJZV/qAz0CzBPblvP20t4weV0Hn5ZcWWsZJ/lyGjsTvTgNXhIjRKDDA/203Hw8QP1VeeiAHRa8cvaL7NtCF12hFpxWaeYYJSqfVViNPF49ItYvtM2mwSvvV9KR/WzuiZ97gXEPjLACs/BFJo8h+FeAbWvnz6phhWyaQA/tzoyeNoVn+w+GFWkwg0r4+zyI12QIlVfYZ5zkaq0kLAjS2O8EKitJnayd4jayEC3oq743ayweTPtTsWFRHTt/pmjSV1Xenqd1VJth8t1MMvV9J5Mv9hSXqqC+L2LepAvuz4QnkpU/uEoAeeWa7R9XJVmTsm+7Iu6jGoNQW1CsOQcPdfWjMYcO+1ZFHaFcvs4gN/Ay8oCmXHwcSRg0cBqVLcusIqkJKCTRZ/eO9qmmOntPeJd5qpXkzPRWo+yR9MhYRIudH5eblPosFXCPqKgyfsIc1onhYz8W0ac7uR0l7BQRGQvZeMUwS0rES92S9DCmHFBPNe1J7BZ9J2ff5yRrBkuAB/tikZ6hDe+en1cNO8oZSfi+ZXwBbJ2IzcdaWJZLHjJmoxZgbSrEhskp+Ypi+OLoTa577fiufLLCbatd9VXTCCZSej9yHFF3wjJ3ZEtwtgRFaBI93Yj5hh7kLYP5kjqau2mhGtHKwV/tBh2iQ1dpA8ejJLXk/4EaKv8mUeIUSVzq40NJFThpsrz28NGnByoxPmQGGV9HCOSbbVuKCwB3BDR2N7O8MOz1lDvhGlUoEI3brabwmisAj3fWh07SUQtBsr+C8YWJIgvE6AUiGM4qOqVPdR5PkjYD6DiZCb93HZsSjsQbKLYsZ6Ed17Q7lQtCv/qIiX5y57bjm5x7jinrqdbttDjcSBazisTl9TEZe19x9mbRA6UicEOSXfrb0MsxXb3wa8WjLDOMj/AOWEfwgmIALOSqM4SUJpYfj1NeHP7jIcG9ZxckKIxmZz+q2VoyxHtcM7Z1u7l7yuEbmkK346loE4zrheStkaVpZCTjg7c8wcnCt5Mrm8DwJFnvCWNxe+rBhmk3RPB15Ya1alE31yKaBiBNzfO8= 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)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rjgKHbPcNzZowWq7+EN7npjWQfULWU6gKL5g9nD+tLR485E+duncnn2vXNwByYj+gAjeM5vd6HB9PxzT8NzkeisLZ7JWR56y2+otuEvG77Vo3ZfWd11kSsYePdrpXid2SMI894I0dJfYqxtqozLrkBN2gVcpldzD13vZGVLxUsweT3RjOfQAvmSWIyR/o5GSlnr4W9wYfH1FVsmE3YdUf/nuuwId6E8Rr6YoRa5Pe0oCor79/Xmve1NK4tO7BEnUSSEURc8IgONggYYIXYaLkevmGMP3m5qjCFB4nTW4D1ChSHLLD/8/NhRgC/PyXXA1EhTNXr6f/tklIAhiGrgPbeR3TjeKktCNhS5PoTiMZKVgc15dA00mBBTDtdEpNKEt5+a6mXFXe6RYng6eS9tGo+grxehkM4CCMdY16A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dZBDK4uq84rOOjnx9eI8axrAnsbSl3qSx8eVVZnmKbUaL75/Mn45vcGoYkKnUlEsH0htdJGSEGoHn0CBvvCQOXzkH12PNkC8VHJ7tT5EHiexh4y/By1uo/BA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: HMdogv1CgpUyK2bjYguexIJlrPOvF+pn/BkzcQYdvENBVS/iWl/Jck3t4lqIkKReIfsXxPdPYGyOQTo5gBI0j8A9L568+rMg62PRPNYD3L5Ockkjd+ZOZBBsoL6+vEmZFKdxQeh5YEVR5+dXLmlVHeft0iHVxCkQXVgcHurOTF6xQsT+ITiM8uYzXsM/+8AHa6O9l12Cfmn1VFYKzx111HQCIVyyXGCqLjS/09GHmJ1Zqop1BcIG/9M8mzAEpCnWkn/a7YjqsCr4qm2VtrxEzO3JeN2G7sYUA6SytU162BSE90xlld/iaXlDuDBAtYrOvgvJeJB+S3C6VnFRYnBKIJW+9h0aMYsapEASTQTN6B5bAJ2D8eRrQwR+/Ol7qZBMX/Zzt/AyRVnqajP58noYOjZy5VKB35rqDRiWWK6yQiC4WEK+nSSHaLcayp3CMKK3qSVQE4birUGPc4uCmXQHiejZMLGgSsYMmOVMWZuvVWXnSc2KmJCfADD3mzex9C/7DJa9Ek48H2lw6Ef5iUKQ7n/cNcr9pDWx6tZTTPCUYntyQrJlT6KcL0XiZdG0YHIe0pQMFSExj7Ou8dG2asEtgAxHJfSSeRnWGgG1TczTzL8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c707073a-185f-455e-20e6-08dd12f2911c X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3366.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 16:58:38.5566 (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: iBAE47MBVW/87RDQ00pbZfOC780pA8Zsbyub+FdEuwqAmpREDt9o1F8uV0pIlsr+vP0ZsfiRGvfmnqKkS2l1jx54yIUoMMpqgLP7/9Jif0I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7459 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-12-02_12,2024-12-02_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 malwarescore=0 mlxscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2412020145 X-Proofpoint-ORIG-GUID: zKoMID5WN9naXNnSYCDEHUwnbd5Erq4G X-Proofpoint-GUID: zKoMID5WN9naXNnSYCDEHUwnbd5Erq4G X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 0B7E6A0004 X-Stat-Signature: x7o6dga9n4jw1hecm3bxkz6dpiimdwjc X-Rspam-User: X-HE-Tag: 1733158721-827840 X-HE-Meta: U2FsdGVkX1+G4lcUoMCZwa4dZag5eJ+7Yy0uzFS4qFMbFJw3VTbouIkwdGeKoV5X3JbsC+nfuABELKql62HW9pNyqwDUJRNkT7a0uaZlY2qVQeCtu0MshR2Lj+uW+5KFTZMhLUZ7EISra1qArAwXuKUEmwG2FjS1u1zoI3OgW85uirGR4YmX2pd9Wm0jR2Glxd3hcd4akkegHJQZMRDakGDyMm2EOo/sUOWzsvC6j7e3DlUfu7FmwfayyjAtULYP1fjmk0K2yvsxswizjljsnJxUV1FXz88p1P5NNF5sqMJQeGpziqmzMcm5hfjBZ3mQSI+1lNztYqZEp+RJc/j/xvibv91jYtg3yI+OIx8fy5WO72pm5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X4DbP+D7+WCTnJmIWePc3/JxUKXCIOo1rZWwKAyYzTA1IankMxM3Sbwpobj+ZojQGgTfoJwckYgn21eLQfHmjEjxNwVKW1Vmf0on5A2x0jWtq1rsODH6Y5SNrRRoq71b2eoe0z5ohK+D6VizXx0UOO429lIpT7IqVgu+r/1CgfTC5X6e4vOhpBIHe 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 --- v3: * Don't describe SIGSEGV as a fatal signal as per Jann. v2: * Updated to use semantic newlines as suggested by Alejandro. * Avoided emboldening parens as suggested by Alejandro. * One very minor grammatical fix. https://lore.kernel.org/all/20241129155943.85215-1-lorenzo.stoakes@oracle.com v1: https://lore.kernel.org/all/20241129093205.8664-1-lorenzo.stoakes@oracle.com man/man2/madvise.2 | 93 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) -- 2.47.1 diff --git a/man/man2/madvise.2 b/man/man2/madvise.2 index 4f2210ee2..4cb5e7302 100644 --- a/man/man2/madvise.2 +++ b/man/man2/madvise.2 @@ -676,6 +676,91 @@ 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 +.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 +.BR 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 they 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 +872,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 )