Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7380250rdb; Wed, 3 Jan 2024 14:07:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEk1J5Me2ByuPZWr2QY21tT/D6dGMUWHY4KWIZ6c2/cEypLQhA7V4rn3dFLRalYP0m8o3pb X-Received: by 2002:a17:906:6d15:b0:a28:b6b5:51e4 with SMTP id m21-20020a1709066d1500b00a28b6b551e4mr382307ejr.119.1704319637011; Wed, 03 Jan 2024 14:07:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704319636; cv=none; d=google.com; s=arc-20160816; b=wd+wFlOge6BLnMMeRkP1o7+5aUboS6Ns7ck+gKwtx2jd/2Qq1YF88GX0bxNHzFeBKg 3+/8dD/3oa735kfIewLmOukxBMe/GHGiWFoxGXK1y6AxHYS7MNqZnu8XeeWJBK9pnQJt Q3cEKlJuU3HQytUROQdHBMGWlVeHIYFMr1PG73eFCQa2OCyJpzzxAMc24o6JeQhkgnoD WLMA6QNBFs8+1w7DDdO0kTVJT6joE4pr2p57axuZuozTXFJ6GHeDOljk//mAKBNf8VVn t4pUL224Jr8e1mi/bEUi5ikxhph+0SsybjF5N14btPAFTbIRrmNjSl45Ny7Wk17+kjP4 dulw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=SGTvqwTPDHKOw2dBon6pGIVG5u9VcyiSKusgLBhPCPA=; fh=fgaICQz76zZHp0eASD85TCOuTpy/GDMDzq73MouiQMo=; b=vC1O3lrtSjrfs3k8boCbt+K5wG+rc9Jv7ZRMdK9GorqECThKz1ds5387Aqy31O7RaV BV4E1jF0rnZHnfztTiao4wN0PdWrLduQZbHz1WSA2lSRSreKLmx8Ct5mJlBAsnI7AWKP yvdaqantpK2cfzIJaLiT56P2VbgPihGn+PSUa9rjUCQvg+UNk1M7vcbNBQwrVfVfq+F+ OVKK439sj7QGllAbvSZYIvC13bSOUcRvLjYofvVivtHpEujtZoQr7mlLkiS1rsJtxLFc nxiVOvVRYW9hjVfN57xj75qI5C+/ad+r3GUAvOTzP7W9i9ksRQdyvHO7EsIb8+pJNygb E5Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=AVDB1Z7T; spf=pass (google.com: domain of linux-kernel+bounces-16048-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16048-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id mz12-20020a1709071b8c00b00a26b02a74afsi5539126ejc.66.2024.01.03.14.07.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 14:07:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16048-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=AVDB1Z7T; spf=pass (google.com: domain of linux-kernel+bounces-16048-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16048-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 937381F25B6D for ; Wed, 3 Jan 2024 22:07:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AAE21DA40; Wed, 3 Jan 2024 22:07:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="AVDB1Z7T" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C91ED1DA35 for ; Wed, 3 Jan 2024 22:07:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-50e8ca6c76dso5710571e87.3 for ; Wed, 03 Jan 2024 14:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1704319623; x=1704924423; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SGTvqwTPDHKOw2dBon6pGIVG5u9VcyiSKusgLBhPCPA=; b=AVDB1Z7TGxLakr4zrO8x8Y8LlJAnX0UjP1UojpUwoSo3h1QnGqBouP6cj2kO1TIU9z V6SfvrbwNM3U7EsTN3nuDBxfXhLnMjX97P9E6qNGOtSHpuGhWb1iJmW9oLqFkWYzwpDL ofJ4xKn1aClRwHd8ioXNIhWigb69UwH+WcfEY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704319623; x=1704924423; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SGTvqwTPDHKOw2dBon6pGIVG5u9VcyiSKusgLBhPCPA=; b=wjz7bov9AuJfo0cIjUFdrEvtj+UgWDP09uNSUcJFlGeckSlVNQ6ZvM9N7r08KV3mzx JFeejJC3RMs9e91q13U4z2G5yBKoTC/PErbuIAHKQIBARkr/4GszAYD+ZEzShxMrurRn VQ/35DteVl548TYlvvErdCD/pINY1j8XZejmsQ6Nyfi/3T6JW/nSEefKJ1ep+2eC0vjV kYyVadV8m/K5onc0g4iorMzqi12nx7VAtxYNiNe5i4qQAQKnjXi3uuW0kvyE3LT9qV8Q PGZnCw0fsz0CLDGDIUarRfQjVr3EhBX+ibu1dmnjvTUVM0d55azbWX3zRRBZNeWAJR5g 7flA== X-Gm-Message-State: AOJu0YzPJ4bc2sldt4Hglwyc9Ut2JSS/8gOF1dBna2yxZDukMAU61WLi GEAV5s5glmZmmJhOCiZG6rmIdWoX/aPdYBCO59E0fWf6EHWssAli X-Received: by 2002:ac2:5dd8:0:b0:50e:74e1:144a with SMTP id x24-20020ac25dd8000000b0050e74e1144amr6634865lfq.15.1704319623783; Wed, 03 Jan 2024 14:07:03 -0800 (PST) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com. [209.85.128.54]) by smtp.gmail.com with ESMTPSA id mf6-20020a1709071a4600b00a26aa8f3372sm12523580ejc.27.2024.01.03.14.07.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Jan 2024 14:07:03 -0800 (PST) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-40d4a7f0c4dso102684645e9.1 for ; Wed, 03 Jan 2024 14:07:03 -0800 (PST) X-Received: by 2002:a05:600c:3c94:b0:40d:62fe:a160 with SMTP id bg20-20020a05600c3c9400b0040d62fea160mr5605515wmb.93.1704319622802; Wed, 03 Jan 2024 14:07:02 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240103102553.17a19cea@gandalf.local.home> <20240103145306.51f8a4cd@gandalf.local.home> In-Reply-To: From: Linus Torvalds Date: Wed, 3 Jan 2024 14:06:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] eventfs: Stop using dcache_readdir() for getdents() To: Steven Rostedt Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Mathieu Desnoyers , Al Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" On Wed, 3 Jan 2024 at 13:54, Linus Torvalds wrote: > > Here's an updated patch that builds, and is PURELY AN EXAMPLE. Oh, and while doing this patch, I found another bug in tracefs, although it happily is one that doesn't have any way to trigger. Tracefs has code like this: if (dentry->d_inode->i_mode & S_IFDIR) { and that's very wrong. S_IFDIR is not a bitmask, it's a value that is part of S_IFMT. The reason this bug doesn't have any way to trigger is that I think tracefs can only have S_IFMT values of S_IFDIR and S_IFREG, and those happen to not have any bits in common, so doing it as a bit test is wrong, but happens to work. The test *should* be done as if (S_ISDIR(dentry->d_inode->i_mode)) { (note "IS" vs "IF" - not the greatest user experience ever, but hey, it harkens back to Ye Olden Times). Linus