From patchwork Sun Nov 5 15:56:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 16262 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2192446vqu; Sun, 5 Nov 2023 08:02:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0eFaWnNbZbooe6/BB+00j7znTu03HRJwkMBJByaL+ofyQWv8xYWfzk/Z8Nsv/2MvA0vF2 X-Received: by 2002:a05:6808:a03:b0:3a8:7f65:a96 with SMTP id n3-20020a0568080a0300b003a87f650a96mr30317939oij.33.1699200123529; Sun, 05 Nov 2023 08:02:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699200123; cv=none; d=google.com; s=arc-20160816; b=Yt7dEeWYXxgc1ZQPHh4Oh6Ev/Gf5SUk4ARX4vsqzuaXI7urh4vcHo3djcX6hEYRl6i 8KuZPYEu4+ZpATofCZvpFr/WhugGeGZ6Q62h5V3RFWNpJCINiDObeDLba4ZedHwevRcp rAeEhZnK1MHuXKc/H4bavzo/DnAjSAthO2774Z7/OumK24lwS7rWEGtOKm+pP8Si9thG r7Z6sbskOsH+PTHvkBoxyEzm6Uyg2hG80f6WspoYXrHn3VunBIqpEu3p7fpdENEccwAx OeKa2GW9O0w0A0/u8ezCS0GtftI9LU+EwCWo36dbNB0qD6kjC8Y6mjhF33WwyreUT0iB ahPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:user-agent:message-id; bh=P73Ww10bjdfr0uVfA/wONMwKbAAHiy52i1ZVd+5izSU=; fh=K0exfPPhpCKaGrZIHuPBGenj+TGjsUZZs4zYTGhhPLY=; b=s+zx/l7lh0s4XR2TfC4orG91lpQKkydz1yAoVkvbIn8y3ywPbvZHaco1xHGB2grcMb MqVJSPKOC1a8pmrs1gnO2+OAHzpRqBj8fS6C2jwLHha4UV2Jv2Mc28U9ZasMU1JHzYuj 9qNqr1zrTR+yVYZl5lFcjpIFzn/kdln2305Cyeix2o5YRsq0WYZRX26ei4NoKV6SQAwX ff/82HAb9nggAczFfw9fwIDGb+ZNffM5QIOO/5B9D+ZZcfG7/oGRcPloPJ87e5crg0Mv ZuO5iXMCpP5vOiQ4tx00Rxk0xWYP4tbq9WsxQWEJVHPSCZtlNRFaysbdBv2N+rzTUvuX wBJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id r40-20020a056808212800b003af603d9381si2545691oiw.219.2023.11.05.08.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 08:02:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8238080569A3; Sun, 5 Nov 2023 08:01:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229569AbjKEQBn (ORCPT + 34 others); Sun, 5 Nov 2023 11:01:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKEQBl (ORCPT ); Sun, 5 Nov 2023 11:01:41 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51D9EDE; Sun, 5 Nov 2023 08:01:38 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02ECBC433C9; Sun, 5 Nov 2023 16:01:38 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97-RC3) (envelope-from ) id 1qzfZD-00000000CgE-1KNY; Sun, 05 Nov 2023 11:01:39 -0500 Message-ID: <20231105155630.925114107@goodmis.org> User-Agent: quilt/0.67 Date: Sun, 05 Nov 2023 10:56:30 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Cc: Masami Hiramatsu , Mark Rutland , Andrew Morton Subject: [v6.6][PATCH 0/5] tracing: Backport of eventfs fixes for v6.6 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 05 Nov 2023 08:01:55 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781740468791720323 X-GMAIL-MSGID: 1781740468791720323 Greg, Friday before the merge window opened, I received a bug report for the eventfs code that was in linux-next. I spent the next 5 days debugging it and not only fixing it, but it led to finding other bugs in the code. Several of these other bugs happen to also affect the 6.6 kernel. The eventfs code was written in two parts to lower the complexity. The first part added just the dynamic creation of the eventfs file system and that was added to 6.6. The second part went further and removed the one-to-one mapping between dentry/inode and meta data, as all events have the same files. It replaced the meta data for each file with callbacks, which caused quite a bit of code churn. As the merge window was already open, when I finished all the fixes I just sent those fixes on top of the linux-next changes along with my pull request. That means, there are 5 commits that are marked stable (or should be marked for stable) that need to be applied to 6.6 but require a bit of tweaking or even a new way of implementing the fix! After sending the pull request, I then checked out 6.6 an took those 5 changes and fixed them up on top of it. I ran them through all my tests that I use to send to Linus. So these should be as good as the versions of the patches in Linus's tree. I waited until Linus pulled in those changes to send this series out. -- Steve Steven Rostedt (Google) (5): tracing: Have trace_event_file have ref counters eventfs: Remove "is_freed" union with rcu head eventfs: Save ownership and mode eventfs: Delete eventfs_inode when the last dentry is freed eventfs: Use simple_recursive_removal() to clean up dentries ---- fs/tracefs/event_inode.c | 288 +++++++++++++++++++++++-------------- include/linux/trace_events.h | 4 + kernel/trace/trace.c | 15 ++ kernel/trace/trace.h | 3 + kernel/trace/trace_events.c | 31 +++- kernel/trace/trace_events_filter.c | 3 + 6 files changed, 231 insertions(+), 113 deletions(-)