Message ID | a6377ec470b14c0539b4600cf8fa24bf2e4858ae.1732804776.git.lorenzo.stoakes@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 5F5E2D69114 for <linux-mm@archiver.kernel.org>; Thu, 28 Nov 2024 15:06:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E8E5B6B0092; Thu, 28 Nov 2024 10:06:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E1D676B0095; Thu, 28 Nov 2024 10:06:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BEF176B0093; Thu, 28 Nov 2024 10:06:49 -0500 (EST) 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 9AD296B008C for <linux-mm@kvack.org>; Thu, 28 Nov 2024 10:06:49 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3FA13160200 for <linux-mm@kvack.org>; Thu, 28 Nov 2024 15:06:49 +0000 (UTC) X-FDA: 82835830728.22.0800D11 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf21.hostedemail.com (Postfix) with ESMTP id 520281C0012 for <linux-mm@kvack.org>; Thu, 28 Nov 2024 15:06:32 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=L8ERYzde; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KUnt5r36; spf=pass (imf21.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=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=1732806401; 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=GqmS80LtTq4glj/r0JufhatLwW4dPy91kyJOpOlImGg=; b=oFrztLE5GGC310XizMbaA0xGSE9orObJgg3yqKnsWBNeGDp9GJUfNvQME02Qay2/v2XOI8 qKFfTOPXH6Lxa7gHZrINarRxQvpR9eboLvDL481jR9lnQkWQZCDIhkGDHN7yHoRJQ3t9xo 6cDtkgiDsejS8SHzWVARMXAWupvdIc0= ARC-Authentication-Results: i=2; imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=L8ERYzde; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=KUnt5r36; spf=pass (imf21.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=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1732806401; a=rsa-sha256; cv=pass; b=ZucnvA1bcmtkVonKraLbSoBy3rb3vJ96m3FUnWI/Qx74upX1h9nQhpQ3jQA9JYOnXt3+aF 3CPNXr2Q519low7yzt4hT8lvuG6Qr4FOasANjh552L6+J7t7my48EydAxAvsEpsgfh35HW Gu0ZC7STszpdmaUws0vXlS2hC4rEQKU= 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 4ASEM3dP006799; Thu, 28 Nov 2024 15:06:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=GqmS80LtTq4glj/r0JufhatLwW4dPy91kyJOpOlImGg=; b= L8ERYzdeEqLrsN0d9TA2K+9U1dqA7HeooXTfyGJQYWBtkUm2cSEmgMBpR2d4inA0 PhA+S8fDRDOJwxkNpgrPgdgUY+BZd/4SpZm7bZLWQlTh/0W8fBQJAH9W1ca3busr x/4DIX2u4872CAORx2ts3fJvgvFX98MZmVTwLewP7cpDxtGC6Dov6uuwWuqu37LG THvyq2BVo7wYLqr0hwvnRZie+IA5UPsn2FsrfaAZYLl/DwjvM3ITIQ2YvEoLn67Y 2v/bXGqXpTBjkqtgi/j/0K3VAr6p82duaJO7peMG+q6xStrBEtcTMzrG26cd1G3t iyl0pGiqmc+juaLP5ZZdbg== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4366xya162-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Nov 2024 15:06:35 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4ASCaKw1014352; Thu, 28 Nov 2024 15:06:34 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2045.outbound.protection.outlook.com [104.47.74.45]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 4366yyqb05-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Nov 2024 15:06:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RgeL/zzze026byi7Ql2Jc81R93ODPZiQCM3XxrlMDG2JfO4r87vhfcZOj0d+VZ7MvWtC60V1Yp07JTUlKzX5xpYi+pK2jbw6JC4FN8kztXSh3+i5RxZ6dF3SluehZX38DKuc97DTk4fJYu4rfIaSuE8B8qe1pTR1HpEZrDJljowTZ3KlnYwCc4xC4y6B/e8HZG+mRaizJAQXyvm9SqWbegm3Ljmyy2L6k6nzkr5TGB1oit3HgGJZHAd5hxdu1SufV0st5c/bHC82uLesaQTYKCrNH0UQ1czfgU6tebly0lKPyOeqBSczkf/ccRnfQ1Ey7KHCnZWl0hldyAaDCfZ7ow== 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=GqmS80LtTq4glj/r0JufhatLwW4dPy91kyJOpOlImGg=; b=kDko3InPnLasq0rPbfQfrIgnNLhwVCddBGom5YWXpd4ZXA1J5tD5d+TCqxkcu9UtM0kZFyfAek57lNCoC5EBq8XLeQutrrMWtvXBeC3JPV7a21HaOSpeW2g+q5yEn4wSuncfUih1z2ud0R3fp7ObUXsYewEhW6ekEV5+LrGjMTAR2VfBXhRcpCZeB6to1nvKmhk1dgcW8zD6baIHA1L6GEWxVshLMJZ9Zd235TtxxtzIVWLzdsxBU9fp7DUDY7L454CrOo22GPfbWnhyFVmNBwfuMDCIYpA7cPuesusrDWHQDdFZRCDlMI3refSrs9eCqJLG6o8MQr5i/Gv7IeYxzQ== 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=GqmS80LtTq4glj/r0JufhatLwW4dPy91kyJOpOlImGg=; b=KUnt5r36ULVkeZpPT4ELd+UVjBKOr+uzbEeTyJll25Tw0HNNpZfR9IuHSAWI0/hidX/xRXwOb5GTJgfzt1aDVfsFsGrd8M+mkTHoODsT4l1Geok18J7qHuRRQpZvS11mQCM6ZwoWmcfGsAcj59SJ53Ow+jupsa3EN/nUWoXxfB4= Received: from BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) by CH3PR10MB7958.namprd10.prod.outlook.com (2603:10b6:610:1c9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.14; Thu, 28 Nov 2024 15:06:31 +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; Thu, 28 Nov 2024 15:06:31 +0000 From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: "Liam R . Howlett" <Liam.Howlett@oracle.com>, Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>, Shuah Khan <shuah@kernel.org>, Julian Orth <ju.orth@gmail.com>, Linus Torvalds <torvalds@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] selftests/memfd: add test for mapping write-sealed memfd read-only Date: Thu, 28 Nov 2024 15:06:18 +0000 Message-ID: <a6377ec470b14c0539b4600cf8fa24bf2e4858ae.1732804776.git.lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <cover.1732804776.git.lorenzo.stoakes@oracle.com> References: <cover.1732804776.git.lorenzo.stoakes@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P123CA0455.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1aa::10) To BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB3366:EE_|CH3PR10MB7958:EE_ X-MS-Office365-Filtering-Correlation-Id: 0bce3790-9d90-433c-405a-08dd0fbe3e13 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: iPxt8gzAGiobHLjsilAd0QyuzF4lGPHuRPEIZxBXUUv0xzVg3CLAW7lhnL2SfV7bMHdigYcVpMBBIoQ0+2foNmHmLtX5y5RwJCC4kdghCjKFVkvje9O0no128dJHBxxJOfROTrKEzdxu8uwgtn//sXK4rNAkujsIbbGvAt0r/IepsyF6jH2FxrWDe78WI+CblUASI4/ntgvB0kb74ESn+X89bOwRO4DKY6t5jEft4BSVFWqMuvJclLvEjDT2ye4bl3QwtRR+6maZKCQgaP6bpII+m+xLSAdGma/wTh5GdgD8NZGsT5gluL0f/62qccOYikNoytD7C9PhqQ3C6tDmDVa8y4ah8Ku0/Tv8ucMPz7KZGpEMWl5jF5okXSlFEYYP97vcZFqzh6JqM1PywYqeaMg68RsZwSbY+b0yMzNnqKEuF4J0QmL3XrwopXuebxsmmLs7ZVwXq7zoafdMj2zt4QmCXUbsVrxM57fYCp3wKmFpiv7hRYi5YiKudFuf7S6mocBnAyPGSzdx/i4kj1khxgxXIfnzjs2kY0Bz1vNn0st91pC1IVtJ9mE4eb2mzm7zfVTKjxZHd7oHCHw/HDnkfylh80vj5sxjr0c9jdbxLurxAi1BQsLRIglG0IBibuX4a4aflLiRciRe4J7djf0CdUwGOtGUJiaNbZOkyGccRZ6g31tdJEW+WfAtZFyDe2SGPeqPgQ6K9x+z1Q+kGHpzWNcXXoyEbe87cgroIvGwaPsBEBJUbWtdtS11gxey/XPTn9pHLloUR6iD8wFmBezy/651mC96k43M47/kVQ1/gc0GkmDFf+Lp5+snKOzyG7EynOeLCaRXhyvep1KZc9PX/u2rBQX7sIO/N9ABP1rcpPMu6MdExCdg8pBciqB6Ni7t/k3c9S/Cizk6p8MhFOYL2AQLLEnLr0u00C1RW0tqmNtIcYUfIcJvNs/wcYJzS5mCm9DlFmMiQNulfDXj7g4r5C9ZEHtQGtnDXm9NIL01RX9TrWJz6SR/+pUo6/dni5NIFtJyRjiBBhqeHo2pADopUaXfmWCYukQEw6sgcgSpAgcKjtd2Ccjq4c9RVQA/bQKEX7NMUzBz34bhpxf7PM6PYUCGlSBLI8xJAGGitctbpsmzHPe5MV6J2l3Dp/yZqhqHkJso1FhP45LQQdYEwdU3B0A2NdEXFqyeCtTXA9Hkk5mq2oC6nDjdDAme3g9RqN7bc0WS+Sw9p2Q1GYK2RZpMeQIybVjiExkvl2viWgfcOQumuxGco4NOEbKSp3cqmtUdpbl3Xm9ghK/FpQdwbsQJkJxVb9VIAfHlxfoRusvWDqUA5FdH3ag14pyyICkZqC2GrMzau7LkhNqeHZrcanInHQ== 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)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UNXxirz0u3XP2KKeQt30BptzcbGBeQ+6i9GYWi7opNsCns9lfihj3iQ8GGOUlu2cEaZGz6MsjY5dp8/V3DsQieLtim2T8qyEM1hCH1ndbIfHLTO18g5zimlT+eweIcRFIHTeJ814RJ11kiAL2uL+Gad1I08pVnfM8paOj1Ik03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phf6ApQI1JZ6syEB2/7lO5rw8MHpkJzuAWkZICKk9dZ0lHW2z15kr5HeeN2FW/v9UKe6EWVYlxnqhOAGqaooE56dn2StS1Haz5ElMjEQ2kuAdQTPbCA1raZnQMKuQCj62NKVtgRWud2+T9FpVNW/hw+KvMgPvd8Kk99MkNabOWfUDZURagaHShHSuNbVSPToyqioPul2Ca26A/0lAicIl2o12j5UxN62LQSfYZuqsvZdU5a1QB9aKqI8MzQyHmSPrzvOOi35VP8AETmadA17I/cwplDGWsa7qoHdajBRZuvhmHckdAX7NtsUq6avhQv68duf63mtUugSmmXfeq5POAuPvcou+VCMUqVdfV9Ex/XFmxK/HhE/22Or4xTA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: cm1TJ4yaPlooZUDlEKU792ytBoKPvqNGLSahuINg4NWs6L0Tno9yfQ1ojkFO5qbl+/ut4Yx06ABCH9PkR5oNQQN9omj1NuQJHBMy5epeOOLZjXqvkK2GUk9jmvOWrOdC0N9ACO8SneXZfYXDpVQ31eB1j7SK2DdcQDbSEOBFr+rpbwwEelIXblTxv+czbIaHeLfPSBOAG/ouYi6a81WxYqjJFqRuNjHzTtxriArqJBL4pYKvKeu+lsblDHLlxDsn8Ygvz14YE2EmnUEFDtglm3lWmnqTm/miq09pxW53wv4WiXEUUxYpGKAPRs6Z8zSkMxHKlSqXDxkfd2b29ZeMj2h28cTiQwpy3KGORTi0U6537eh/+b5jkJueppzqCaAsiIOb7A7/pomwL5O3dffWGK/9cTMXjOQ72UP+sKD71xH2F4mqYnPeNShqH0Mp8bMWBBz9evsQqEOEBSOTVr1BTPybl/qTk7Lk97tGCBi1aF6CedyrRtWrGbxGRP1ITJVZsyQz88A75EO7Zu/bFMCCuzTPqEffK58mUTKiHuIhZGScuiUibyrg/WIvTmliA+LPAnJxbBO4CNoA5WTlEogQoLBX1JjanTra4DDJEkEmVKA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0bce3790-9d90-433c-405a-08dd0fbe3e13 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3366.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2024 15:06:31.7141 (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: X9pdsK+AU9zT4NeCTdxkLDpP1dPfNEFEAVyX2r0pPS2tL6It21iezs3pyPfdPrvTGck1hs13UR0vNWhLipqBkfU/90hD4aOVz8tKv62pooI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7958 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-28_13,2024-11-28_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 suspectscore=0 spamscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2411280118 X-Proofpoint-GUID: U7vXqVuU5gvZvMtBV-plRLKHIawJiz4S X-Proofpoint-ORIG-GUID: U7vXqVuU5gvZvMtBV-plRLKHIawJiz4S X-Rspamd-Server: rspam05 X-Stat-Signature: 977ckmhg4i6skfhq8x6c8ketnqym967e X-Rspamd-Queue-Id: 520281C0012 X-Rspam-User: X-HE-Tag: 1732806392-339136 X-HE-Meta: U2FsdGVkX1+0gVXuMt8hVuTtG9nDS5T5GYPChR8fzlxPFVffqPuDGUq8P0QVOK2VRdzFtO9vqlVikA8rG6m36M76OkdRYG4gGb7U8yQkL086/UNqnobxAxKpj+muCgNT8u2SGIc0m4h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nisab674XX6WMdtRB6k0tcWo8TjRHcUV5iMWHyuQ9+o7KwBMsNOOpy5y3l4MxfQbaESisMdAri3cPRzTequn6LYlLoEdcNPg6Ip6g1EbkQNGZG92xI4sj5Q6UPW2wDbyppITgwi1U5Xk0oN4TnrhKLIbT3a/UV6PpGkZWZoHIV0TDC9dzJ/+F2dIWqDBaAZ2tOpicsdvA87kWArihchoIrSTy+fz/sXcI6QNXZ6MMWw8DICWWJUUpbrhbGGodBbp6lN/+lkBCpUjit1qOlfrkbhlXCR4lIVAeE2Tz09Mh/fbOrFWP/kSKVm1yg0Iq5GUWzlEzSwF1grSz61HaVSg8Rw/P+3xr4NJHNKq7+V1EaRHEqvqRslnBWHN/nFS5RkgXTuv/S3bGAUS431c3WeOgUKWi81uOsUwHyM+o+ 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 |
mm: reinstate ability to map write-sealed memfd mappings read-only
|
expand
|
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c index 95af2d78fd31..46027c889e74 100644 --- a/tools/testing/selftests/memfd/memfd_test.c +++ b/tools/testing/selftests/memfd/memfd_test.c @@ -281,6 +281,24 @@ static void *mfd_assert_mmap_shared(int fd) return p; } +static void *mfd_assert_mmap_read_shared(int fd) +{ + void *p; + + p = mmap(NULL, + mfd_def_size, + PROT_READ, + MAP_SHARED, + fd, + 0); + if (p == MAP_FAILED) { + printf("mmap() failed: %m\n"); + abort(); + } + + return p; +} + static void *mfd_assert_mmap_private(int fd) { void *p; @@ -979,6 +997,30 @@ static void test_seal_future_write(void) close(fd); } +static void test_seal_write_map_read_shared(void) +{ + int fd; + void *p; + + printf("%s SEAL-WRITE-MAP-READ\n", memfd_str); + + fd = mfd_assert_new("kern_memfd_seal_write_map_read", + mfd_def_size, + MFD_CLOEXEC | MFD_ALLOW_SEALING); + + mfd_assert_add_seals(fd, F_SEAL_WRITE); + mfd_assert_has_seals(fd, F_SEAL_WRITE); + + p = mfd_assert_mmap_read_shared(fd); + + mfd_assert_read(fd); + mfd_assert_read_shared(fd); + mfd_fail_write(fd); + + munmap(p, mfd_def_size); + close(fd); +} + /* * Test SEAL_SHRINK * Test whether SEAL_SHRINK actually prevents shrinking @@ -1587,6 +1629,7 @@ int main(int argc, char **argv) test_seal_write(); test_seal_future_write(); + test_seal_write_map_read_shared(); test_seal_shrink(); test_seal_grow(); test_seal_resize();
Now we have reinstated the ability to map F_SEAL_WRITE mappings read-only, assert that we are able to do this in a test to ensure that we do not regress this again. Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> --- tools/testing/selftests/memfd/memfd_test.c | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+)