From patchwork Tue Nov 5 15:50:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harshvardhan Jha X-Patchwork-Id: 13863136 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 EB434D2C13E for ; Tue, 5 Nov 2024 15:50:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 384C06B0088; Tue, 5 Nov 2024 10:50:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 334056B0089; Tue, 5 Nov 2024 10:50:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 222946B008C; Tue, 5 Nov 2024 10:50: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 052B06B0088 for ; Tue, 5 Nov 2024 10:50:48 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 77342161400 for ; Tue, 5 Nov 2024 15:50:48 +0000 (UTC) X-FDA: 82752479040.29.699EB5B Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf21.hostedemail.com (Postfix) with ESMTP id 59DDC1C000E for ; Tue, 5 Nov 2024 15:49:43 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="CSdltS/7"; spf=pass (imf21.hostedemail.com: domain of harshvardhan.j.jha@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=harshvardhan.j.jha@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730821624; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=hDfvvmkn+WM4kzM140c1dzl4702BPVdljW2cm1N4eSw=; b=rynZfbGYBZIbBQ1sFuP/4xqi9Kkmjaca3TknV9llz/1HfxfKBLi+laxMw7Lpp/rfozl0If diS+viEscZZBGBvN7qtuIBDWlhmHo5TxFlkkVUBPa2N0rJ/gwANYXZ7vQPH2S+8hQeFw0u 8eCsOsHFmDPXhABiZRoOihpyiJaT6JA= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="CSdltS/7"; spf=pass (imf21.hostedemail.com: domain of harshvardhan.j.jha@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=harshvardhan.j.jha@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730821624; a=rsa-sha256; cv=none; b=EXzrA39hysTn680aqNpNoxgRkPpZ1wHPjA/cChpBIL+pXIv5mU5FYFX2Ard2Ond0WoFIqC s/PRuKWpBm5xWKSxfRpRiJIYetPcu+bq7l4PCW0iWvduC8861nStJsuUBpBF9SG+Hvf+Df C0+qH/Xy28R7Gnt1IlvVhvE1f345vrk= Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A5DiWZr029632; Tue, 5 Nov 2024 15:50:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=corp-2023-11-20; bh=hDfvvmkn+WM4kzM140c1dzl4702BP VdljW2cm1N4eSw=; b=CSdltS/7+gdsTSoAypbrLFV03QA5xUYaDDnTYaPYATITR R1yeACKTDpmB6PBHR+L348XMY1rcOo0rcOXEre6Ii9ixu5bgYSAPSF7AoYA8I2br 7GLDpuc9Rg+jxHYS4PBpIThdrlWmK/Z4no4jPNkYPtaqTUWUSnI9jNmx2r6Z+IcF D+umVcS9FHpGaHvzw5pMPlKvb0Ui7pWr8mD6RlZL/dnCIwKStJYhG4KlosG2R5al SS3Bl7r0TaP34B4a1lVnJGNdXZaTEVJ+G/0xvbL1h5bEcrJik8B6ymjr/WxH2LLl vO7EuZAUKaYQjH9oM25JPR0AoFkKFszFnHgIBiYxQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42nc4bwqs1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Nov 2024 15:50:45 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 4A5EIeWQ036298; Tue, 5 Nov 2024 15:50:44 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 42nahdkgjj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Nov 2024 15:50:44 +0000 Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4A5Foi0I028682; Tue, 5 Nov 2024 15:50:44 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.129.136.47]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 42nahdkghq-1; Tue, 05 Nov 2024 15:50:44 +0000 From: Harshvardhan Jha To: akpm@linux-foundation.org Cc: harshvardhan.j.jha@oracle.com, linux-mm@kvack.org, stable@vger.kernel.org Subject: [PATCH 5.10.y 0/2] Backport fix of CVE-2024-47674 to 5.10 Date: Tue, 5 Nov 2024 07:50:40 -0800 Message-ID: <20241105155042.288813-1-harshvardhan.j.jha@oracle.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-11-05_06,2024-11-05_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 spamscore=0 mlxlogscore=728 mlxscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2411050122 X-Proofpoint-ORIG-GUID: EaGGQYXg6UZlXYZJOUwaZtBb0CwnH4OL X-Proofpoint-GUID: EaGGQYXg6UZlXYZJOUwaZtBb0CwnH4OL X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 59DDC1C000E X-Stat-Signature: 5jgfh383767dka7bkuky74ua55wwtpjb X-Rspam-User: X-HE-Tag: 1730821783-847673 X-HE-Meta: U2FsdGVkX1/KErfSlTkNRPM49uN8+xm4OHVk5dM6pVFjjXzECjcJkvVVSYDWYQ9pYB75lt/zp4mG5not+CfL3l5a1liH4cZSywyQaqdpfYODNDeJs4bhO2TN/q1AfZhojGPybl6cO95DfVGnGrpThSqpAJUKUNDLY4L2ydpNx01b/eYwSvhrmo9nDuo5z1CKmhDzblQARkRV4U6jymj4WvXjZU596GhU9wq0N+qzB55IaA38U197Ahz4H5JR4PBJ9IK9Cye+7vK9kevVky9bpmAZyfpeWomXyNn4zC0c80rYEtFpfao9ou7pqiwKgsL7ZreHm5EC+wX/EpXu9rTcOOQZtbOBDi62p1hpPbLw6NWUgFV7ojRsYEUcm6ersaVbyJXtkoFmOYk3OXNfo1+Xc6484iey97aseRbeHJv/ADTuxcebialZG+rOMIY/vJHTuyYkrh2Z8qXP3FwBGlTuCoDima0gbaxwCm8XCPoTXD/kuINHk3WBPc5G1or2mHLSFC/0YkkhUlZZvVx5RaVPeDgzA+bbyO6aDJibNaImQo/eqTzPNGlQkQdIFIstvQ/T43ZLTy+ol0qRyDsgvBDdbhvL4ocb32zW1lH3H/nJ5FAF3cAf1fH9yILsjEej9/Xk4sqiXRINUgJiLULmIsMnrptkeANu7nWSEgpOP2e1mNqskHaIw23vMAFXBPxAEP/jTgZHrR/Ni2QeTPUSWh56tv8N+IoZgioDOttfz/n9ATzzV/ibUl5Vd9Q3piFZUkBxEKj4TD/G+nZk0KPA3Sbuw5RKHfkZRxbMDUjo2/crcOaLkAz/7jouIioy1QOpo0/TTfBbkxeWK3/GK5IYJ/+OD8+CDve9JKgiS9lnekKwKNvMpdEbqKpfCN/Zajn8V1BAjV1YKarAfv5VGGWeVU37qBQIWE48Bop6R/fGuhB9tQUWcQnpNmSCeLAKKND0nfDDU+Q6ZlLGliUDEsHocR3 dLzisjvV nA02no6EHfRbsQ7LbcH4rYTrGiAxVInZM4lMEZCYInv0JysF+b4xRWsWoH2IRafnFmiLGlcDtemB3LzLh4ip5rpnB7Uwl0/vQHf7DCpalkeyfcceXrbNrFjVgZzy3qMMmFU7d9++RVtQw0n3dX0XTV5Apdi5z8ynSIw1pb2XlQ1kyYFD6HGTI2ShZWkOxYU9ADUzCun0nAtRkDUsHYRnAqeSb5nn4bThu6OHFyPXqnVtFsdSVt2vFny4tIA== 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: Following series is a backport of CVE-2024-47674 fix "mm: avoid leaving partial pfn mappings around in error case" to 5.10. This required an extra commit "mm: add remap_pfn_range_notrack" to make both picks clean. The patchset shows no regression compared to 5.10.228 tag. Christoph Hellwig (1): mm: add remap_pfn_range_notrack Linus Torvalds (1): mm: avoid leaving partial pfn mappings around in error case include/linux/mm.h | 2 ++ mm/memory.c | 70 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 51 insertions(+), 21 deletions(-)