From patchwork Fri Nov 29 15:59:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13888826 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 EF342D729E7 for ; Fri, 29 Nov 2024 16:00:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6DB286B0083; Fri, 29 Nov 2024 11:00:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 68B1C6B0085; Fri, 29 Nov 2024 11:00:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4DD996B0088; Fri, 29 Nov 2024 11:00:11 -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 2C3A76B0083 for ; Fri, 29 Nov 2024 11:00:11 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 9CBB2403D6 for ; Fri, 29 Nov 2024 16:00:10 +0000 (UTC) X-FDA: 82839593802.19.0F4A2E3 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf27.hostedemail.com (Postfix) with ESMTP id C53B74001A for ; Fri, 29 Nov 2024 15:59:55 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=V66cqa3q; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=wdRMZubt; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf27.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.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=1732895998; 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=GqlnCWSxKHsx/u02Z0MPTPKKtLk4b38Rjn+pXeE+5ic=; b=HMhxFDBT0hU+KlEQ9+hrAQhnKbW2azq2gPvGmXLwQcFTnyaNI/houRrwXh9qXHu9GKFXnl /4Xn9uwIpspYvzm7ERpon5bitiy5XcESdP5tiAlTXhdlCR8+oNpGY1CQWYiYtlReWWiaRL Y4gghnEgLrYLEdWXmBdEjwLO+guSnrI= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1732895998; a=rsa-sha256; cv=pass; b=eFOIqadJePpYt8TehBS11Llz+H6uiy0ZD5Bj+BVEogAKbvFgLECFpRsoTfpjkCLX9XA5gG ndUvE0TTkNeS/DYMT6FqPMr9CIIMHV/PGISXoun5Zugo0iH/Ew8i2aZ1UypKYjDzRCZDxq y1A0ISIUE//lZYMUTjklSsEGM9DyEWI= ARC-Authentication-Results: i=2; imf27.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=V66cqa3q; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=wdRMZubt; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf27.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4ATEMcZ4001014; Fri, 29 Nov 2024 15:59:53 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=GqlnCWSxKHsx/u02 Z0MPTPKKtLk4b38Rjn+pXeE+5ic=; b=V66cqa3q9hwNDj2LbPvA4SQWzLcgEJ/I oC9KQvN60mCEvnfnhC3J8DQFVWccBSHvaR0e1doMPeOrX8uICURMRR3wPs+KvEnH 7thFqBfkvGIm5zVyiabEaDyWtlS303A+Yhka8MgBvdCDV2EKXDSz39DMKWNX19fb yvwAZz8PryjRhAPAMFbncbZTpwxHeNtXCRvia6Tw/FAdH3m4D9R62wsnpvIzaQRj 3PEFGmeWhqIm2MecCvchC2AOMccnXzcKnMXoj0NtyZzkMAVoakoY0gSqQlAOEf4r ++tgEo0aCzEqNV/hFcL6Q4l2lxtWLrKzn6QnqqtuSGaPLhNHCjjs8w== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4366xybhrh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Nov 2024 15:59:52 +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 4ATFIjMZ001479; Fri, 29 Nov 2024 15:59:52 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2046.outbound.protection.outlook.com [104.47.66.46]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 436701j48c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Nov 2024 15:59:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FOAwVK+swBGHuwQ3Hvm/M6TcCTo84PryBdpoEhCzvaiBAsX05+lj/EUDbAIlL+TV/sCpfnDXflAQxnqgo3mNZFtUsgF+gv5RHIbwnpVjX8zTrPM3cyOcYHCq0MvtukZkHOtvKOLfha2fzIaiUehETfofVB3AoebeKV6xoFR/cA3koFN3JCcvFjhT7xl+sCASNVpFg02qvd20yxvtBCrUSEs6PKc3KWb5pBmQJVhb0S22vfciEaMKmDOusevVNtN/ZHTEsZzfdtKfNhcus32rg5hihUBQACsjHs2zR70HldN7GpuoO/MUDXbplqeBlx9AfOKhiS6eF/XAeh32dkJwyw== 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=GqlnCWSxKHsx/u02Z0MPTPKKtLk4b38Rjn+pXeE+5ic=; b=OkgtJCy4fPib8j7nVxdFfLlMlT9/NHNurhVga2zUc6MzWHHwPATkat5sfyXawItharyjFt1h+q/eu8mECKGjhlWEiSFGDzqro/Mv6a8UA3jRA44I7s7evWQhiueZ/culzyDcNw+4oBqzuH+FZ6y3gqrSS76sekt73WnLQPM/s1uFMH23jCuv966otvJ5V7i4ls8HvhRFSpV5NEgdiPKRGoNdYOyOsw8B7kXO5JzYqQuodoqYCNiD7Gefxwvj4AFGOFyTt6jrFh8rUtQoAjm8g8vrg7WivTb8E6hUPQxVt03Bsz4F/ycI63jkk5QRNnblI4svx0ydagNgOO9adSsN2A== 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=GqlnCWSxKHsx/u02Z0MPTPKKtLk4b38Rjn+pXeE+5ic=; b=wdRMZubtmTTYy+WZmgfEeiBg3xgvGn9e9ax05V226d4udf3kPIqc2owIuALYnsFtbqsjCDHoEqn4ULORZh0NtzqZ/fL4Ft8T0ZAd4FCOwTDSPZSuOes7tmE04tQNgncD72oRN1m93HV3MKyHZOsXDw0lwU9e7asi5sXZyBiB1ZM= Received: from BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) by DS7PR10MB7299.namprd10.prod.outlook.com (2603:10b6:8:ea::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.14; Fri, 29 Nov 2024 15:59:49 +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 15:59:49 +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 v2] madvise.2: add MADV_GUARD_INSTALL, MADV_GUARD_REMOVE description Date: Fri, 29 Nov 2024 15:59:43 +0000 Message-ID: <20241129155943.85215-1-lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.47.1 X-ClientProxiedBy: LO2P265CA0423.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a0::27) To BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB3366:EE_|DS7PR10MB7299:EE_ X-MS-Office365-Filtering-Correlation-Id: 22cc197a-2774-4f87-81a5-08dd108eda72 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: z3EHSKTfx4HW2jTxpAftGa4ySugG9HontlxKYSo1zUmrGVSzq7viPuxMHs+L98bncpHq04CNc4T+CnECv8szgdl/NJVnvlMIHlMyhkLq0UCLv7WEAQvmLrrEbSK0taUNs7vinzeLLBV55depCD9tLm8lbzCcO5X0yKo538yM0SWfog4/Nl8HBni0kESiZ8DM0Nm5cNkv180+LZqVl52EVlBmzGXfS+86DvNRCIq/C94r36Br/tv0tmAMPtK8bfkUcvF0gm9hbxTopHaglFbdteG1pw+fXTGzuQlG93mRvOZg7FeakNkKZAcYxB8Vo9aX3SAAUxePXfnqeFNKCLeab68iFLEpOPGdx4yGHlxbFKnBpvcLaSuYNDDfOaVqf8m0+9wPYRtVVCFA32x8uZrlcwWfcn2iF831UFxfkZaFBhdGLM35i5b/O6kU+npbX99wPPt7WIT5qXzLKJDHaj3DIfDgx1rK4jC1LSmh2dmQqjn7yijF5RnAlJA1UJu1yx20HApjXmzoGkPnvIas/G3IDtAAkf86jWnZd5ZuwCf/MH4kNUg68AUIvF7IdLBjGYn4n0gHKK7Xw8NLdyhZppkWJaC02/MMSFXRjThMl922ojv65uJ7Ipn2GZ3F/vNhTHVlFrHuEmdXwBkVneJSkgxsyrEN10A6uvVrkWHf462T0bugdwyfPOlBltIt1L1nUTtoxoFli7684Mk/mRHvOj6Pp7oaGPBTAkgwxxdngVhqWPXsgu+uCdPVOLOOw2Cf5XejacY2cBcONzmZvQ+Vg5G3wpFH8vJKt56CmQKTSGwGzI44BCFwMOKc1a75xkLktMf1j75QZqgvIJ7l542hgFn2uk9QfkiDKZOljZ7cCMxjvBUYVpV8VPkyJ709YClcDaiarwkapkdbwi/6lFkZ06lYq8P+YECvvNMoXrxYiLYTemGGta+06UMiv4ZF43JJt6A8iU+NhbYrzd5EWRgDlrJNToD0ghDoaXywp3mYuBfpgu1pVH3vHo+3xeVnFi1DAFKYHKOiGl2iUl4WAmV5ULMrK15ZsaXAn+2g/+fcJzmwx4BHGi9as/SmRE52diFjFGrvPT7ImgP+gGGmN3UKk/K7b8/e+/+hxORhpqqPFkKKWQJpYmvcJsaCGkIuO63f3nfPBxkwj74Nnd334kDvkYXNL+Bmvu/ZGEBakEuzlRoaSGgex5O5ZsuJTS8y9/Mqe816B4ioJFn5j1FOayEdL7Q6jO4eFgJOpfAkMDIkIEqc1vdwhuynUVbLjRlF99X3umMAbS8eVLTBftIe1dpM0YSxMMlcePUwYTAv2Ku6qQ/S1pKwn8Rk7hz33khfoVzEXzWgns94qaL/jSL+7GBgPUF/EtLuV7s7YBTSIzvCtpp2+eo= 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)(1800799024)(366016)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4DSdsvUfMTGah70yqWTvqaQmg9Wiy3RkhqunjF9MG4LsWTifvHgLLvmOMDLF5hvqrbwDbDbwqUu8ueFi1TRYXXDJFAfJjPmBMLKYy1TiVr+FrosOJjOMRgyyGQQ4ayqXj0ExKW5NTGHIZy8Gb/hNXWsgdUG4zDPIl9cMnHh7Pa55b5NnvzM1yftMgaq1irwO3q9pmAEo5a3l4j4HIxl9qOKBvfQYMv3a6CUI0AG8z/Tp5PidTo0KluLbfqqXjwU+7fe0jGeFh3smAV930GaxSQV+SGNKFmVoPWld9rij2y/rK756Ggr8PaxJ9sI9r7l2MdclpG6/Hw7myQbmjLKijoPLL1stLsxPkcpoUKrxoJFR4oYO1QyytlikElj1tjvT3BxFIztpNVjx+3dsqh5G2h9Q4I5w4S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hvRv9EYJ613ZIhilasmGgLjxSadNKPNgRxJuojRRUQEgR18HRKM20MPSorkr5G0M+yWgBPNVfMfYEXzbNv3A1Cn11TCOVnkw5TWMqOAWg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: eukvyOl8RbcfIENFADbfPuiabSeRFtUFZhnzSplrGG+g1Qdmt76pTd1vVcK1cwvwDpT4rlXNzgYIU9Z02MLx2xxal8pMfSvXDtx2DXXU3GN4W15wae6F9BaNa2WXtJwdKNokifVsFajQsrJ5Gs82rcuQ/mqu48TPpWK2zKeFv5/xDnOTFppFh4wgp7XbIVhERFCJh2PKasKi13DTyHB/BiQXFV8Mo9SwQFG7YbO/HAvYx6xlNq8fRJyEL2JeisAarT71KUnelx8wUn5dn0AK2cBxVeShaP2LU6zjpQJEuPinkOsAnRV8rqsGrs/R9b6wIcoyB9grIQ2Tmw51kcHRm0kd2y0dPsuc5NxqNOL+Oio0sDgaH/loVPkjYgg2H3V1XND/bpl4Wpn2+Q84MEpJ4hwbyuxEYcPpPCwcOgfLowhZhWRh94oSJ0M7Gzvmc3kRu/BD1qP0zEpS4Cs/UVJSlFrSrIX9UdsDE2ukzmhoDLzrAqDLwheiZ+NE8Sqqo12X8vhGNZfWMEml9pBNLh/e6sUFvAyF0IDKPQMyQtfccYIZ2j9b24DN4IZTh4TNpA2QUVQLNwM4vz3KK7JzLgl0KLIOvKWVDSnJAiNFsS8B08w= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22cc197a-2774-4f87-81a5-08dd108eda72 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3366.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 15:59:49.5364 (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: RONrJhpx0DybKiIBBbwuqkkHAbCG/0kLcX7Tord7kmYdf9rd+/AAO/NJ/eU9b/VxudTRZoDG+BiM87+bKoxsCdk2yeDYeQAtmpAdh0TgNBc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB7299 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_14,2024-11-28_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2411290130 X-Proofpoint-ORIG-GUID: 72M491ddZY4OzlVobVDShmhQ9fRtml_p X-Proofpoint-GUID: 72M491ddZY4OzlVobVDShmhQ9fRtml_p X-Rspamd-Queue-Id: C53B74001A X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: 63enpo7fuqwdnnc9k1yatrwdic1t8pzu X-HE-Tag: 1732895995-801545 X-HE-Meta: U2FsdGVkX19M5SsdzdyVcCL+K2OkaJb5CJ2gs6FpOo5DE0UmmXIdzCn+zebqajAcEaiIeWfoXjP8MxbcFKiEzVduzqv3dj1nobRe5PsQ5PlVNfFvT2kJ4PNLv8KEUOLjfF1grpeuB76PyS4VGXmP01uWHg518seglaptkfbJGmtSZzFViq4U+VNXWoE9hNmcbUbEXhz5PpB2cie6zLUGJiGJOmul+i5y2qVBLz/CnC8mC5wzPG9+ujzmwQBV3gUX1nfwpdEsmGknSHXti/WNkXfkoGAwtZe59K4kCgTA2SaQPI6uJaNX4eU9GM+eazB2LY1gYKbWJJYUsTe5CRjmj7GgU0A4JMBH7/YrBmXjijq8RLobG0vuwBLXsHfYP9+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RnBqp4U85Vyt/4bzNT7XVcDfiUf8fqZbUzl8gmjSoTRiznmpFnD9d81cwVjpaodYNR0tteGxLQrpbzYwL1mWd6aanKq8GfHxNHDFdR3sek55/0HsepExJMKBm2n/XUX9pR1uhF4Is/zEP0drmeIPG3m4suSCPFiAcbJ4+vKasGx4m8wVSEU= 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 --- v2: * Updated to use semantic newlines as suggested by Alejandro. * Avoided emboldening parens as suggested by Alejandro. * One very minor grammatical fix. 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 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 +.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 )