From patchwork Wed Nov 27 15:28:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13887142 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 5E7C2D6ACEB for ; Wed, 27 Nov 2024 15:28:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9736C6B0083; Wed, 27 Nov 2024 10:28:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8FD1D6B0085; Wed, 27 Nov 2024 10:28:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 775F76B0088; Wed, 27 Nov 2024 10:28:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 58BF66B0083 for ; Wed, 27 Nov 2024 10:28:22 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0191C120E72 for ; Wed, 27 Nov 2024 15:28:21 +0000 (UTC) X-FDA: 82832256150.08.258AC2B Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf08.hostedemail.com (Postfix) with ESMTP id 823D7160017 for ; Wed, 27 Nov 2024 15:28:16 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z2FL051Y; spf=pass (imf08.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732721295; a=rsa-sha256; cv=none; b=itNEHk0XascZ4+m+xf8enELPrF+77kyHf80zMRQNHJSo71viDT7TYOLtjRm3e6bJ9qH3Q5 /JXUNpPeSXkBHw2FKlVuF3sdt68rYGslcza5XlV6GfQrzSl389IRUrv7cQ/2w2haeYnca8 T7yPc73pEna1vmCPHJaKuHRGdKG6+c4= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z2FL051Y; spf=pass (imf08.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732721295; 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=mlYbau0CESiUqMg5cKDDCqxweZdn/A5/jLvi3Uj54Ic=; b=hV/6qYa9MLYvgGtz8+ZkbDfZZsD7sttNgzzWdRECfS0fXUodyUoLXC1qo5NCSOuQoPe6wp /LFaAeBFyfnVOc7GRPBCu5XvEfSTBxOGeA6QZ8jdkxm8GsvcD2tzUWoCFp3+G4J4hShsF3 wwH0l1SxK/499oVTjd6uYMsB6tzC//g= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id ED9695C271F; Wed, 27 Nov 2024 15:27:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15BBEC4CECC; Wed, 27 Nov 2024 15:28:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732721298; bh=vXhuu8rWP5D+ziEau8olQkqdACNIZwl52zw9hI088Vc=; h=From:To:Cc:Subject:Date:From; b=Z2FL051YCIyRNmn27VcXND5Be/mAo5STigC1vMG9m02EQh4xkRM7QuvszoifZYSia beMo/tzLVEvGtVbwp+YJQ9jNvooZu7pRvqfYvETf8Sj9S3jPI8s5JW0J50uWU/wavf MidUt+hrJBk1GKJRDRcatricXEFQ/zaD54tD5waD+iZU2JmI7NmGRs0QtChnu9GdU8 Rmwrug/8aCE2UameeOEQf0p72t7dGvV9rDiejyzQehcFEd3pESoSFn1TiN+MuoHNR5 HZLZBfVHoVCprtg0E1GK/Ufi8qeof51OCekhY4FHgYIAuNccyvDD5JULpBhV8Oa0NH iQb5MKTsWDnWg== From: cel@kernel.org To: Hugh Dickens , Christian Brauner , Al Viro Cc: , , yukuai3@huawei.com, yangerkun@huaweicloud.com, Chuck Lever Subject: [RFC PATCH v3 0/5] Improve simple directory offset wrap behavior Date: Wed, 27 Nov 2024 10:28:10 -0500 Message-ID: <20241127152815.151781-1-cel@kernel.org> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 823D7160017 X-Stat-Signature: xrbywkc4kf75wqiqygt386w9e5s74mxn X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1732721296-719426 X-HE-Meta: U2FsdGVkX1/OyfJobW6NuV23eoNjXBYanngqFB9xutmsIG/uy9hBgq67QOYu+K1oHLag9PIeQPfyM0+KR1b7vcVLKjAjswaZ5EswMxXBL+likZBF0AWwpAmIRoXvrrd/Kb+k1iPohfqDxcOEyROL6sOMjxshOFyD14wNP29xHyLASDm/4RejUG3/H/mntIzLkznVUW8bWHg7zR3F9ax3A+ODS3jbrbL82tIlil/g5VeLRzvtMTy2HShiWVFiwxKVU38dphfoZmT+ji6dgpUScgkY5ruiAvcmh+Fi5QmwMMiwxG4DWvx84EVsQgs3u1OCMilheq5wbX0ZC/vRfNvWY8IrnOjbHLTJdlmB7+jtZqewLw4VGGjoiJ1E+mej32s2yycUslnIhLI56oIbAN5DrGRqy3cJBb0CNeWuoRsQANTMhVnpgSL+L8iQ0HEu+gVzRy+gxRJJm7zIWt8KAPi82ENZaBr4eSwPrxCbNjO7cPaEFSPD2zkKbFCvKUEgWyTc5Fu4stIQnit8bcSyJI6pGldJnpRBMVqDk7GTq6DbUi33xo8qGb43g3JGEsR2639TyQ3XthsjPFckoq1V3z2iFE6V01boJYXG0miSva4C9YBB+Mwv/MVQsDZ91A/DDecABQUxS1vxtwAbi+AzsnJQW97b2J27XOT8/ibv5JJvVEj95Mi1I5j97VbmjzKQ9AdV2k4+8pHQYnF+4MgkcRInTcP8zF980pw8EGqYwl3+aPyxFzbk7u7Sc1IZPncKHSG1WXeeQLzoz1TSEAKAL9UlFRvqjCeolEzGKR8h4aOoCTb8sCQOAQw1Qiemdk++SD4rtHFQmadSxupdLyLAG9Kt7TjVcJVF+dM/kKSVEfOokaM/WmqU6BG9M84X1NO7EBx8uHlA8BfL3DXenp72vHQ2U9A5RvApmW+n32p/0rxOaOWC5OkJ9SWd8b434gc0FycA2DCLcoy/L5Ex4rrX1Gt E4q1GrHy Bk8RD/hH9k0LMmk7EZfUqbwAfAZnkCZwPkTJ1TMYvaga6+EP8pVA/qYM+utSijXvGvRfwBIIuVygL1huNbRuw/65Q2bDHN2GYu1LVW/yo85tjUMCmZJejC4ayCCKlFjW7YvTDHFFuuANWJfdQW6kjDfBfJk4JadOVsbdZkpTSwLG1hGdodf55Tpr+KcHuHBT/kVyYDC0tcgXRKUKJAY10D1qaa+mdNrync+kFy2whiI8q3K1H4a72jXmH0rOzRb0F/xg8 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: From: Chuck Lever The purpose of this series is construct a set of upstream fixes that can be backported to v6.6 to address CVE-2024-46701. The v3 series updates yesterday's v2. Some bugs and review comments have been addressed, and the rationale for reverting 64a7ce76fb90 ("libfs: fix infinite directory reads for offset dir") has been clarified. v3 passes xfstests except for generic/637. The series 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 libfs: Remove unnecessary locking from simple_offset_empty() Revert "libfs: fix infinite directory reads for offset dir" libfs: Refactor end-of-directory detection for simple_offset directories libfs: Refactor offset_iterate_dir() fs/libfs.c | 145 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 107 insertions(+), 38 deletions(-)