From patchwork Sat Jan 13 12:31:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Brauner X-Patchwork-Id: 187899 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp735478dyc; Sat, 13 Jan 2024 04:32:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKHMtXbBNwcHtKS8HiWefuOQPzXGYmGCpoCJWg4p9D+Rm7o2g7NXyTmnJRMxc2/Nf0yPE2 X-Received: by 2002:a92:d0c5:0:b0:35d:59a2:bc4 with SMTP id y5-20020a92d0c5000000b0035d59a20bc4mr2711492ila.90.1705149159963; Sat, 13 Jan 2024 04:32:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705149159; cv=none; d=google.com; s=arc-20160816; b=sGXeOvZGX18CVa0mkU5G3Smm2qccA+0dIJNVkWliqOGg5Dvfvd7FHIuyx9s3GKp3dT +G4jCIT1EOZsJm8UKYcqvJsVkL3GYDj2o1m40q3zT50swjcbPkbgrREAFEMEV7EPnL2O qEoPD6TCV1LKP2t3ncJdok0Tn8wys44V/YHb82cd3sg7vND8I1+q18xS3sosmlt8VMYN N0KJHa+XIos3u6zTsjf33U+31Yd2+CGiNsmimFJv3ddQeLdhiKvWqXv3qlZd+bquIVr7 kH8CRFkMDDgzPz1g5tU63ykanzs5N2PL3oY/M5u6k7AAlTl+MCmjOrq4SPO7nerwIdWW X1eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=wCPSq0zC+W2156d/EGRzAB0PYEae0F1//2l4ZqY6hzw=; fh=qDZ+YnS9HJbCVOaeWFr2FnYZt7eE+vt5IJIDIlhBdxU=; b=xz3QJfJjEzvvermhm1IMidMK6FFIjYylQM3pudtj32MfJn59msfGd2yZfo3b78BI0x HTZKFn3IdJ849/WDv+qMfuTj8lKt/PBPjBa/Bolz6qD8nL3P1MifJS8ce8xznMFbLetv dZfn24DVCmrFv+3ITJotSwgpXGRI0zYYOpXz6cEU8iNZucZrv4f9hcedm4O6OfBDrsJi GGwrBKTshFnxoH0LVhiCj/lPG3OhjXQWQgde3ya4UEAAwn0EdK2fyBbwNQcdqz81+q/t MBVWTx+Y+YXUniuG5U5uSrTKf8fsm1VPP2HpTiyh5Yds3Dw+MkxofkDHqLTup/BqCuEq Cydg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g/TsCCds"; spf=pass (google.com: domain of linux-kernel+bounces-25284-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25284-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l73-20020a63914c000000b005cd84b844edsi5146864pge.604.2024.01.13.04.32.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 04:32:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25284-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g/TsCCds"; spf=pass (google.com: domain of linux-kernel+bounces-25284-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25284-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B767E284047 for ; Sat, 13 Jan 2024 12:32:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2DB021357; Sat, 13 Jan 2024 12:32:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g/TsCCds" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48BF1DDB5; Sat, 13 Jan 2024 12:32:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27AF1C433F1; Sat, 13 Jan 2024 12:32:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705149140; bh=t2Rxld++6LxnRpwfNKlxPU3qyMSRsXCrdRX2fXTMQdY=; h=From:To:Cc:Subject:Date:From; b=g/TsCCdsCF+lflwqOWfY7INUWUY5fC/ElZLV7OPSkr36g3WcP9fKzDVn6GokaV9PF 7MaalnZ1UF8Jq1uhfsrM3XYpOStwyW3hhsxVnav1vWBeZtIAGgkcSGJ6aO0l+5lf8X vO+Z4M1dtBzgfL1l/WRW5azB7GpTsraIupfkiyAdghRQcBz7UDpLpOyTZtVnPA325A NA9/Rz77/Kr3t/qCru/iZYM6VQKgiT/QKZdU9xqt1zWa5MXdJg5+2CbpFKh0hhi2K6 omgw1nVSk3Yi9xpGTzBVsXHMwfwFhbYakzVxPYdmzNTlxkZR6vnTD7ntDAU1Y7ZdHD iX9wdr6P4xBeA== From: Christian Brauner To: Linus Torvalds Cc: Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] vfs fixes Date: Sat, 13 Jan 2024 13:31:03 +0100 Message-ID: <20240113-vfs-fixes-23fdefd76783@brauner> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2763; i=brauner@kernel.org; h=from:subject:message-id; bh=t2Rxld++6LxnRpwfNKlxPU3qyMSRsXCrdRX2fXTMQdY=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaQuaupl28ihu1z4y++IddNjH131E9xoeoRDqz7lT6ID4 8IPj8V/dZSyMIhxMciKKbI4tJuEyy3nqdhslKkBM4eVCWQIAxenAEzE9SUjwwwL64WTVbrcDGxP RysL/zu78ZSAp8K1deo5bbsWXpJj8mRkaHz9LnLtkspvry/IRAgHrQxSCTywlrG061acfYarwuH l/AA= X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787978485253888010 X-GMAIL-MSGID: 1787978485253888010 Hey Linus, /* Summary */ This contains two fixes for the current merge window. The listmount changes that you requested and a fix for a fsnotify performance regression: * The proposed listmount changes are currently under my authorship. I wasn't sure whether you'd wanted to be author as the patch wasn't signed off. If you do I'm happy if you just apply your own patch. I've tested the patch with my sh4 cross-build setup. And confirmed that a) the build failure with sh on current upstream is reproducible and that b) the proposed patch fixes the build failure. That should only leave the task of fixing put_user on sh. * The fsnotify regression was caused by moving one of the hooks out of the security hook in preparation for other fsnotify work. This meant that CONFIG_SECURITY would have compiled out the fsnotify hook before but didn't do so now. That lead to up to 6% performance regression in some io_uring workloads that compile all fsnotify and security checks out. Fix this by making sure that the relevant hooks are covered by the already existing CONFIG_FANOTIFY_ACCESS_PERMISSIONS where the relevant hook belongs. /* Testing */ clang: Debian clang version 16.0.6 (19) gcc: (Debian 13.2.0-7) 13.2.0 All patches are based on mainline as of yesterday. No build failures or warnings were observed. I've successfully tested the changes to listmount with the selftests we added. /* Conflicts */ At the time of creating this PR no merge conflicts were reported from linux-next and no merge conflicts showed up doing a test-merge with current mainline. The following changes since commit 70d201a40823acba23899342d62bc2644051ad2e: Merge tag 'f2fs-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs (2024-01-11 20:39:15 -0800) are available in the Git repository at: git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.8-rc1.fixes for you to fetch changes up to ba5afb9a84df2e6b26a1b6389b98849cd16ea757: fs: rework listmount() implementation (2024-01-13 13:06:25 +0100) Please consider pulling these changes from the signed vfs-6.8-rc1.fixes tag. Thanks! Christian ---------------------------------------------------------------- vfs-6.8-rc1.fixes ---------------------------------------------------------------- Amir Goldstein (1): fsnotify: compile out fsnotify permission hooks if !FANOTIFY_ACCESS_PERMISSIONS Christian Brauner (1): fs: rework listmount() implementation fs/namespace.c | 50 +++++++++++++++++++++++++++--------------------- include/linux/fsnotify.h | 19 ++++++++++++++++++ include/linux/syscalls.h | 2 +- 3 files changed, 48 insertions(+), 23 deletions(-)