From patchwork Fri Feb 2 02:29:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 19812 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp164834dyc; Thu, 1 Feb 2024 18:31:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHt6/vvafgImWhJ26BqTEz4i2NJl/ROph4szQ8EGBkkZ3UCvroTBXbFQWLQ9LyBFm2aaif1 X-Received: by 2002:ac8:59ce:0:b0:42a:5cd2:875e with SMTP id f14-20020ac859ce000000b0042a5cd2875emr4483454qtf.68.1706841060604; Thu, 01 Feb 2024 18:31:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706841060; cv=pass; d=google.com; s=arc-20160816; b=chraVYcPamhmGS36L8Hv6aURA4xWVn94Oy5twVEUUpve94eNSpqCm3ZJWocI4jLtDF 2Z21zOhzZVLbDQcixOH9SucJGEsONnVvGjjXLa9YhshLfYw07oVnX8c7uRFgzUf4U+q2 zqx5pk6u+rLHK3L1Sq2GzYtwOR+W9sBME0UduwdenDaXAiBk7bSACtpgFFmSnNzFvELH 4amQdxK4Mp1ObIpznPM7P4pSBDn3t6Xnb2wKHdhFB/hC2rD1vodcj41Q4ekpv3XM7XVh cpIwlJsVEASDufx8zahkCOfpSZe6VKQqOs1iSnHhth8COehpO4/ol/lL4vBfCmFag4HD QC2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:subject:cc:to :from:date:user-agent:message-id; bh=BfWsVdubo9Ou3ce77iVdsiGcXo0HLHzYbwrDGQYAqRk=; fh=OMACKwjT+CGF2taCXRnVS6hnvG73cAzYvgoZPOoqtEs=; b=Wm9S7PGa5OHS2/iFXXLPvAN592UnKL7G4NPWNFn6itTYpaorpddDl2nhYANj/JSULk xWbd9HD9nD8en565FaK5f5jWlbs2DEo+8JCQV19d7bJOEtOIMSKTu7Sa1VTIUmznfsbv vnBba/0b81kiQRwCCv9os2ES4862oKMLd68fsV6RwIvimB8oWIcFNQmzzW50mW9WDoHk 6lBJ8np9las32tnK+J8NoS2EbnFq4KF4VoZ+vId299eOZoVGMz194Rd+CgVXP0UlcfOn NiYaYGllSE2feShfDOcj7i50gJD6+F4zQ6leZ8kmcuVPYSGhOm7UTh1c6Md7tde0vuq4 2mpQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-49093-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49093-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXCQWv0Lxz7ScEew4cIuRQPYILJht1trtwFCYhsKGYJBiRmbuT/pOdT8Bp1CToAq7InrVgTc9sgCg0aombVaR4hXfWbOw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y8-20020ac85f48000000b0042bf2daecacsi972755qta.668.2024.02.01.18.31.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 18:31:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49093-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-49093-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49093-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 670961C22D76 for ; Fri, 2 Feb 2024 02:31:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56DE9FBEC; Fri, 2 Feb 2024 02:30:06 +0000 (UTC) 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 978B1BE45 for ; Fri, 2 Feb 2024 02:30:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706841004; cv=none; b=EleVUKC9AnVBTAkOfAgn+U8+nEI+So+QsXcawcsZfSbVSH5qJgZNtiK+OsaGMRgAaQaCOG/qTOtDJSTD2jLJOPwtdAVB1VCfJxOwMq8Nx6Sp/rBBv3w64RYJlSToI59mOrWBg7R1/Z18QxEfIzyp1lqJtfT1uTw1HzVjxNHRB6M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706841004; c=relaxed/simple; bh=L7UKyYj5KjMqGT1j6b5MsTl6o7rGSW9N6vE3FK5am6w=; h=Message-ID:Date:From:To:Cc:Subject; b=QBURq5qhI+khKx5nC2TPaZGo1MJWMxs7TSkSfT0ZYLtWwhKfky4fF61cMnTie/JVvXUxoPnGzu2eHlGiZTKW8nNo8WwlcXuaWJp17J8tGSJXagJaTVSw5SMwl1SM5/WeEs5LqziHgrv/BgfCVbau+68wUlJdcyGNYoztQ/pCxgU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F74FC433F1; Fri, 2 Feb 2024 02:30:04 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rVjJu-00000005k5e-0FPZ; Thu, 01 Feb 2024 21:30:22 -0500 Message-ID: <20240202022959.515961549@goodmis.org> User-Agent: quilt/0.67 Date: Thu, 01 Feb 2024 21:29:59 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [for-linus][PATCH 00/13] tracing/eventfs: Updates for v6.8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789752571842470724 X-GMAIL-MSGID: 1789752571842470724 Tracing and eventfs fixes for v6.8: - Fix the return code for ring_buffer_poll_wait() It was returing a -EINVAL instead of EPOLLERR. - Zero out the tracefs_inode so that all fields are initialized. The ti->private could have had stale data, but instead of jus initializing it to NULL, clear out the entire structure when it is allocated. - Fix a crash in timerlat The hrtimer was initialized at read and not open, but is canceled at close. If the file was opened and never read the close will pass a NULL pointer to hrtime_cancel(). - Rewrite of eventfs. Linus wrote a patch series to remove the dentry references in the eventfs_inode and to use ref counting and more of proper VFS interfaces to make it work. - Add warnin to put_ei() if ei is not set to free. That means something is about to free it when it shouldn't. - Restructure the eventfs_inode to make it more compact, and remove the unused llist field. - Remove the fsnotify*() funtions for when the inodes were being created in the lookup code. It doesn't make sense to notify about creation just because something is being looked up. - The inode hard link count was not accurate. It was being updated when a file was looked up. The inodes of directories were updating their parent inode hard link count every time the inode was created. That means if memory reclaim cleaned a stale directory inode and the inode was lookup up again, it would increment the parent inode again as well. Al Viro said to just have all eventfs directories have a hard link count of 1. That tells user space not to trust it. Daniel Bristot de Oliveira (1): tracing/timerlat: Move hrtimer_init to timerlat_fd open() Linus Torvalds (6): eventfs: Initialize the tracefs inode properly tracefs: Avoid using the ei->dentry pointer unnecessarily tracefs: dentry lookup crapectomy eventfs: Remove unused d_parent pointer field eventfs: Clean up dentry ops and add revalidate function eventfs: Get rid of dentry pointers without refcounts Steven Rostedt (Google) (5): tracefs: Zero out the tracefs_inode when allocating it eventfs: Warn if an eventfs_inode is freed without is_freed being set eventfs: Restructure eventfs_inode structure to be more condensed eventfs: Remove fsnotify*() functions from lookup() eventfs: Keep all directory links at 1 Vincent Donnefort (1): ring-buffer: Clean ring_buffer_poll_wait() error return ---- fs/tracefs/event_inode.c | 568 ++++++++++++------------------------------- fs/tracefs/inode.c | 102 ++------ fs/tracefs/internal.h | 43 ++-- kernel/trace/ring_buffer.c | 2 +- kernel/trace/trace_osnoise.c | 6 +- 5 files changed, 195 insertions(+), 526 deletions(-)