From patchwork Thu Nov 14 15:34:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harshvardhan Jha X-Patchwork-Id: 13875272 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 DA2DCD68B31 for ; Thu, 14 Nov 2024 15:34:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 595116B00B5; Thu, 14 Nov 2024 10:34:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 544426B00B6; Thu, 14 Nov 2024 10:34:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40BEB6B00B7; Thu, 14 Nov 2024 10:34:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 17B1E6B00B5 for ; Thu, 14 Nov 2024 10:34:50 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 85A9F1A1164 for ; Thu, 14 Nov 2024 15:34:49 +0000 (UTC) X-FDA: 82785096450.27.637F03C Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf22.hostedemail.com (Postfix) with ESMTP id 5AF16C000C for ; Thu, 14 Nov 2024 15:33:52 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=TCCiujrf; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf22.hostedemail.com: domain of harshvardhan.j.jha@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=harshvardhan.j.jha@oracle.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731598357; a=rsa-sha256; cv=none; b=DwExgifEqr0uJcVTExM/68WSo6EQXu7nGlMv3F6SZv/7C+/92q71lP7pCvs4syy0FR6Lbe UwYFpBD8OcEgD3Hawm5kDjS6jtGfode4LE92r0wqaUInkQgptk/Z4FVNWBaOkMTOp6s7T2 Di/Y9oDKzhn+pqLFiHT9fiRc6Wu34Lo= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=TCCiujrf; dmarc=pass (policy=reject) header.from=oracle.com; spf=pass (imf22.hostedemail.com: domain of harshvardhan.j.jha@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=harshvardhan.j.jha@oracle.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731598357; 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=V4POlso7qon3V5R85x0vpB695S+qBbWIxEEp7Dy+f9k=; b=wBQKg91M9yeHckCd28XvoqD2dp8/+W7OExTGZWvdKqu4z2Fp4jjVo68enWaXJaTg6KwkKo jhu7lipziSqd/Ub/5SYnDGlYuW0CUdGPXGimfvjEe35wKc7j4fOQ2KseJY6cSKoKkKpyu1 zSCgReOAkgk0u9/1NuRsUAkfupje6z8= Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AED1YIZ018624; Thu, 14 Nov 2024 15:34:46 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=V4POlso7qon3V5R85x0vpB695S+qB bWIxEEp7Dy+f9k=; b=TCCiujrfszDxljKGEpXcjwxZ/sWhQs1sMz1Z/Qz03UuHY UP0ZVLSskwAuNJ7dv5/zYwkWX7PfMAFJ8CUfpNu8jETa3g2DOkVhTHtC9NyV+gAf t1oA8VfTLh3MQWOuBwIRpDGOd1biAnnoVBOSayf6N3eYFQLPx3PVZqd5zpqFjm33 C5FZGxdNCS0/M0qfHIrnlv0XrjEiGh72PwzIWZmZ9tbposGvjChtPvBrNFzPofPr dQX5aW5YidOoxszicH7ZHIAhIyLTCCersw5S2Sp2EooJ/9wJrTqjM42lDjHEoVnu YpdbHIp69RvscSBbvF03vvTYZRXQetaVNh1RRbH3Q== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42t0kc1ku2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Nov 2024 15:34: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 4AEEKDUp001352; Thu, 14 Nov 2024 15:34:44 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 42sx6bayxh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Nov 2024 15:34: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 4AEFXvht031217; Thu, 14 Nov 2024 15:34: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 42sx6baywk-1; Thu, 14 Nov 2024 15:34: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.4.y 0/4] Backport fix of CVE-2024-47674 to 5.10 Date: Thu, 14 Nov 2024 07:34:39 -0800 Message-ID: <20241114153443.505015-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-14_05,2024-11-13_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=800 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 suspectscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2411140121 X-Proofpoint-GUID: S38BDmG7s67f8iBJ6Fu5brGd0l2An_mW X-Proofpoint-ORIG-GUID: S38BDmG7s67f8iBJ6Fu5brGd0l2An_mW X-Rspamd-Queue-Id: 5AF16C000C X-Stat-Signature: 8od89cqezkc1ncbzxpt4w7fgz4cxpyhm X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1731598432-221599 X-HE-Meta: U2FsdGVkX1+un2o9eUW+B9+vN6EQwRwzqxiIaStlX8zS4e8GmuWbn01ShujXG/OjhW/52gRzjAyJozRecJSa4vRfK1CYXt9C8NK7tnQE3hG65ZoLgGo3bw0ONDdxg/DYxTqKqQ93Ek1X7gCz0NaUxR9WsErOC18bkuIzgo0FY2CQAI9n6vYUx47o5qyc6K0FSC+UebWf35A/qAPuOub37X0ie7MMuRggZbRJBlpbAtNESw3+OKC5VWZaYLL9e/LzveeSf7Omj3oS6fxa9KLxOIO9a1jBz6L7i7Rdy6B2MtJ2QxN47S/hpQVphWSEKHor/rs3K9u7W9/o1DdD+N2Y3AAAXdfmM4ZNj+t5Q1xZFBRUkvqSsycEmeUFiCiGv/4xQr62XYP0GaY1Oytojj9b4HOLPVt7D6M1tmxn0SXH6vVnUtb7+WsF8U7uTWLUZ7GFBV8zoAOwu/L3ZgdvxLgldDptFO0ycN+vYBcSNFzP1uyacDNYknjxaKqAuUMV1IVPPcZrGGDI2ACDelK6mnzQfiURlPr+VBQLBuwjJ8edZ8M0ni7vSMy5efUODuwZi8Wo+htnayehS5tJ2UK6p0RcABlyfQ1XEuuJ7uxPrgywsKes7hRHWYVZb5AK+NezEz0NCUJFK8KXNp0bY3D9FKWsLaM/vbeFzbaZUDEbKl1uINBB3Rik5lMmDHdHxhTZMd2Ctj38ZE28WhoFKBwvPMNI+uCzRBY6RrIo0KyCKOmw0ZG8oxxpuVkn968uWJ9FCkQzCLqmok63eYLNBMmOs5of+BwEsQdCcKQSH6Ex6HJVfSnZftCPLVHjyzpKfKOHqwGbjJxI4eawbLxID5yKmJ9cl3dvYo4Vf5OYnWKGjkESzexzC28OmkRgXrEOORra2L1lkiCu+1KrnkWxMK61zsi1gvS8IldAZZpgmDdfNuxjRbUTWtcKlE4nS8iuRFSPL9cmkDOWL7Pp1pfE0xpFjg9 la8nsXpz EWjDhv6FW00BaWY0vy0kvJPvhjIZTTp6kG4FaQ3+w0PtQrExP+ZC7gBjLeQZZ5naMz/yvqPoc/qaLKMDTseyP+aE78A3AOpfZe9dhGa3Y1NeGc/PdE+tJV6FHD1FTGwTPAbjcnFxHM/n/SjFESz/DddtUVT04RXM5jb4hMXWrBzRQRGWy3MRjOuZIHUkYbmdxpKIJzW7Pj50uit5+0e8DJQh9G1Hzr7c11lG1WVcdr8gY0sCuAqqLZpF99A== 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 3 extra commits to make sure all picks were clean. The patchset shows no regression compared to v5.4.285 tag. Alex Zhang (1): mm/memory.c: make remap_pfn_range() reject unaligned addr Christoph Hellwig (1): mm: add remap_pfn_range_notrack WANG Wenhu (1): mm: clarify a confusing comment for remap_pfn_range() chenqiwu (1): mm: fix ambiguous comments for better code readability include/linux/mm.h | 2 ++ include/linux/mm_types.h | 4 +-- mm/memory.c | 54 +++++++++++++++++++++++++--------------- 3 files changed, 38 insertions(+), 22 deletions(-)