Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp357522lqo; Wed, 15 May 2024 17:52:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZBm17GdOzj2ILC8DGoY3jRLvQCg0XQXXOOIg2rETAQ6xDAJSjT9m+jOjnOERtMEkcnr6cMkytZTB6SOO0SIZ22NCwmCTZWycHtoHvXg== X-Google-Smtp-Source: AGHT+IHQPlbd5gmSM6NWh3WZu+MKypuKjC3XvQPbm44fS5BQdQI9SbU+APgo9rL4oDpb9gMychNk X-Received: by 2002:a17:902:c947:b0:1e5:5760:a6c1 with SMTP id d9443c01a7336-1ef4318d79fmr264243865ad.21.1715820749116; Wed, 15 May 2024 17:52:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715820749; cv=pass; d=google.com; s=arc-20160816; b=ZiTXu6zMxWjGkGAZpV8Swi+/CZHdvU+Z1CcLdkL62qWXaZPpo6M6Yv6GxEnA7IP1Ps hpuu0MMDdzP6jvHKADr2tLZFm/ZZOiXVM3cswxpHuGgI5O2I12U0LE3TcC675Di+DHGa OCj51/TqUClF2DXuuGSY947aF3kTPEGUQbxZWY3D1G40Qls1A7v/pa/WG2IVITAKQCnF 9Vgf5KdaPf1dpjyltmH6a2nXQaUdFt5vFsA/YthGBL2G4tvuNsj/SOR78fpnI/4yraH1 k2ekP7kE8dpbiY8mjnosltLqcJPVqM445xUR3CHjssqT0QPBETKpDqNMt+luiz2Yntf1 8S6g== ARC-Message-Signature: i=2; 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:subject:cc:to:from :date:dkim-signature; bh=c8GXya9wAb+viBZwCoyW7sr/Q+wgw73P+OlshQwAStM=; fh=XlMQKSbD9IcAmbd6sW5aJ56gAudSfjykkPmkX9ayNRs=; b=ACx6cDU6cJV8kIf3f4oBwbpILDgmtdmZrAQ1sK1I8YlG020sUARPWbcvEXFI6yEIvL jLQiPQz9/VRiDVnW3yViVJqcABse80oWL3qN7VEuLkjrn7vJEcgKNIdUsgUqj7eb25Vi 1yiSRceVe0NwTwjU4SvupICAHRV4BNbsAs6vlrTF/TKOhZqJbog0Z0sUlzB7277cDWVp Pl9olrXWlESQ9PiS3Q4Yvcoh8Clqp6QnIw9cYuQZurzzanCGNPJSTMktAP3jq1ez4iFm 3LT4FHHKCuY3LnoB83MdyVhTY02m5YuLjqSBUQd9KgjGw2p6fhwIUYzQsmt1UAtmfQOL /cng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cCo7iv5A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180522-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180522-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 d9443c01a7336-1ef0bf32a00si146119975ad.216.2024.05.15.17.52.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 17:52:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180522-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cCo7iv5A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180522-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180522-linux.lists.archive=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 AA447283DD8 for ; Thu, 16 May 2024 00:52:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2D4610F1; Thu, 16 May 2024 00:52:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cCo7iv5A" 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 C22EB7E1 for ; Thu, 16 May 2024 00:52:21 +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=1715820741; cv=none; b=DMWQIw1c3727dPpxWVdm8XIE/o7vIbPnaCRTS3/F0tbE4LmqGdcfnB1f4TOVW/eD5sYYNGcVdVQ6njSMbriBQ4v7EDzhbloUXzoYLOI6RK37NQN9+r/zJSRI7e2J65mO17nZuW/0sjXw8HGV8q8XrXukHTEW+dHnechLAjynECg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715820741; c=relaxed/simple; bh=MQChwxKevYNr8Xg3kmsYXwROXzpolSJQuiBbTDSvSYk=; h=Date:From:To:Cc:Subject:Message-Id:Mime-Version:Content-Type; b=EDV9bVfJMHCX53ehJVtM92Td1OMf8Kg71CYlUbysW8dWE5V70pd99AJ9htPG6HokDYXqfNFsnKh7g2Xy1ZtZKuUsYZOv3saiUkJyUJXCGnRkstxLLylVwbQ56k+OXNybjJx2S6vghR89ySNnPEqGY1J7caR2J8yoVAuwNpdXNnQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cCo7iv5A; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B468BC116B1; Thu, 16 May 2024 00:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715820741; bh=MQChwxKevYNr8Xg3kmsYXwROXzpolSJQuiBbTDSvSYk=; h=Date:From:To:Cc:Subject:From; b=cCo7iv5AR9P3RbcFteeyuA/PH4M7SM/Vx3x9DExTPnpozu9/QecLwzeqSvSjCj9+T eIDm++0m00yFX8DVrks/UA+rUW7d/y5BBw1LO1uMRsQyqELG9flY7XO2H2d1AoI1kc RyUnQYGejIT3xz1hP5ph/5fVjTHivV+GaK5WIAN3TcZCpHHXVBAxDO8boWl8q3zYay IsQNGjMo1Dhs8s6jc6M+yEqxSEcyMqApj+OybOmggRxl8Y/j3bvy/gBKwkh1hkOabw 5cFIQQaxnKYhfC5bdEBC1/3vGUDOwTjsU/8Dp0ATO0i78z7ejWnEpgPMDwv3C5YNIp 2c0k6nFt1tWQA== Date: Thu, 16 May 2024 09:52:16 +0900 From: Masami Hiramatsu (Google) To: Linus Torvalds Cc: Andrii Nakryiko , Jiri Olsa , Jonathan Haslam , Kui-Feng Lee , Masami Hiramatsu (Google) , Stephen Brennan , Ye Bin , Steven Rostedt , Masami Hiramatsu , linux-kernel@vger.kernel.org Subject: [GIT PULL] probes updates for v6.10 Message-Id: <20240516095216.ac9a0fd13357450cc5f2e491@kernel.org> X-Mailer: Sylpheed 3.7.0 (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 Hi Linus, Probes updates for v6.10: - tracing/probes: Adding new pseudo-types %pd and %pD support for dumping dentry name from 'struct dentry *' and file name from 'struct file *'. - uprobes: Some performance optimizations have been done. . Speed up the BPF uprobe event by delaying the fetching of the uprobe event arguments that are not used in BPF. . Avoid locking by speculatively checking whether uprobe event is valid. . Reduce lock contention by using read/write_lock instead of spinlock for uprobe list operation. This improved BPF uprobe benchmark result 43% on average. - rethook: Removes non-fatal warning messages when tracing stack from BPF and skip rcu_is_watching() validation in rethook if possible. - objpool: Optimizing objpool (which is used by kretprobes and fprobe as rethook backend storage) by inlining functions and avoid caching nr_cpu_ids because it is a const value. - fprobe: Add entry/exit callbacks types (code cleanup) - kprobes: Check ftrace was killed in kprobes if it uses ftrace. Please pull the latest probes-v6.10 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git probes-v6.10 Tag SHA1: 9c42dca969de36a7aaa9573844a863bb306dcafc Head SHA1: 1a7d0890dd4a502a202aaec792a6c04e6e049547 Andrii Nakryiko (7): uprobes: encapsulate preparation of uprobe args buffer uprobes: prepare uprobe args buffer lazily uprobes: add speculative lockless system-wide uprobe filter check ftrace: make extra rcu_is_watching() validation check optional rethook: honor CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING in rethook_try_get() objpool: enable inlining objpool_push() and objpool_pop() operations objpool: cache nr_possible_cpus() and avoid caching nr_cpu_ids Jiri Olsa (1): fprobe: Add entry/exit callbacks types Jonathan Haslam (1): uprobes: reduce contention on uprobes_tree access Kui-Feng Lee (1): rethook: Remove warning messages printed for finding return address of a frame. Masami Hiramatsu (Google) (1): selftests/ftrace: Fix required features for VFS type test case Stephen Brennan (1): kprobe/ftrace: bail out if ftrace was killed Ye Bin (5): tracing/probes: support '%pd' type for print struct dentry's name tracing/probes: support '%pD' type for print struct file's name Documentation: tracing: add new type '%pd' and '%pD' for kprobe selftests/ftrace: add kprobe test cases for VFS type "%pd" and "%pD" selftests/ftrace: add fprobe test cases for VFS type "%pd" and "%pD" ---- Documentation/trace/kprobetrace.rst | 8 +- arch/csky/kernel/probes/ftrace.c | 3 + arch/loongarch/kernel/ftrace_dyn.c | 3 + arch/parisc/kernel/ftrace.c | 3 + arch/powerpc/kernel/kprobes-ftrace.c | 3 + arch/riscv/kernel/probes/ftrace.c | 3 + arch/s390/kernel/ftrace.c | 3 + arch/x86/kernel/kprobes/ftrace.c | 3 + include/linux/fprobe.h | 18 ++-- include/linux/kprobes.h | 7 ++ include/linux/objpool.h | 105 ++++++++++++++++++- include/linux/trace_recursion.h | 2 +- kernel/events/uprobes.c | 22 ++-- kernel/kprobes.c | 6 ++ kernel/trace/Kconfig | 13 +++ kernel/trace/ftrace.c | 1 + kernel/trace/rethook.c | 4 +- kernel/trace/trace.c | 2 +- kernel/trace/trace_fprobe.c | 6 ++ kernel/trace/trace_kprobe.c | 6 ++ kernel/trace/trace_probe.c | 63 ++++++++++++ kernel/trace/trace_probe.h | 2 + kernel/trace/trace_uprobe.c | 103 +++++++++++-------- lib/objpool.c | 112 ++------------------- .../ftrace/test.d/dynevent/fprobe_args_vfs.tc | 41 ++++++++ .../ftrace/test.d/kprobe/kprobe_args_vfs.tc | 40 ++++++++ 26 files changed, 406 insertions(+), 176 deletions(-) create mode 100644 tools/testing/selftests/ftrace/test.d/dynevent/fprobe_args_vfs.tc create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_vfs.tc -- Masami Hiramatsu (Google)