Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7297660rdb; Wed, 3 Jan 2024 10:50:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IFt6dchc+0NDAOx6vh8g10fsUVe4RrMbLeGkjAqQpo3Z4odF8Oi1KSHYOiz+2x7PO2MFLgM X-Received: by 2002:a05:6a20:b892:b0:191:2dc7:573b with SMTP id fj18-20020a056a20b89200b001912dc7573bmr7621753pzb.43.1704307812970; Wed, 03 Jan 2024 10:50:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704307812; cv=none; d=google.com; s=arc-20160816; b=xn9DVILtq8IZUAHl5PwHKlfl11NM0DK4hHUO5QaxB5iU39QAr6LirtL2RWIY9TvOzB FcS8gyVmcqkxsmi7kPJtEYmIO5g/zXuvJKOVz4jtttWIDMPRqMNOhXO/NVPjdHTegiH8 HxZvCn2AxixTSUrBiIQRGA3rWLKEgTAZ0E5Qr7CsSmxMv2UC0qwTmUamGYxojvxPzfrx qm0AwYIxkZcaniykhVShS3BE3VfH5V91/l0TnzjrwWi4l6UYJ0wSDz11UnO0z2jguwRc e4B8CZ0ZU+fGuRDp7Ykkek6fjijoaT93ddhEfsAxipSqWBBbWaE/uaT5nhJiiOpyWtnC qEQw== 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:references:in-reply-to:message-id :subject:cc:to:from:date; bh=hYj5OHKNIasm/1tYBWjHKWK6R5BrBfI2cp48W5Houxc=; fh=4uGWVBa6SM8sUgNLxca8mly5JFVXydTHZIZdzGgOIdo=; b=P2iiaf696mvEAoZfMpbytXsFWQN2Er4L5w5ZdQZwvEpjEvWFWAaotUSG+MLOyIz9Dd ZOkzBH2aGvA4bESV8AKAaugWtzeSqG7fFEjNHTQH93AE7lV63vs9PWwWqCjBLNtvJrXV yhcczqqU9vGfTSgntwdb3xDnTJ1Q0PNUs1fBmigArQfZfRbUoXSYqXIaxmqSJS+2GgyH THhb3xpUwoIf30uhgrhuABIqudUyEcB0MYBqDzsKWj6uCTy3wx6bRsBeTkb2rzMIzbAw gvdt3awvkDJRMQ+XRqAbs2smAWG/aaNukax8DRe2t8R8bXIECEglp2SPcm/kFVs1DQJF 9UGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15883-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u14-20020a63234e000000b0059f0cebd04csi2962049pgm.722.2024.01.03.10.50.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 10:50:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15883-linux.lists.archive=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; spf=pass (google.com: domain of linux-kernel+bounces-15883-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15883-linux.lists.archive=gmail.com@vger.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 505BC285AD3 for ; Wed, 3 Jan 2024 18:50:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D7301CA90; Wed, 3 Jan 2024 18:50:00 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org 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 3204D1CA82; Wed, 3 Jan 2024 18:49:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16542C433C8; Wed, 3 Jan 2024 18:49:58 +0000 (UTC) Date: Wed, 3 Jan 2024 13:51:02 -0500 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Mathieu Desnoyers Subject: Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents() Message-ID: <20240103135102.38352956@gandalf.local.home> In-Reply-To: References: <20240103102553.17a19cea@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 3 Jan 2024 10:38:09 -0800 Linus Torvalds wrote: > On Wed, 3 Jan 2024 at 10:12, Linus Torvalds > wrote: > > > > Much better. Now eventfs looks more like a real filesystem, and less > > like an eldritch horror monster that is parts of dcache tackled onto a > > pseudo-filesystem. > > Oh, except I think you still need to just remove the 'set_gid()' mess. > > It's disgusting and it's wrong, and it's not even what the 'uid' > option does (it only sets the root inode uid). > > If you remount the filesystem with different gid values, you get to > keep both broken pieces. And if it isn't a remount, then setting the > root uid is sufficient. > > I think the whole thing was triggered by commit 49d67e445742, and > maybe the fix is to just revert that commit. > > That commit makes no sense in general, since the default mounting > position for tracefs that the kernel sets up is only accessible to > root anyway. > > Alternatively, just do the ->permissions() thing, and allow access to > the group in the mount options. > > Getting rid of set_gid() would be this attached lovely patch: > > fs/tracefs/inode.c | 83 ++---------------------------------------------------- > 1 file changed, 2 insertions(+), 81 deletions(-) > > and would get rid of the final (?) piece of disgusting dcache hackery > that tracefs most definitely should not have. > I'll look at that and play with it. I understand VFS much better now that I spent so much time with eventfs. That commit had to do with allowing OTH read access, which is a security issue as the trace files expose a lot of the kernel internals. I think these changes are a bit much for -rc8, don't you? Or do you want all this in before v6.7 is released. I'd be more comfortable with adding these changes in the upcoming merge window, where I can have more time playing with them. -- Steve