From patchwork Mon Dec 2 12:21:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13890508 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 6848FD78312 for ; Mon, 2 Dec 2024 12:21:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BDEDB6B0082; Mon, 2 Dec 2024 07:21:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B8D896B0083; Mon, 2 Dec 2024 07:21:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A072A6B0085; Mon, 2 Dec 2024 07:21:47 -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 851C56B0082 for ; Mon, 2 Dec 2024 07:21:47 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 103B1121C43 for ; Mon, 2 Dec 2024 12:21:47 +0000 (UTC) X-FDA: 82849930002.04.2513025 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf19.hostedemail.com (Postfix) with ESMTP id B69561A0015 for ; Mon, 2 Dec 2024 12:21:30 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="eT/jd/OL"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qEifWdth; spf=pass (imf19.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"); 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=1733142098; 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=Ojgqet0VMPf6eEmbXccry7TfSco0Az1bwC5y8FmNEVg=; b=c0EOVMYUcOc6fwEhCpNeWZTA2pQ5ikz8QGl7eDcdc5e4nKnhanl4bKsU79CDowGDHVL4Ns gCetVIGz0xc7BMc2Ji2Qx6BMz6mR3P8iD8IF885VpEv00FhCQj5UgvqNzq0y73Uv19V2IV +70KNPRcQycGTDlOHTh9+w5XEtahYN4= ARC-Authentication-Results: i=2; imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="eT/jd/OL"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=qEifWdth; spf=pass (imf19.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"); dmarc=pass (policy=reject) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1733142098; a=rsa-sha256; cv=pass; b=gRJyHWCH3SOk5jqcQAn9F+ssOeXGXRUe+3dYRFaWMtk3onhbsXBZ7HO6LQmXe6FYE+hTjs Y7oJFE6C5vF5yM8u37Adm9XxFe1JcXRo4pHvnhoEjbBFqpvzOh8pu66c/2+wL4ERbb++EL 0xmaUpDqXONJdvYV+jHEg4nlm72Zdyw= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4B26WvhV006638; Mon, 2 Dec 2024 12:21:37 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=Ojgqet0VMPf6eEmb Xccry7TfSco0Az1bwC5y8FmNEVg=; b=eT/jd/OLg1xq4tTOmIcHi3EsgDEVWTUh q/wz2GClHvkkxtbPtU2h9YyqfOI0+Vc7MUY0elWD40fkutcW8qnbg6swJYG988NG EWlNFRI9SXu0VifYzEPiTm8i9ic3HdvX5XhROrfgo4ryyNoE4RFh73vJe5mAgW4C 5+Y1P0XqrVeyIxLFTI9fNCk0Jc35nujqQXcY8CocbLjM5MrbpSUqfsraRet4xxNH ymarfe45IHDa2dfYesXgCaO5qLDCCwkbVc+E9+4TnXpza+PiVVKHOaevh1tN0l88 LfkU+7PlWYF41rkueTbMoH9EGUd/y24OVVCwyoTgB4vVIBU24e6+WQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 437tas2vfr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Dec 2024 12:21:37 +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 4B2C2cqr032113; Mon, 2 Dec 2024 12:21:36 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2044.outbound.protection.outlook.com [104.47.70.44]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 437s56gwq0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Dec 2024 12:21:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=k7jsgmVq/10V+sZCDvltnRTjVTuR1m0hDA6iynCoECnvv76y6uTnWJpapT8xmXSMaJbBDtytg/q8/2w0aPQGcsN9kX+HP5c3uNHZLipHmLpj/pY78qW2HgO0wEOk3fuHtj/BPbP4SjBwK3qL0h8qAaZU153+7FX+FYgG+NQAuqgpFQGp1hSxR772U9IvapvRaL6wlMo42Wsk9CBYtnbs6iSHc5JhU1fc4C0Zg2BX1pUBDc6Gp/a561To4IapNUMYFf4KIHNXrXWQGcrHran8iN1n0QJJ80jfYISP8afpxX37SglTgg30yC9UHGmBD9wICOLzlQz+V3MVZxQAawmZTQ== 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=Ojgqet0VMPf6eEmbXccry7TfSco0Az1bwC5y8FmNEVg=; b=pmwIjZUc8CXBrbdgUcDy6bWzc8HLGVFpnp4LNn7Cyekjxwj2uzDpDptML18LfdZp1uAezZMwN3gK6H0ftC1YiCGr/PCijWOL5rBcBIkR+LmRcdp+wlMj+jeasvi7BQKkJSwJEAD68igt46ydNvm0S0kFFZUOie1V40Y77dvq9Cz9cgAa7VOGQZiqqTRcnUCOqUsNRjwEnn5Iny5nARwGrYEp2SMNIrILhTQKq777T2CAwRG/9URrQlv5SeH4RtWLdePST/8K3l+JUfnSkzpLUPFwLhjM5XdFS8HcexHnGj5hbkhrePGc3Cp6xlXt1mLFYNP3pWP07BFRRZdaSyiAfg== 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=Ojgqet0VMPf6eEmbXccry7TfSco0Az1bwC5y8FmNEVg=; b=qEifWdthTPPam9XiiBUZm+l8s1LDT8aW3ar2dTkBCMqahWwV61UU16bMDKfkdOBNlzEmWFB0u/6t0exW2bsjGTjKv+/TnVmWXtJ/J8qFVw3HrHeBSMGen9Z3g5y6HTX0toydv0w5Gtg9E/JXai3CMyhWh/OKK5oSb3xlLTMXffI= Received: from BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) by MW5PR10MB5740.namprd10.prod.outlook.com (2603:10b6:303:19a::15) 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 12:21:33 +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 12:21:33 +0000 From: Lorenzo Stoakes To: Alexander Shishkin Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox , David Hildenbrand Subject: [PATCH] intel_th: avoid using deprecated page->mapping, index fields Date: Mon, 2 Dec 2024 12:21:27 +0000 Message-ID: <20241202122127.51313-1-lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.47.1 X-ClientProxiedBy: LO4P123CA0643.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:296::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_|MW5PR10MB5740:EE_ X-MS-Office365-Filtering-Correlation-Id: f6eed542-f82a-4581-cd55-08dd12cbdbe3 X-MS-Exchange-SenderADCheck: 1 X-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8nNYrmSoUdfDNK6XpM+8boeHwyrSm3W40HDhP20yy4zq57w3mZ/Uk7PxoP6fpkLaQNIZrj3OL9p2VzLFsTe1Y8IbiYG84fTr4hgU77lQ605Ee0ZDePaKeUEn42FlWxCVsUHkX9WR4/RpVa477L9r4C3KtRiYp0cSmC/nX+TgOiW9zmzAREBtwGmIWKftX/hAd1VXFJplURIwlloILK5dkSyFvVO86d0DJnoSB4+XqEeSb5sV6vs3psTm5blTc9ccQlQOp/ynVgeBmEfs9KSLyvd4fokCTavPIgeCmGQXUEQEt6/tm6nCqX+g1QgnrD1/gYgmQPHILlSatYpXyS2mmI25pdW7c4SIqeSJ3voZcrnNSIVHmGIgMWCaPrHA== 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: lyLVCqPRILwI2xkrpxEK93nRhQJpSkdDfbshL+zkF+YMcAev7U2twlX4ROqURCprGte7wW+F1qceQrrfhis1IsTQHPe6SBw18k8C4fwakksyykqCuOqTjFrARhpcvtJ+FtgKerUbKHKRjt2Gunmnlson3MbvTn9C65hD79104cMxS4FsnGEzzkw4d1PaZsADnMvlRgUOtQI5BoEl91cUZbQL+R6zhBrgkzTzVdzPw4v6ya5BEZI6wkcokdGiO3Hn+ar/G2RWNtlNWYfsmikPLHzlYdTAVE5i8EAqoVHNjIJUKY5OUFexRclA+xienZnYgfXJjS80n57WZEr5b0hTBDJ68Gnje6mIfpZrX9lBYzKGXcnbb0xzOxh4jt5G+JjkCjEvoezl3oxpCdKD3Wzhx89BFJwqEwGAMofSQ2y7WfkNGMspIOn7NZ1cFWjh/ANvKTJZNLsfw7P7SVwbMkcoPEzcswOPcL+BjN0cHlWsSHs9lux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ge5WHJBn8T+a62nFBe0kmbaEK8bOYcRq+SndZQ1j9sf2SchLZL4nrfUfkg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Al+Fd1tRtJ2afpD7Iz2K+Pv+Rsem3DL/RhHajYdYTxn3+MpCWXaPL1y1891vdKStm+tP5VycujRz1Ocd3AMoLDJMu/Bl7/OQr7JXBupzSC79fjImhOW71237QyAzgGBnnufZsSOHHrbJrpryWUO7g7dzLXs/29QU4NnXaeh4dCSl4CalbaNhBKPT9H4K6c5rHxhbxdLLOP7B8Bdc5HbF8gd6h6Fi/2EjgILVGYZw84GIi9uih+gUDigtCXwq3eVadhUJ4zvIZVnni1h9f06PzldUeH6lwZ7bWynMeIKXkrUOOk7LHXZuue4ZHj2G1u0Xe7+7ss0reA9jtZXCGpu4sW9zLOcASDx9h/I88r9agQ/cYhwyLRZH5CsB/0Kr2BUW1nHT/UZYfq3EK/nPQScTOA8KUnxj32BRMTv5uKfgOcqiihnsXpr+mVSBZ1AQKB0LPWVhL2jScnq7rMDkZPGBcRA6cJbYS+YP6ifBEM7Ci8g1sZcEmE1UeiOq7+njGynSoDMduSOhO4bKfU9KMauEv4De5+PvGM7Cv2YmmHuQlZTb1bC9F4P63QZ3NUkMH1ulhK1+EaRWSe8pZhSCBZjSXyPPgCew68uwGs6DxFY3wO0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6eed542-f82a-4581-cd55-08dd12cbdbe3 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3366.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 12:21:33.5827 (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: URdBWVndBNyobHXUZmJSyIoQmcSWWw8PZi204IM82G0DLi880gRL+7RJRvWippM5a2mTn8EZ58SmR+2pFSZB3PKwmtuKNjIUA7dcgjZn7lc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR10MB5740 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_08,2024-12-02_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2412020108 X-Proofpoint-GUID: gdwSbxlm6JZbexl2HyRx32P8hk1eG7LO X-Proofpoint-ORIG-GUID: gdwSbxlm6JZbexl2HyRx32P8hk1eG7LO X-Rspamd-Queue-Id: B69561A0015 X-Stat-Signature: 8jxd3rjw4431xgq3dpanxuczdx63se56 X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1733142090-91405 X-HE-Meta: U2FsdGVkX19pJi+JLgwP1zJZl1wFiVXlD5qITQC3+VqXpsTB9sWjQDDpTa2Nbj7dzii3oXG68BN/i6p9x5Oy4evkfG+sl0VTSnmfE7GzJ5z/D+vF3J46Fa/6yyu28hjyFWCRZX0EyYFmoSRrVFTIZogksJBG7jvoMJckbYjQfiA74x45us7z0CnRrqWYGFMlQxcZinmbJLKcq/37Bn13dJXqQjV2Gho0P0EwU4zgXxDZV4uRfFu9qvZrMolJlvXoTe8yDCylN+w84gOyJnTCxMbQFybGa8FWwZzxs9QOjqQiiRIFKFNvcJantqeHY9eu5FMImu+Bp+il03/1Ie0R929KX0JODvfaxhjjHOWKyXAcwgxi+fYgYJvAOZklwjHfQAo9rlAzJcfSLFIwfTZwWCqCiXAS25X1hsybK5koaRNtSI/VIJkZ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ijgsVG3efwfH1yBM4/MTNoLskjQbQRoxvhR3WIFDnyXNUlHhGL4C8EPCa812nOnbL2et1sDiazXKqMI7byA 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: The struct page->mapping, index fields are deprecated and soon to be only available as part of a folio. It is likely the intel_th code which sets page->mapping, index is was implemented out of concern that some aspect of the page fault logic may encounter unexpected problems should they not. However, the appropriate interface for inserting kernel-allocated memory is vm_insert_page() in a VM_MIXEDMAP. By using the helper function vmf_insert_mixed() we can do this with minimal churn in the existing fault handler. By doing so, we bypass the remainder of the faulting logic. The pages are still pinned so there is no possibility of anything unexpected being done with the pages once established. It would also be reasonable to pre-map everything on fault, however to minimise churn we retain the fault handler. We also eliminate all code which clears page->mapping on teardown as this has now become unnecessary. Signed-off-by: Lorenzo Stoakes --- drivers/hwtracing/intel_th/msu.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) -- 2.47.1 diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index 66123d684ac9..93b65a9731d7 100644 --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -19,6 +19,7 @@ #include #include #include +#include #ifdef CONFIG_X86 #include @@ -967,7 +968,6 @@ static void msc_buffer_contig_free(struct msc *msc) for (off = 0; off < msc->nr_pages << PAGE_SHIFT; off += PAGE_SIZE) { struct page *page = virt_to_page(msc->base + off); - page->mapping = NULL; __free_page(page); } @@ -1149,9 +1149,6 @@ static void __msc_buffer_win_free(struct msc *msc, struct msc_window *win) int i; for_each_sg(win->sgt->sgl, sg, win->nr_segs, i) { - struct page *page = msc_sg_page(sg); - - page->mapping = NULL; dma_free_coherent(msc_dev(win->msc)->parent->parent, PAGE_SIZE, sg_virt(sg), sg_dma_address(sg)); } @@ -1592,22 +1589,10 @@ static void msc_mmap_close(struct vm_area_struct *vma) { struct msc_iter *iter = vma->vm_file->private_data; struct msc *msc = iter->msc; - unsigned long pg; if (!atomic_dec_and_mutex_lock(&msc->mmap_count, &msc->buf_mutex)) return; - /* drop page _refcounts */ - for (pg = 0; pg < msc->nr_pages; pg++) { - struct page *page = msc_buffer_get_page(msc, pg); - - if (WARN_ON_ONCE(!page)) - continue; - - if (page->mapping) - page->mapping = NULL; - } - /* last mapping -- drop user_count */ atomic_dec(&msc->user_count); mutex_unlock(&msc->buf_mutex); @@ -1617,16 +1602,14 @@ static vm_fault_t msc_mmap_fault(struct vm_fault *vmf) { struct msc_iter *iter = vmf->vma->vm_file->private_data; struct msc *msc = iter->msc; + struct page *page; - vmf->page = msc_buffer_get_page(msc, vmf->pgoff); - if (!vmf->page) + page = msc_buffer_get_page(msc, vmf->pgoff); + if (!page) return VM_FAULT_SIGBUS; - get_page(vmf->page); - vmf->page->mapping = vmf->vma->vm_file->f_mapping; - vmf->page->index = vmf->pgoff; - - return 0; + get_page(page); + return vmf_insert_mixed(vmf->vma, vmf->address, page_to_pfn_t(page)); } static const struct vm_operations_struct msc_mmap_ops = { @@ -1667,7 +1650,7 @@ static int intel_th_msc_mmap(struct file *file, struct vm_area_struct *vma) atomic_dec(&msc->user_count); vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - vm_flags_set(vma, VM_DONTEXPAND | VM_DONTCOPY); + vm_flags_set(vma, VM_DONTEXPAND | VM_DONTCOPY | VM_MIXEDMAP); vma->vm_ops = &msc_mmap_ops; return ret; }