From patchwork Mon Nov 20 20:54:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 16824 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp210923vqb; Mon, 20 Nov 2023 12:55:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFi4bOLoB9ftV7eJUzQF3lw+XdMalqfLvpbMQ34xqzsXshgC3SgacP/dtHjDID3iTZBAMyf X-Received: by 2002:a05:6a20:12c2:b0:186:736f:7798 with SMTP id v2-20020a056a2012c200b00186736f7798mr11689986pzg.11.1700513707896; Mon, 20 Nov 2023 12:55:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700513707; cv=none; d=google.com; s=arc-20160816; b=gcxJAkdA+O1v0syEvkb8V8I7yv9WE+DB6ZJ3nvjKLKqE4atnQ0pjSbu0xlxZ5aTqGT 1IMoq7lnVNRSooxCm4gwuClLIrLlfM+y5gSuW04ZfGiLVcwhM+kQ4MTxx9rL1CufxV8S AuL1fu93t3Wti82cGWMmGDBiUqaflRHf5F4QXkk0sTKDL7hAKjRqMTu+ey/8zrza/VS/ HcAucHfaAUKqdAhUUJlJtHJmLRe7u8+MLxVF7m2CSjk6eBCBBPqs15piIGQur/XjEH+Y WdNMzZ04nCTX/3L/WoEoBSzDNzEhuDXuu6zZ8O6ufOZtWr79n8THlX3/RSmV8JyhIkVi rmiQ== 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=yMKFaFXflAGEYRhU+0jq6H+RcbkYM/OqjBR+KnGusUU=; fh=eOMogfSF878ufYkt0L4uWljHy5mh4PI9ZQ0dHv9+wgk=; b=K3qSKp+cDUChCITBQI2ZWGwBOEHVxACwqOwn4kQEzou8OkLWatqUcZ+ZxVFsNinVwZ kThLCtJNcYmH8LH/+boMbKQdKNsJeQhxEgWS2pwW8fF4Xveh+Ic6EyMQ7ogQl/8PLEaF imhmAG6NkU/aYqTBGauKwz2fS5ZhL78D6tM9CjQSAa5NtCQX50CzmhrjrzcIZuOfEARL 5iVhBN5u+jZM+tX3TjDvzQyd9K7rM1R85y4M58N0B6k624zF27sXECBXvQeYjU8s5w+f qoAlsoC9laqQSqJ0h5zK8cvg2DetkE6yLqsdKOtmS+/1o2JH4p3obEnbvdB8Z/VuxOLF icZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=oYwtD125; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k5-20020aa79985000000b006cb912b847fsi3053848pfh.123.2023.11.20.12.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 12:55:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=oYwtD125; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 C7CF3801CA4C; Mon, 20 Nov 2023 12:55:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232045AbjKTUy5 (ORCPT + 27 others); Mon, 20 Nov 2023 15:54:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbjKTUys (ORCPT ); Mon, 20 Nov 2023 15:54:48 -0500 Received: from smtpout.efficios.com (unknown [IPv6:2607:5300:203:b2ee::31e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5E76D9; Mon, 20 Nov 2023 12:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1700513679; bh=Mwcrf7oCSr2SVBqlstcAk4xBZt9a0mnoM+Aqfdmqy4Y=; h=From:To:Cc:Subject:Date:From; b=oYwtD125nVYe+W0MB6r2XUkNf2OqQfo1fdqm1SiyZ1g8prH/T3lehBW6dvqWaJxLg Ya4de9QXlqN5ZN+WKw7LNhiX+032moApXuo7G5jt7iCmg2H+STvj+x46s/uzM5nU6l iWsX/oOQx1ud0tfJmObypf9XhvuWlh6l/vF9T6VCyUB8uxSV+vKc8SCD6TutnciQpR /MVFp6Y7lVCQHd8SqoSBycvGvLrvk4pGX0xEU8d5ABjm77/Kw4hWtbCR7wN0DLZiXM 0ZNkIhsgmq5ImQSC4KMj3kgLGtjL6AX60svcEAQtnXU1clDXSJx239MljyUiIc+wZk k9ro2z+tJWnjw== Received: from localhost.localdomain (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4SZ0B7031Nz1cX5; Mon, 20 Nov 2023 15:54:38 -0500 (EST) From: Mathieu Desnoyers To: Steven Rostedt , Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , 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: [PATCH v4 0/5] Faultable Tracepoints Date: Mon, 20 Nov 2023 15:54:13 -0500 Message-Id: <20231120205418.334172-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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, 20 Nov 2023 12:55:05 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783117861598847474 X-GMAIL-MSGID: 1783117861598847474 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. I have tested this against a feature branch of lttng-modules which implements handling of page faults for the filename argument of the openat(2) system call. This series is based on kernel v6.6.2. Thanks, Mathieu Mathieu Desnoyers (5): tracing: Introduce faultable tracepoints (v4) 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 Cc: Steven Rostedt Cc: Masami Hiramatsu 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 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(-)