Message ID | 20241228175522.1854234-1-cel@kernel.org (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 174F9E77191 for <linux-mm@archiver.kernel.org>; Sat, 28 Dec 2024 17:55:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 180866B007B; Sat, 28 Dec 2024 12:55:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 130CC6B0085; Sat, 28 Dec 2024 12:55:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3A6F6B0088; Sat, 28 Dec 2024 12:55:32 -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 B918C6B007B for <linux-mm@kvack.org>; Sat, 28 Dec 2024 12:55:32 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 54F151A0CD9 for <linux-mm@kvack.org>; Sat, 28 Dec 2024 17:55:32 +0000 (UTC) X-FDA: 82945116954.20.597B3EA Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf02.hostedemail.com (Postfix) with ESMTP id 9B89880006 for <linux-mm@kvack.org>; Sat, 28 Dec 2024 17:54:05 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="qi2D5/TJ"; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf02.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735408489; a=rsa-sha256; cv=none; b=BfLOcyRWh1IHaqRwPSHd5Kktufd9k3GB7OP5wgqZxbQPhgD5X3vs1cBoTxZ5IqmGY7QSbU vgngfWcS0HB/9dujzJQfSVnnMnxI3DpwswA5D0AYomrTnNzOgK5GP6udJKBq1TsGj5sm2s 16oY2OXm8NpniBD1D8p6ccZp6pEKdOY= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="qi2D5/TJ"; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf02.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1735408489; 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=ka8dJ5At4ZaJKJTfNLYEPLjHFd7to8ZHSSwYcismRV0=; b=PnNNvUz+FuiGplUzcXOQmVryNv13o4Dvotp0NXrcdRRuwsiHlGXouri2ZG+zFx6g9X8Ffp duESK4IVNhcRDNbvcDrxLo8jv3oeElgGMC1hc+tVZNrALA7PTZ/C2FdGlgQHv869sLHg3u 7tm5fq2rpdnvKMA3EtJ+TsvP9Q2QQIs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 7DAEA5C352B; Sat, 28 Dec 2024 17:54:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6CDBC4CECD; Sat, 28 Dec 2024 17:55:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735408527; bh=bwFx/HRhxQFiEIQ7+w/ckGTsvDdqntEzbhKZXbPzuoU=; h=From:To:Cc:Subject:Date:From; b=qi2D5/TJMFVKU9f1fAgfTSY7ZbTJFDgLygv8Y5FIN+nesbCt2a3mjLVJkdwEQKR4d Vz6ArZnICpZUzK1maDP81j0FZOx7CJozM77NgMsSE0voF337NBmpN/dUv1imMxRaRE HCPjndho6JdTKMMssw9ilQLDbP8Qwh8vPJsCG3AGVXmr2zeTy3iYmNqFzslg3PPHE8 8HTfX0GD/oW98Ivqkbsnv6To5b+cYMkQxpb0GXFMAyYDt0ag5cP1NViaw2z4EI4beC 2Sf0rQuJqHQH61XeA3+QZgOF6k3DB4vI5rYV8A/EupRfLTup5UIFxJRx/zwMKWYMiC GUDFO8GRwSdrw== From: cel@kernel.org To: Hugh Dickins <hughd@google.com>, Christian Brauner <brauner@kernel.org>, Al Viro <viro@zeniv.linux.org.uk> Cc: <linux-fsdevel@vger.kernel.org>, <linux-mm@kvack.org>, yukuai3@huawei.com, yangerkun@huaweicloud.com, Liam.Howlett@oracle.com, Chuck Lever <chuck.lever@oracle.com> Subject: [PATCH v7 0/5] Improve simple directory offset wrap behavior Date: Sat, 28 Dec 2024 12:55:16 -0500 Message-ID: <20241228175522.1854234-1-cel@kernel.org> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 9B89880006 X-Stat-Signature: hj5s791g4duzoiwt93z9wxs8uwb81rna X-Rspam-User: X-HE-Tag: 1735408445-589313 X-HE-Meta: U2FsdGVkX1+BJcMaDsu8taPvEXac+HGybz91yuhT9KC/ulzveeYbH9BJ58kbUVOuflrrKClZlnb+hTiFFKGjDg80IDKxwyVbB9eaLBCn1m8ti67nCg7katMcAF3o0eQOq1HEMiYRZnLDmPNDG8EzdE/k5dhpOcsTudLCuDiBoKk4kVWsp9O/+1/AbEfUQCM36j4LTQIFmnZqZ6sK4+cjsXeuVNR3PajRU1InX3hr17aaeS6w+CQesqpBils453OXpcDWegMedRcOqnPEsmpBds6DroIjL5PGykp5ZJEvMlbhhrAn99L2zbGmae+f2Qc5iUTwnYGfs8FXKSOtbuhlNnZjsvBWNwiaGEhIhtm4iWj0SpYqkPrdvvoMEVApAuRWUvzlsyd/UuaR1qJVbZPLZVmTuC2Rlyjaq7r0UFZaZLA8gJdVf3KKV9ATegeC1AZmoqF1open6wxDOei9Ea5+3M/HrMs1ezIOAQrWurNWLZDHaWVZz8md/375YKERTnjSt4KsX9NAXOPzl5UKT2i2f8TIiKtD8yt+Qz1A1CeoqbjzsxXq2ekmaoB+Vfjnnl/wR3PEGflyGUmoIe1s+UOYnHF7kfNPd0QfgLTQsmoMickbrydydMOMoQpTpsrQab7W9UC6RWZFrXgG6aJkBf8ulwnzHWj6KFE0EjMHY62APv98X26bKx+zpNoPssEDR2CbZYapy9KdwOX2tPxViRioMDSEDbLCrLAzLSAQ6aPqyzHvaBVxBzwMlP2frr2gtruvMZ1EdE/j5YwzwTwqsNWA4SlcMPCo+xnUj6wFnVhmVQnjbOrlOBS8cyOye85yIVPP5UlmeQHzuITek4fim1abIekYx9w5ZkvH39YvWt6Ky2APCXNbhnLQExIA3HTs2+tvTSnzfHcZOywT55mWnVOQsdX33XB+9tVF9rtKNBzBMoGzFOqvscvfQ+nsPoGHCuzhcMdjiyS3pwZbgnW8eil t13X3h5S v0vuIo8f5UGfZgDDyJ1V0/JPreYquC27ZFqkJmfZ5Roy3G3BPwAhfNcIxQwjPR2MYGI0+x/81+3F1zlmIokmfOUUUtB2UujIVPduUhFpKxa6sCo3oFLYXRWhicqCpKsBYKMa1qVwFJI4kKLOWGMbqCaESk4QZpr2l61qpF+vTGqhklHgIxecG0NcbPwrqHw4PutE4cP9ri7tT8r9/4w/QluMdfBODIxZuSdq3FaVf1R+6mnPeJRfEFN+X8ssM/Q9rIAAV 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Improve simple directory offset wrap behavior
|
expand
|
From: Chuck Lever <chuck.lever@oracle.com> The purpose of this series is to construct a set of upstream fixes that can be backported to v6.6 to address CVE-2024-46701. In response to a reported failure of libhugetlbfs-test.32bit.gethugepagesizes: https://lore.kernel.org/linux-fsdevel/f996eec0-30e1-4fbf-a936-49f3bedc09e9@oracle.com/T/#t I've narrowed the range of directory offset values returned by simple_offset_add() to 3 .. (S32_MAX - 1) on all platforms. This means the allocation behavior is identical on 32-bit systems, 64-bit systems, and 32-bit user space on 64-bit kernels. The new range still permits over 2 billion concurrent entries per directory. Changes since v6: - Restrict the directory offset value range to S32_MAX on all platforms This series (against v6.13-rc4) has been pushed to: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/log/?h=tmpfs-fixes Chuck Lever (5): libfs: Return ENOSPC when the directory offset range is exhausted Revert "libfs: Add simple_offset_empty()" Revert "libfs: fix infinite directory reads for offset dir" libfs: Replace simple_offset end-of-directory detection libfs: Use d_children list to iterate simple_offset directories fs/libfs.c | 162 +++++++++++++++++++++------------------------ include/linux/fs.h | 1 - mm/shmem.c | 4 +- 3 files changed, 79 insertions(+), 88 deletions(-)