From patchwork Thu Nov 28 15:06:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13888109 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 F1575D69114 for ; Thu, 28 Nov 2024 15:06:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6249A6B0088; Thu, 28 Nov 2024 10:06:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5AD046B0089; Thu, 28 Nov 2024 10:06:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D9586B008C; Thu, 28 Nov 2024 10:06:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1AC156B0088 for ; Thu, 28 Nov 2024 10:06:37 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 97F21AD82E for ; Thu, 28 Nov 2024 15:06:36 +0000 (UTC) X-FDA: 82835830056.03.41AA4CC Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf10.hostedemail.com (Postfix) with ESMTP id 55472C001D for ; Thu, 28 Nov 2024 15:06:30 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=C3+mEOjy; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=i3P7zyPb; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf10.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=1732806390; 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=n3CwzOcaWdaAxTdwyl2JG+yATq1+pcWBHJHBSmhu9gw=; b=Ji7VLqD0nkGhe8iVNa27FuMQT+CfNJGNd8YNjIOA4zLrpw/uIZzgpo/0oOEF9Ao9zXXbTT WIDEIWoyNS+Hs3bQjEjYkhYCkvY2j9GgfeMeM7FaJmm8GoXljA5oZVIrRva4f1lVeR1Y2A +qrCoxgse4rRe447O1KZZMKLsZlkRXc= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1732806390; a=rsa-sha256; cv=pass; b=x9FoOGRuG48k2rsUxu1e1B/nswUXIsUNsP1U8S5YTBHAqnZk3R9kLlfkB72aC3JJXi1xus qc0ouCfINsxHdMpO3X6EHTprXvAbz5WL7URg+p6NtI6byzqfI5/JnhVPe1QAr8POpJcFO2 KpWgqX7QWiVAq9dFzhfL4IUqbeYLBRo= ARC-Authentication-Results: i=2; imf10.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=C3+mEOjy; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=i3P7zyPb; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf10.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") 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 4ASEJLsT008736; Thu, 28 Nov 2024 15:06:28 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=n3CwzOcaWdaAxTdw yl2JG+yATq1+pcWBHJHBSmhu9gw=; b=C3+mEOjysYRSvKJgRI4w9joy4F9hmmcT F99n4l7Uid9lsNbYOsKvkeuARXIBSrIy+jz5DC83KK2B2X0U3KUZVHAWGdMSJ9ER inTPmYkBoO18As71jCahjAEgbJTAMpKIYSWNnjJSbfSs/eHFSve3+gjoFUdlJ1Qr yvld0itZC48BoatgepS0YYPuryGZEmu2qwU67of2QswI5Qy/UfahpDeOz46fNhbD LvckyrZwlmAyk4T9k8hDhRCjECJwjHiJlT68iBiVa3GSTUZEFrozb/GGwaiS4Fzz rp5KNGxIBVhTFoC++s8knV+xb8Oo2gJuBmNVOraErgX8tsAzyKGakw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4366xy9yf5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Nov 2024 15:06:28 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4ASDGemm039701; Thu, 28 Nov 2024 15:06:27 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2047.outbound.protection.outlook.com [104.47.73.47]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 4367067ram-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Nov 2024 15:06:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AmrJDlpWifO4kXKGxWEK2Z9SKyVeY/niMMPDInntfV+ObiX+sWw3VeXHvU4dwzKF+5jxKcXWEQh/cgoDF4tGHJD2VjeBmOWb2J7ZH7I5BTONqVc+NbWEPmHVAnfKIDR5mEeRysdE5HwAboVGWl8ZplAcm0DXiaZPMm101UdZ1948WrcrcvtiB/ZbPzZ4CLefzchtIafsoYK+LTvhnAgUMXCCVRsc6Ykx9AXjl9tjsVkUUocBLuoHUnTA+7W8BrxHZeM1Zj+Hk4lJC6fv4IrxQ3rxhXnmugT402ZzGhWVdoHgYPpqXKQD0P8b/AAqTx4XgvxTPlXtKm/5Z7rt7bPzmA== 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=n3CwzOcaWdaAxTdwyl2JG+yATq1+pcWBHJHBSmhu9gw=; b=Cmzt0l4tk2DB3X3zAQ0lQdbiB6W1oKem9KrDiGB57K97CkIY6iWqTZ2x9Sf/xjhLlbgM29b18ap0aQjKyO8ITc0xvxzjDkjulTb6XOky+qn7wm9EeXIe4HoHG0LD5Eadbk+u8tLzb4N6eu/Pwhs71Q7lZcCYcOy0Wg2tbSDXEFzxrzkY5mPmLn6/VLIaoM4R9CtAVWyfiSi9yQ/lHf/JjF66v0SZe/nxmnU3Ynm7U8WM5Mf/kQ5ILqyrLZRMUKx/kU9ZPLwX+cqNWCPkHk4wnKqSwl6g1oklIVq/rp1nIVaSLLm/In4q7xpzf1MK8JEKLiucLNaSxWh3Sw5XCPg8OQ== 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=n3CwzOcaWdaAxTdwyl2JG+yATq1+pcWBHJHBSmhu9gw=; b=i3P7zyPbwjDWyOpEcDjFAtSZYtDA5F5f3UqNWUC+AiezLga2YInKt4NlMWbT1k7OBe61aUoaOKPz5OaWnKhlj8mrRfPfwNsga/lgMYzUrA561xT1RgPsArtV5HDldF+tfqLJxrUu+5oGz4gGY0WN6rgFhtgb7u+IPXDVPWqtvZY= 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:25 +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:24 +0000 From: Lorenzo Stoakes To: Andrew Morton Cc: "Liam R . Howlett" , Vlastimil Babka , Jann Horn , Shuah Khan , Julian Orth , Linus Torvalds , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] mm: reinstate ability to map write-sealed memfd mappings read-only Date: Thu, 28 Nov 2024 15:06:16 +0000 Message-ID: X-Mailer: git-send-email 2.47.0 X-ClientProxiedBy: LO2P265CA0023.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:62::35) 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: d0879540-c0a8-4852-676a-08dd0fbe3a01 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: WHLsYwVflgGj2NuwXVGKvlQTrnSASR1g3m8fOJ7/1VQrgFKgPRItciEVoYC75HzkTd49BJkvJcXXbBL+dtalzAx7NZJEYbfkel8hH57rksAIzQMCFNJZNBzUz93RNcdzjx/QCyBTV2JfPdn0YPgR8yD0kVOqM/J6LJg4KObOvZ0qDvXVDJ+IkAU1mLjlf0wuBP1H2xZEpkPptEjePXaDI2U4avZyK5fsqZM30BYvcyg8modstu8ozd6zO844JtcIcKXwFkIMXCHyzOcEXHqb7p3oZhXMvSbrZMVnKXuarS8ou6sTP/1aIzjg2zZc/pPw+7MBhHFF7gM2AWRod/RZanT/cRetLN5+qs3/08E13Tn2zTghXeWXgUN/EC/mSIOkt0mqj0p6kmkKkbfvHCbfiOU6fwfYw01pscgpTOI2zupEC5r7RoMFj3WDqVy8j1Zdaz/ZcPeWGCYKQagXe85HEpYHPso2egr3eeZZDWKWiqEB70wbYvJJHBtfru0+Ps/8gId0hmJVZf4kkNPwfQk1lnAyBefDENkMPseADMF9UAfocGPfREk4Iurp6rZHNfie0J7GO6LT18GJQAruqaenc4xpEpjdDChENCtf4u5elPZcm0QRT5die3X4M+b6KQYSPJ8mYv5XYi/oB3/bu6WEqtwjQ6LSnpJKSNgnrtjtrJXqw9kSFiXF6TauUrltuv1mWC2y5VHE1h9kcRHB5hJaNKHiG4Tj8OGCXF0ji29gmI2eke/FnyxCSYeutgBkiDJ5vTrBuVTBs5JSEZ0xKCRoq0R22jF/rTBvtmwxqDUmU5bR6vl0/dRmk7EvGfZlJ36mhIJXFLt3lAZs62Bz/w/eIdCTpuHWHKeAsH7e6KPgo7DlzQiowD3/cUGe9yro8UswqdgoOqjyI1ddtsIyiYBzTdMqF+XdCnLm9AtvgHS/4WNHuVD69rpVsXkA3Fm1Oj1Le54sBdQk52QotQ434ykAdDhPccyuT0liVWYmGMD/jlcJUGnTdJ7+u3sleyU63ePnInG39YIkzAOrNgR3334syOfCvZUaEqmfiWnlFPWhS5ngFVtcIzuAhzvjn16pZXJFgm/ROkOXTK2+BHR/k9oyZUyygAMQB3rDr5qnxMoCZlcfffwM5E1B/54lXxew1lQ2QYHF8mjqGVT+juNiIe/cCjvzfuZfuSjXDwh76j0VTX/bUILfViAp0E5/ZQUX2Tt4nWxdo3A2wd091LGHZhmLBunKtEFjkWnkQSc1ye4Qzdd+x7qzobir6PZJ5PSqR/dUv2qKdKY16/IqqmF7m1bvqaOt0Wk/DZ6zLHNcxFsDACF1kJAHsT2lTreA24AgV8L8pj0oYOyUpWl46qKuD0okEg== 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: Rg/EL3eUo+xXQ917TJbnMUlEbyWLLbxhqNW+x0QaqTD5GReKDBO55D+I5qCb7lct9ODPwyf0JKrYB2Ds6lVVFvlkOkNjNA7+6gMyPYlReNAs+I2KbFI/JX9GFjV+k7ORDeaFd9hQpSdzUmEjhlMBYkY7y7pFIEWxDz4sPmvMUqzSzycWysk7nuidVhakyKiC3JqmJd6uTH9naau7sFjAB56gZ4ulyrbFgk7GfAOtbjLzXWjdCIhSn2biEx87x46MFBGCRwsAaxuCUyWf71w5TObOasbiespXiWIZx2BBDhvM7ppDS/H9W/vcz5wqizyIP8ecdGGDn88PbtKMB6lO77DZkyZQMYJwt7tVJXKhPAW6u8l8t7sLDw2653B5E1exnyXpTX86kC862LAL8vv/znY1HTTv3HBTBRx8MBENIbw+PG8uRJZ7/rVlr1VA83P6VlDr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5imLYDNcDbIQXLqXCH/mdP6sbkZXa51EdokfidQtFFuKka3okV8s0jjirLLhr2kUmQhiP+45o/xwUZg7IeBYRfpg/YNQMTg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: kfIqtbIqIrMLrVH225zzv5st5uYo7KO8dzRXCSeLh6rxwahfJe7jP14Mo+QzMbRhGvfw7g+LVB5SAPp5xX5PPOzvGDT5aAksqljH5/Iw/Eon9CXLDQLZFAhoPL12mLpyikT1EuWRIwMyGhd4BX3583MWatwUnA21zzm50Xj7Kl9tbVidistjg20GBYiZLAnakNXmHKoFhpoVj95zUa2AWFq5dp/Al6Bn0lpmUgCYcc+/9woJJEN2E+UydX9qVknx891pjEA7aZfOYF+S2owCQEQKl8msHefc0eXiDQ44tK/LAGNDOIcVwTaNqTmrNBcDcfx50Uwl2ch//KHa7UEKLzvSvLXE7MNlfGXWljYYMw2BH1jGdDO85eP0n3WZeuJgCH4ESauJX062u7YvV1nWqN3sYfz7iQZeOHrL6/4xEJzYejEfOcluemPfCUsxHu84MRnVELpnMv/PY2GF8pKYHvAd7CZSFGFQhwdmkjHlhZVEHkXRaLDFd1G2tBxds2yEZb4/1gFLRvfC8WMRyyyOuinwIeuuSQ5HlSghg/UvOd23m5EHOJ+3OBgWynAgIGuCCzEbIQV1U8FwTq6YZul+y80rWKiT5WgZ+ppKVZFSiaQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0879540-c0a8-4852-676a-08dd0fbe3a01 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:24.8891 (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: vAR4Uclpt75O5jA0748WwEVil46zSKv/tJRXKpMYSjHrFFU2tXFf79kYCSSNMHl9mtQqycoMPaoYt47LX5iRnJM5Yn9jtqYV9kcg3B6iSWo= 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 phishscore=0 malwarescore=0 adultscore=0 bulkscore=0 mlxlogscore=875 spamscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2411280118 X-Proofpoint-GUID: 9kkU83-Xnp7MJbgmFHTCHopek2miygEv X-Proofpoint-ORIG-GUID: 9kkU83-Xnp7MJbgmFHTCHopek2miygEv X-Stat-Signature: gc8x1sysyjgbinmprazxqtakus18rmg8 X-Rspamd-Queue-Id: 55472C001D X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1732806390-25225 X-HE-Meta: U2FsdGVkX1/6LxujPf5tnlhGQr+s5Od2Q5TnnB+h9dywjZdD3BgYVJRMv/IuO20wSs2zSYDd0c4Tv4Lqjh6A9lY8mejmBd53pel2sqrCZPG92FJOzkyBXsHU1/18PNLqpK1OpiPEGBRNC/Zp5y4BvHHATfNry84m7Jh9+0Nc25hA4RwPblicMplP5urpMbfw5/OHDQw68xEynof5WLw2XYyJlppyACkCXimyNsfah/6dJuZb5xTWMflVzt9QZvec0IR4QeSmDFjlPpQpSnN7dr2cwinjJLAj0X8oP5LbiUkKpYeGlSZfaLxTUb+zHouQ59GYJLKLl7o1nTs6q91R6OCT9k6jWt0c7UKpP+AnY6hfI2inicyUsxZQWeueSWHsZn0pCdE/rmNFY44cGgSK1TJaBiQHcJ6Fos4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6Q96CjHLzhFMOt3sBpWVXDTgM2UDq6MYLsGh1r0plMHw5/c6e+Z/vsVNO05DeEvsejUWQ8r/ayMehdn4dQEe3Jhfyd12yG2qXSJvJi6jAoylRG9pNTb8Ch5ma4= 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: In commit 158978945f31 ("mm: perform the mapping_map_writable() check after call_mmap()") (and preceding changes in the same series) it became possible to mmap() F_SEAL_WRITE sealed memfd mappings read-only. Commit 5de195060b2e ("mm: resolve faulty mmap_region() error path behaviour") unintentionally undid this logic by moving the mapping_map_writable() check before the shmem_mmap() hook is invoked, thereby regressing this change. This series reworks how we both permit write-sealed mappings being mapped read-only and disallow mprotect() from undoing the write-seal, fixing this regression. We also add a regression test to ensure that we do not accidentally regress this in future. Thanks to Julian Orth for reporting this regression. Note that this will require stable backports to 6.6.y and 6.12.y, I will send these manually when this lands upstream. Lorenzo Stoakes (2): mm: reinstate ability to map write-sealed memfd mappings read-only selftests/memfd: add test for mapping write-sealed memfd read-only include/linux/memfd.h | 14 ++++++ include/linux/mm.h | 58 +++++++++++++++------- mm/memfd.c | 2 +- mm/mmap.c | 4 ++ tools/testing/selftests/memfd/memfd_test.c | 43 ++++++++++++++++ 5 files changed, 102 insertions(+), 19 deletions(-) --- 2.47.0