From patchwork Mon Jan 13 23:15:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13938223 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 4F570C02180 for ; Mon, 13 Jan 2025 23:16:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D10146B0085; Mon, 13 Jan 2025 18:16:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CBA196B0089; Mon, 13 Jan 2025 18:16:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0CA46B008A; Mon, 13 Jan 2025 18:16:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 93F376B0085 for ; Mon, 13 Jan 2025 18:16:34 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 4BD40120459 for ; Mon, 13 Jan 2025 23:16:34 +0000 (UTC) X-FDA: 83003989908.24.58823FE Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf20.hostedemail.com (Postfix) with ESMTP id 0D4FF1C0009 for ; Mon, 13 Jan 2025 23:16:30 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=XCU347YW; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=sFn7Y0AC; spf=pass (imf20.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=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=1736810191; 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=7gGosCgZm62qwgZmYxzf9cGwU7NB1JEuose9uH6/nyQ=; b=KwngExSl9jB1KMxNr9CjqhqeWIdTqrA5jneh2ZniD9KHWfqFCm1WVM0G/GzsCAhn0bcklU sRiMbNtwudpd1lSWe/5S9+sdhVOZg1d/g6mbEPRQlVkowiq4sQtvE2L4GB1Tz7QHbo6DEe xACLT6KjJi04hMNBJAxSimn+fDx/rZY= ARC-Authentication-Results: i=2; imf20.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=XCU347YW; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=sFn7Y0AC; spf=pass (imf20.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=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1736810191; a=rsa-sha256; cv=pass; b=q/68qmt2oeBw6Zn9iQiz2DNyLE5O/HAQe4wIvE99hASd8dVSPVaRIZY2ftW1SuO9X2PO+s Nu4ieTrKW5wuPW+Z4Gri3Z5c8hv/tX1+JLt8Cdq7U44MtH+8LMVVTYrABEJOwnUcs/2oRd /wOx26kOjwfPi2xuPpy4+4IcdBR+IEI= 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 50DMBLhm032036; Mon, 13 Jan 2025 23:16:24 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=7gGosCgZm62qwgZm Yxzf9cGwU7NB1JEuose9uH6/nyQ=; b=XCU347YWkhH6tAvULgGaSJ39AWX4IQAX WPSmKLnIR9xj/ktMILy123RQYvzkfNFfsdvwwThchCX2/kKIcn5hwVUF04NnrXfF LyTbLRJiDkW/6YUAB/gaAnYLxGBPHYl8FkjHVmYpIo8UaZzqnkpU/Wj5aE/jRkWc dz3Xh+DZIzlBNArMR18L/zoJzV6JnmeZqpF3Oww80Gfy3njFRfVmR/LHVQtKLaY6 sq7xeRt1M2fIhWkQcjStkCV2/PoQ6lhRIO/aBiCEwElArWQW1QyIJqpNZzds+c+N Q1Ff5CALNTbp9Ad/4RmeiMDuedIXiX2DZTaa2YAl2QmrICpxv0PERQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 443fe2ctde-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Jan 2025 23:16:24 +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 50DM36AP038719; Mon, 13 Jan 2025 23:16:23 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 443f37kamt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Jan 2025 23:16:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pihq/b1pMI9SgNK02r7tDZveN1PE2FAxinynXGUbySGiP+zIi+MjnWUPrcXsv3GG3MXlrdGGC6+D+ijg0gDd2v9GrQMxqX/jDvGUU9Zk0iVjpcXbo3ZNNnVk76i6IZ+bFzONgu7oFqrte5IAx0CuJX+uUHdHlCO0Twt50KvTVEqTy+jXucCcdwTDou7kJATDxD1Xsb61dMOUslVMqC1zfHaK8DtE+nvSMXENamG2ZPcVQrZ/qYf862RkQI6X/MOcGMcZ4ujLw7e03tp0meFXAFOdpH/Ai8hNvTxViRRK5XvwpjVBeh5fIrTfDyayZ9ev5cP/lDp97eeTp2qtSCp05w== 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=7gGosCgZm62qwgZmYxzf9cGwU7NB1JEuose9uH6/nyQ=; b=ygKAgPEwhZAo6Mi3AMT+4Wq6AaXnhy1gRsD/ZyDyxHAoJ3cZIK3WoJbnKG/+G1GdVuB7ba4VRSo5ZrQI/CAXzqfP6Ox7EFeEnfwTRWpn7ADXGFZPg1YSifyh3FX+8T4wypoLr4+CljYDlfNYSUwW9GUh+Pa06UzBNZ9EHiwSxvMczXWJdW+iwXzBGA9KxgsMuazrjwqmk3SPMSjzLDCm6UhQzYIPOhjvkXTFLkcD6IMryBiBc77M3z2JHCOozGIA/ddWsN19in+oKIDGwqOJH1kF7js6RO1j9Am6wjOznsU0z3zTVwQp9qKKzaGXJ9hKOC1F8zG3WkSLvjak636P8g== 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=7gGosCgZm62qwgZmYxzf9cGwU7NB1JEuose9uH6/nyQ=; b=sFn7Y0ACSVY+QitCRrFIefZ/QjhnRcH1HKGpqTh/2I3TEkzkhaTMAYgHJGhfzAu9HFr4xD+sNjluqu5iK8MWI99z1lldQ95jtu/u45B+Fjydmod/OtKPF287uFgQPUUKFWte4Mvo9wCtpJn3pDKAN9Xoo4uwGnUPw2Rxs/kYX+Y= Received: from BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) by DS0PR10MB6848.namprd10.prod.outlook.com (2603:10b6:8:11f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.17; Mon, 13 Jan 2025 23:16:21 +0000 Received: from BYAPR10MB3366.namprd10.prod.outlook.com ([fe80::baf2:dff1:d471:1c9]) by BYAPR10MB3366.namprd10.prod.outlook.com ([fe80::baf2:dff1:d471:1c9%4]) with mapi id 15.20.8335.017; Mon, 13 Jan 2025 23:16:21 +0000 From: Lorenzo Stoakes To: Andrew Morton Cc: Jaya Kumar , Simona Vetter , Helge Deller , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox , David Hildenbrand Subject: [RFC PATCH v2 0/3] expose mapping wrprotect, fix fb_defio use Date: Mon, 13 Jan 2025 23:15:45 +0000 Message-ID: X-Mailer: git-send-email 2.48.0 X-ClientProxiedBy: LO4P265CA0053.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ac::19) To BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB3366:EE_|DS0PR10MB6848:EE_ X-MS-Office365-Filtering-Correlation-Id: fb5fdde0-16a5-4c03-6ad6-08dd34284a80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024|7416014; X-Microsoft-Antispam-Message-Info: v1c/YMoszkJsp4WOkTOc711RkoZjUVSpsOenz462wjP5mWFIAzz0/xuvo4veHWVFYn5XaebzvHfhDXk3nNzUE7TM7qFn5EEWO2ASCAF2iSXjJAOc2xlXCjU4jVa6bhXVW7M/bS2GPGX90//8uH2ebShsO5AmhUThdfrZWluZDaqv+yoDCCE9j/hsy4cSaj7VuKW2DNSYmJXNaAVs9oJ9xhwWmmWQzVe+jLV9K8IuFejuBaHXheLQKvqf5PiLyXcBwZu07XelzIWw+j7UrAos+tGdOJiTYYpj9QhDUh/ybOX3T7MKvArVUL3TU9XVSS4PMgSZ76t1W25kq5YPOUqluoOkWVuzvF30lsKO60YbVqgMbNmJO1eFrIFDq2pspShgV2CPtKPyu15ofwuMISltMQI8jFCXBocUsyvNfyHMQ1bPZ2V84t9/OIEDJpu1lHVOZqxMgIVMhjBm7y5EYiEXBPxIRrJWUtWFKZ7JN7cgxsDUGJMl5ukHppfns6JGsaYlpcNieWE9t+xnNNSCZAbPXYhY3UHqzgVuL3C8M/N38OefRPXUyAme9k6DjmIq/CqooPyZC9TSkirT1yylnaRSois9UNP6Olab3rqPF6SZnAQ9Xy2HuwAGQg2jBN6THsVd0txH3J5u0M5hThLSZhdv6IOPT2gYVEPdQZKre9Z72GruiTUi9ABEZfeuhNz1D7hfmo7gieVLUekXK8/c94CO3jIoI6hobXfthGP3Be/mOmTT9McZudr0JvPZ5tNhX8JIac4V8VNHhmAzI2PIMI5wGhLtlcJc/h5/Y7wqQNBfiWOgItNtf6mx0HW7wwxTKN0QaYxQPpneBpKocrx4N+s9qZqTYZgdwIFd/r7/M8GXUoaaomp5uE8qY3MxYbKtAKsKm9u0G/1h/7+9n/gQGq/q86g3yOBhr77mAMTg8vnNEArMo2SELm9UUaKJrdA+j9xjwKfAiFxChhYckTOhnzSZJxvWjEx1msXXXBvVsxYB2exHQkenxLCR8QvI245wez+xZjO7uJw+8ob/ll+VmWbtwiXR7+0K2bd5bnbLBlY1DhQL6Mx6kLIAoDRIVxV4l2UriIrXPnLsOero17L0WfseSoQj0le+NzmE87Si5mqJJbH4iWUczWZpfGNRxlZYgfw80NmxdzBTnoCrk8jh6KVxilu879Bg6l8IMk8ZBzjc7xRqKioASjmQpmvKHWCQMAzvNmlOeoSXhrcaBspYmMeu9wLT7wxgakxhiEMOr9kuREGrQFkX20w6sx9vyVS0mfnIHmOZB37htkMZqilP3KuS2J7WYkjKtdFwZ/SBLyWlvVVKeBhNN+JpbvYhc1R7q+mGI9A3CeO/g9Sd32kjCW1kog== 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)(376014)(1800799024)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NMds33s7gq+8U9/Pu+/Spnah8XOs/icXWLT+/ae5q1uI7Hq5BE70EttjlVc4jt2L4RHlPTLq0hwUZpZxo1S2uyXSPwFcrB0DckOnaF4r3erTI0Nf9yQK2U6jFyMnNHbiH1Xu/jb8R0mxubJNUfGaCz8iOQ6V1EgM795a8R/Q3xnQtAYl30vew/M2NC4QGynBj8ppSCivVmAOppyEXQR+fZn8PnDkY03VLI2uzJKM0n/zeQOsFFz3NB3QvJCn9jxK2pRVfb/+NDsXfexBe8ZPp1RI5PRTPDngck0xvk2iR5PkFNRLVyFcXvGvA/weGO3dtWzikutb4ZNM2RO8CBF6IeLEl73aaODMRDEO/6/7Y6kiLAJUzKzdG1CHEuizQIRVyQfOWfK2HMCyvdRnUOq6uHkp1W1MJ1MpyJK1m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GlHsR0UIq4Dvvp9hfj8zTCjIs5CcsPZ9N52LS7NM/tX7K7fDDPfR4wThMsNVKax4GFdNU8XnUt6TaL/bb+OeA4Vtsl7TG0TN4lg7lcSO/RmXNYBPxSGpXKXnyfrIQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: umhM2OvazswbL51GoMtw23Q3KpHeQxlAUmIBjCTWfp4WVIWzIz9fVr1jawjZtgr1qgc9nDdWNqwe3OIRvY2pnFnBuFqRctFJyLslqnjIReDya4MVGPibDu91WpqvdHxWCgj+tfT6447AoeHuOvICUUptKoDj2TfgtcIEwp8c5henz/699sIrfhXlJD85/LQY37CxHdAhMkZ/e3fVS8kxGT82FH0Kt+BPdfbW7xfbR1D7Z4bt3uVZAhERJFfCQlFTT66I1DItXznjstt54mmTjBJHARONUZjM0GtCqGsmlo2yjgCfDJJm5RXEkNShPeBhRX92W+oSyr8GcqF6oZd0CaOsdcMe+0q7418zVeebO8XUayBh9ZT60ePy1an8JckaVAdPqveG05ur13W1kvsXktW45k2mSI6nb3iGK3ecjGGhhxm9ckb+8o7w6NI0/XZfQcxUEk7N86c47h6FInNNzGMZv4dHvX7OSZbjORwHQA1OnmDd4CF/QXRiq//DXqixKWwhB1OsF/T3PNYah8gDDTHar86gh2YzhaW2BofA1ve7o4PxfIswgvywzto6o/mZpvjiNHToaR+KQD/8Wkwb7dn5ZloMfzXkQVmR4fMCSUw= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb5fdde0-16a5-4c03-6ad6-08dd34284a80 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3366.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2025 23:16:21.1999 (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: MXsym7dZPhXcppSK5T0t/y7H/dIN2l9EJokc3a4mrB47bLsTd7k00HG1H4B854+/stG9nRlGjAlrCqf/z6Lyk797ivZZrT5CWC/YWyhqeNE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6848 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=2025-01-13_09,2025-01-13_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2501130183 X-Proofpoint-ORIG-GUID: jlr-OiZ1pGuHKp0ZpcsobwBV2IavTP0L X-Proofpoint-GUID: jlr-OiZ1pGuHKp0ZpcsobwBV2IavTP0L X-Rspamd-Server: rspam05 X-Stat-Signature: 3sibqsem4qs6durrstuu7hpp8td4qs81 X-Rspamd-Queue-Id: 0D4FF1C0009 X-Rspam-User: X-HE-Tag: 1736810190-702792 X-HE-Meta: U2FsdGVkX19KX2PoixyZrSyRLz5MdYkT4+AbxU8C9bfwP0XrUS0JZFPvD5EzNYGInfslIptd3K3clotFgV+C0nfaQD+YMT9zppKxIxSt1TO9AMhryoS/Om41jPtiQ1COSFH4VookF7yqmJISSjYVSoKU51GvAIhdb8O3IH2k3ZWSVUEAfWPnxC4knfxwE7Mk7XV9ASpm3OA5bsz+K7bM3EoJOPiUacHbAu4WhiOIv9Wx6eCtdKg7bBOBxRwqazeUvaG+M9sjhOhtKD2dng1R1LbA64wTrEdrpU1c3u5ABzRp6aBIfGxLZ3oBhRooyP5CxIiz8NxsiKVR8KEDilILUD9bVfFMthJf8vK2ojnnU7KuFK1AJ1MeglDSlW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+llWlqneJx00ePhQy4H6aI8tyJB8d9XfwT8N0Gp7TvI7E6u1nw9jqdD4dvXC48FHXyLQmR2wtOwamxZZkezGSHpLw5vOAl/wH1vXTRAcKnih0RSZM1LYRTIV16Z2nYLM9PrPC7vzEMN4GNu89QWcQYH6UWNNI66a0lkJAmiJUM+HrIyDlvjl6jqbVwlnrupTZhMsd8fhMmoGq1oIcUxOUM3WZKw4Hb0xJYRg6ks7/uH20zDChLLTzsjOk= 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: Right now the only means by which we can write-protect a range using the reverse mapping is via folio_mkclean(). However this is not always the appropriate means of doing so, specifically in the case of the framebuffer deferred I/O logic (fb_defio enabled by CONFIG_FB_DEFERRED_IO). There, kernel pages are mapped read-only and write-protect faults used to batch up I/O operations. Each time the deferred work is done, folio_mkclean() is used to mark the framebuffer page as having had I/O performed on it. However doing so requires the kernel page (perhaps allocated via vmalloc()) to have its page->mapping, index fields set so the rmap can find everything that maps it in order to write-protect. This is problematic as firstly, these fields should not be set for kernel-allocated memory, and secondly these are not folios (it's not user memory) and page->index, mapping fields are now deprecated and soon to be removed. The implementers cannot be blamed for having used this however, as there is simply no other way of performing this operation correctly. This series fixes this - we provide the mapping_wrprotect_page() function to allow the reverse mapping to be used to look up mappings from the page cache object (i.e. its address_space pointer) at a specific offset. The fb_defio logic already stores this offset, and can simply be expanded to keep track of the page cache object, so the change then becomes straight-forward. This series should have no functional change. *** REVIEWERS NOTES: *** I do not have any hardware that uses fb_defio, so I'm asking for help with testing this series from those who do :) I have tested the mm side of this, and done a quick compile smoke test of the fb_defio side but this _very much_ requires testing on actual hardware to ensure everything behaves as expected. This is based on Andrew's tree [0] in the mm-unstable branch - I was thinking it'd be best to go through the mm tree (with fb_defio maintainer approval, of course!) as it relies upon the mm changes to work correctly. [0]: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/ RFC v2: * Updated Jaya Kumar's email on cc - the MAINTAINERS section is apparently incorrect. * Corrected rmap_walk_file() comment to refer to folios as per Matthew. * Reference folio->mapping rather than folio_mapping(folio) in rmap_walk_file() as per Matthew. * Reference folio->index rather than folio_pgoff(folio) in rmap_walk_file() as per Matthew. * Renamed rmap_wrprotect_file_page() to mapping_wrprotect_page() as per Matthew. * Fixed kerneldoc and moved to implementation as per Matthew. * Updated mapping_wrprotect_page() to take a struct page pointer as per David. * Removed folio lock when invoking mapping_wrprotect_page() in fb_deferred_io_work() as per Matthew. * Removed compound_nr() in fb_deferred_io_work() as per Matthew. RFC v1: https://lore.kernel.org/all/1e452b5b65f15a9a5d0c2ed3f5f812fdd1367603.1736352361.git.lorenzo.stoakes@oracle.com/ Lorenzo Stoakes (3): mm: refactor rmap_walk_file() to separate out traversal logic mm: provide mapping_wrprotect_page() function fb_defio: do not use deprecated page->mapping, index fields drivers/video/fbdev/core/fb_defio.c | 38 ++----- include/linux/fb.h | 1 + include/linux/rmap.h | 3 + mm/rmap.c | 152 +++++++++++++++++++++++----- 4 files changed, 141 insertions(+), 53 deletions(-) --- 2.48.0