From patchwork Mon Oct 2 20:25:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 14833 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1736283vqb; Mon, 2 Oct 2023 15:55:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE57wSTSFeG7iTdyksHgmtNE6vIxJNuT/2thK3OXukeJ2V2a9EaOvhHEcPrNhQPsE1Kwwqy X-Received: by 2002:aca:2117:0:b0:3ad:f6a2:cfe2 with SMTP id 23-20020aca2117000000b003adf6a2cfe2mr12130228oiz.22.1696287321717; Mon, 02 Oct 2023 15:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696287321; cv=none; d=google.com; s=arc-20160816; b=hod1BwRrxsyEUYzVq5k4Eqg+5an/y261uQBypcNIYqHaTX+Dffy7csYMiFO2HGG07y bg20h1svNCnrzfk/+/sTcQdahgVtRvhNvyUP5XEP2diN5GUS2meAduuLsfJtXxfZSQ5y jE2z9WXaft9NNIPJbp5F0DGb/afh/ZAsbtTeo1fOKSmTwXT7oz7IW+s3UTvfZ1pGTR6J SS1qRy7cK53hFf2m2Y1H6vsHGe4GHQGjhtIKWI1jRrhFvG0wIynd+ZdLJFN9LWxGoDwx aJ0VVIMQz5CAr7/djDDHTpMNROJqwzZ0MERCUO/eEN0He0nWsVFgjE8GfmGODlfkgWBK wyMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zpJb6iPZXLFOsUHLZU/cLyMXaNzsqNCFk0MfO+v07eg=; fh=185gnY/jvZ3KyhWEGKx2Ja9SQMRN/yWtD8bZTRNPBJo=; b=p3gDoGmsVZyxu6UkitWA98w4VQ9u+tsoul+UMX+8yKiD5vs/WJqoJjptrIM6yg54iK Rkuuxp52ngZp8mVQNnqIyeMnvMJLmsKXyWAoTOqfdShbT3C1i4iRKouFdcmTYbKGD8us SoPAQh13OREcqQWgK7iXUhXNqDbDmldUtWVb9C3Y1KwrtANQeh7lYUq2mbMZIeS5Popy 78ae80R38pAZUrnMLylAGdT0Dek35SxV1ttciQ2AhF20r9GlUUFsjqcwapm+DTRU4MkL vmWGe820KgAyjjpqpKyfSSzJA2Ojnk2kdSoNtt0lRjaqEEh4GGWt1ZCM/N1VOJS1of4X PbeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=diM2fCE6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bf15-20020a17090b0b0f00b00268278c51e3si8312457pjb.49.2023.10.02.15.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 15:55:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=diM2fCE6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 59FA28045978; Mon, 2 Oct 2023 13:26:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236292AbjJBUZ4 (ORCPT + 18 others); Mon, 2 Oct 2023 16:25:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbjJBUZp (ORCPT ); Mon, 2 Oct 2023 16:25:45 -0400 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75F2CE0; Mon, 2 Oct 2023 13:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1696278338; bh=3b0xY900x5Ga7B1Di/fAn9zUiD76TyAJd3fltNUcrkE=; h=From:To:Cc:Subject:Date:From; b=diM2fCE6voKFZTAhGB8J6dK6Lg7Ie3GlgN99Ma25jYPl4CdsZgwlVt0JqlWrsFEz4 uopRIz1U2p1e2J/FVKg5fDh8yJ61bPWG576Pb3dRD5N+IPwpqcXBzTAlYlr8NEZSA4 iukPfzwImQPPQhDlrYr6pDySh23oojfyi18F65zNQChaD/XZ+/U9WMAA0bo6kCg4nw eURkrWFA6t3GYt9BcgA46Xwk6Lktw2MFQsa0BfxctiZGz3rl1vd+sUnKb/yHf2ect/ CGBs63RpmiWrWD7FcSR6jkPUDi2YljOhZSwVhwG07LMVkOwrM9uM/cGj7pU6YPmX3V 0tx763L50jR7w== Received: from localhost.localdomain (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4RzssG4vbhz1V7n; Mon, 2 Oct 2023 16:25:38 -0400 (EDT) From: Mathieu Desnoyers To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Michael Jeanson , Peter Zijlstra , Alexei Starovoitov , Yonghong Song , "Paul E . McKenney" , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , bpf@vger.kernel.org, Joel Fernandes Subject: [RFC PATCH v3 0/5] Faultable Tracepoints Date: Mon, 2 Oct 2023 16:25:26 -0400 Message-Id: <20231002202531.3160-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 13:26:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778686174576887693 X-GMAIL-MSGID: 1778686174576887693 Wire up the system call tracepoints with Tasks Trace RCU to allow the ftrace, perf, and eBPF tracers to handle page faults. This series does the initial wire-up allowing tracers to handle page faults, but leaves out the actual handling of said page faults as future work. This series is based on kernel v6.5.5. Feedback is welcome! Thanks, Mathieu Cc: Michael Jeanson Cc: Steven Rostedt Cc: Peter Zijlstra Cc: Alexei Starovoitov Cc: Yonghong Song Cc: Paul E. McKenney Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: bpf@vger.kernel.org Cc: Joel Fernandes Mathieu Desnoyers (5): tracing: Introduce faultable tracepoints (v3) tracing/ftrace: Add support for faultable tracepoints tracing/bpf-trace: add support for faultable tracepoints tracing/perf: add support for faultable tracepoints tracing: convert sys_enter/exit to faultable tracepoints include/linux/tracepoint-defs.h | 14 +++++ include/linux/tracepoint.h | 88 ++++++++++++++++++++++--------- include/trace/bpf_probe.h | 21 ++++++-- include/trace/define_trace.h | 7 +++ include/trace/events/syscalls.h | 4 +- include/trace/perf.h | 27 ++++++++-- include/trace/trace_events.h | 73 ++++++++++++++++++++++++-- init/Kconfig | 1 + kernel/trace/bpf_trace.c | 10 +++- kernel/trace/trace_events.c | 26 +++++++--- kernel/trace/trace_fprobe.c | 5 +- kernel/trace/trace_syscalls.c | 92 +++++++++++++++++++++++---------- kernel/tracepoint.c | 58 +++++++++++---------- 13 files changed, 325 insertions(+), 101 deletions(-)