From nobody Sun Sep 14 12:39:27 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 664D5C004D4 for ; Sat, 21 Jan 2023 14:31:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229484AbjAUObd (ORCPT ); Sat, 21 Jan 2023 09:31:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjAUOba (ORCPT ); Sat, 21 Jan 2023 09:31:30 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0997339B82 for ; Sat, 21 Jan 2023 06:31:27 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id r2so7138560wrv.7 for ; Sat, 21 Jan 2023 06:31:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KPeFm3n4Sr3sAHF6AWYd8mgpdZVoIGrZ/cPna3eTTcY=; b=bPoGKWT6xsXVJNIZKOTBgctIUYofB3NfhmiwIlGClXZirxMz8mBZX7oH/4DrgHxK8t gmWDXlgQE6NSsv6IiAU2Z23na3bTZJb7j4m87QNCahfhpJG2TjnFO3FaYVQQxzbDP7Sh jHTZnqYDAQ1POFmVvFjbZ6Jw4YCFE5BdLgeuJQ9bwnS7T8qJLMu7mmcIryECosbDcov2 XfbB8LuRPMVHP5jARjlt+WWUcSxmmJSfJQf28PP9l+o1GHh5HmfDUdAjf1VBR07eRqyI YSnY9uunMNS2Uvhrb3b16h/oc3BZS2Vsj6g8Z/8YCD9Nejy2v8ZGEhlGM5vwoY/6UX6U tQqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KPeFm3n4Sr3sAHF6AWYd8mgpdZVoIGrZ/cPna3eTTcY=; b=vmkLRa8w2HxmaOU5pFIJM3sxuXai75Fv6reiiHvqDESQ8mVI8BXKzyBeC0pYFsdfIE EhkDM9bFWpzsmNcFgo+F2rbclJoJVq/1FVvs1BTluVNhIUsCJULQpS3RqCk58FBRRAoF BXckYyAJiy7p6kK4Iz6ijQ5v4DiM9OvHJFRKgKCDymN1Kv2bhMhxKrDGrjDH1NOSrMqs zuTwVvrFjzQgtnUdZck5AffXbeyFlO2QoYsydEaAIch3eYl0FMc2CLBXR/wYOhCQiFE0 V4hf3A/RjqbukfJWM08Bl31Ijos4p1Tb46XjbwYDfaXrfrYcLWIeIKQpGZXs9N4mQu3G dZxw== X-Gm-Message-State: AFqh2kpxW1czORP8+umIRZgQwrp0RsE5hAPX86h7mBeG0QxGiaNjwDLN 7Z8t/05feUEDA79PbKT6KwkZmQ== X-Google-Smtp-Source: AMrXdXtunu5LMrKDq+jQfC4rwEpPifHf4o+jr7K7DL5t05rz1b2p2OEcY49VUydhgC6ueu7zaVR5kg== X-Received: by 2002:a5d:5e85:0:b0:2bb:32bd:1dc0 with SMTP id ck5-20020a5d5e85000000b002bb32bd1dc0mr17120725wrb.58.1674311486439; Sat, 21 Jan 2023 06:31:26 -0800 (PST) Received: from P-ASN-ECS-830T8C3.mpl.intranet (89-159-1-53.rev.numericable.fr. [89.159.1.53]) by smtp.gmail.com with ESMTPSA id p8-20020a5d4588000000b002bdfb97e029sm16314604wrq.19.2023.01.21.06.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 06:31:25 -0800 (PST) From: Yoann Congal To: linux-trace-kernel@vger.kernel.org Cc: Yoann Congal , Steven Rostedt , Masami Hiramatsu , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v2 1/3] Documentation: kprobetrace: Fix some typos Date: Sat, 21 Jan 2023 15:31:08 +0100 Message-Id: <20230121143110.1706962-1-yoann.congal@smile.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230121142242.1706081-1-yoann.congal@smile.fr> References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" * Uncapitalise tracepoint * Hyphen in *-based * Plurals * fetch-args -> fetchargs * 2bytes -> 2-bytes * .. -> . * arch -> architecture Signed-off-by: Yoann Congal --- Documentation/trace/kprobetrace.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kpro= betrace.rst index 08a2a6a3782f0..1eb2c68aa0a71 100644 --- a/Documentation/trace/kprobetrace.rst +++ b/Documentation/trace/kprobetrace.rst @@ -6,16 +6,16 @@ Kprobe-based Event Tracing =20 Overview -------- -These events are similar to tracepoint based events. Instead of Tracepoint, +These events are similar to tracepoint-based events. Instead of tracepoint= s, this is based on kprobes (kprobe and kretprobe). So it can probe wherever kprobes can probe (this means, all functions except those with __kprobes/nokprobe_inline annotation and those marked NOKPROBE_SYMBOL). -Unlike the Tracepoint based event, this can be added and removed +Unlike the tracepoint-based event, this can be added and removed dynamically, on the fly. =20 To enable this feature, build your kernel with CONFIG_KPROBE_EVENTS=3Dy. =20 -Similar to the events tracer, this doesn't need to be activated via +Similar to the event tracer, this doesn't need to be activated via current_tracer. Instead of that, add probe points via /sys/kernel/debug/tracing/kprobe_events, and enable it via /sys/kernel/debug/tracing/events/kprobes//enable. @@ -68,7 +68,7 @@ Synopsis of kprobe_events =20 Types ----- -Several types are supported for fetch-args. Kprobe tracer will access memo= ry +Several types are supported for fetchargs. Kprobe tracer will access memory by given type. Prefix 's' and 'u' means those types are signed and unsigned respectively. 'x' prefix implies it is unsigned. Traced arguments are shown in decimal ('s' and 'u') or hexadecimal ('x'). Without type casting, 'x32' @@ -76,14 +76,15 @@ or 'x64' is used depends on the architecture (e.g. x86-= 32 uses x32, and x86-64 uses x64). These value types can be an array. To record array data, you can add '[N]' (where N is a fixed number, less than 64) to the base type. -E.g. 'x16[4]' means an array of x16 (2bytes hex) with 4 elements. +E.g. 'x16[4]' means an array of x16 (2-bytes hex) with 4 elements. Note that the array can be applied to memory type fetchargs, you can not apply it to registers/stack-entries etc. (for example, '$stack1:x8[8]' is wrong, but '+8($stack):x8[8]' is OK.) String type is a special type, which fetches a "null-terminated" string fr= om kernel space. This means it will fail and store NULL if the string contain= er has been paged out. "ustring" type is an alternative of string for user-sp= ace. -See :ref:`user_mem_access` for more info.. +See :ref:`user_mem_access` for more info. + The string array type is a bit different from other types. For other base types, [1] is equal to (e.g. +0(%di):x32[1] is same as +0(%di):x32.) But string[1] is not equal to string. The string type its= elf @@ -120,8 +121,8 @@ space. 'ustring' is a shortcut way of performing the sa= me task. That is, =20 Note that kprobe-event provides the user-memory access syntax but it doesn= 't use it transparently. This means if you use normal dereference or string t= ype -for user memory, it might fail, and may always fail on some archs. The user -has to carefully check if the target data is in kernel or user space. +for user memory, it might fail, and may always fail on some architectures.= The +user has to carefully check if the target data is in kernel or user space. =20 Per-Probe Event Filtering ------------------------- --=20 2.30.2 From nobody Sun Sep 14 12:39:27 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44BE6C004D4 for ; Sat, 21 Jan 2023 14:31:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229814AbjAUObe (ORCPT ); Sat, 21 Jan 2023 09:31:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229805AbjAUObc (ORCPT ); Sat, 21 Jan 2023 09:31:32 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C4FA392B3 for ; Sat, 21 Jan 2023 06:31:31 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id r9so7151757wrw.4 for ; Sat, 21 Jan 2023 06:31:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W4TB1OEgjESNCwtQLX1L+eIOlyALE7x8aUBSmkMLwac=; b=2eY68x7jfYFUzdy4vGD+8Y6PmY5UJflCLKXoT6ybao1O1apQT0IcBuYar3gB02kPkT P+zPF9T/czfvdctu8iQy8CTtZ2XmSOJtxmEeiMLqX/PXNQGl8mXIvv0RPgabW8CB/5QH sDGmLd7Xsv0RvCrXlb9IQXBscSEvZ63q6ffN8erVu+MsbDKBzWyW2OIP6wxuXZ1CUQZl skyCvsGy+4u03Q6EN2LYdyRkQyPTvXuUWSmh1LI/0Mh4NZWC9NA9AQNoiFMiQgkOVYCg UpoJ1wpdyXiUlSkkzZSWsgEernRwVfumcQWDnkP5RcPeb4kXvuTK7LOnzsEUY6G8JbU1 NofA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W4TB1OEgjESNCwtQLX1L+eIOlyALE7x8aUBSmkMLwac=; b=daqM/18bz3mWBM8ic9ak/Sx3oStJoinDRg99Wy3hFoZTVdI3DkWjI6MwjEZZpHe2FH A4/1xF7Ifeg3Bkx7zCJOxqiZfOv80fqv9mlr8eHcz4O0j606E2ribehuFK/5Bh+vn84r b1VrQQKRmzwNue58gDt1LbYO8lrJAJjY4zVbjaujrRnbmWLzfdxe+R0mZynbmMjIgR3E IbDIjJ77xr40AZnNHGRF4JC1i/y+AWyQonGHogo8jJm8zWkXXQPXmv8U/qcCPqiIN7ba X4Bhi0WtZ6l+yQmzANnaCmpN6cPiLDBftekiktRgQXGl2e9t5adlXsKRJ/EGzYm5lXdZ Ph3w== X-Gm-Message-State: AFqh2koc32gObgVto4t72CO03Lo6vKPygnjVtbb2tTzZ4lRatvww7JYT Isyut1K81/QmTLxo8HdZzK5XvQ== X-Google-Smtp-Source: AMrXdXtV5msUaxX9SPw2Y4HgCWpGdruUkoVCJRTY/xXEfWaYOOBSahlX/3E3iY5CfgT3+xjTee7YWA== X-Received: by 2002:a5d:4572:0:b0:2ba:bd95:e38e with SMTP id a18-20020a5d4572000000b002babd95e38emr15454843wrc.41.1674311490009; Sat, 21 Jan 2023 06:31:30 -0800 (PST) Received: from P-ASN-ECS-830T8C3.mpl.intranet (89-159-1-53.rev.numericable.fr. [89.159.1.53]) by smtp.gmail.com with ESMTPSA id p8-20020a5d4588000000b002bdfb97e029sm16314604wrq.19.2023.01.21.06.31.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 06:31:29 -0800 (PST) From: Yoann Congal To: linux-trace-kernel@vger.kernel.org Cc: Yoann Congal , Steven Rostedt , Masami Hiramatsu , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v2 2/3] Documentation: kprobetrace: Fix code block markup Date: Sat, 21 Jan 2023 15:31:09 +0100 Message-Id: <20230121143110.1706962-2-yoann.congal@smile.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230121142242.1706081-1-yoann.congal@smile.fr> References: <20230121143110.1706962-1-yoann.congal@smile.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This display the following code extract as a code block instead of a normal paragraph. Signed-off-by: Yoann Congal --- Documentation/trace/kprobetrace.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kpro= betrace.rst index 1eb2c68aa0a71..ad18c2fdbd153 100644 --- a/Documentation/trace/kprobetrace.rst +++ b/Documentation/trace/kprobetrace.rst @@ -161,11 +161,11 @@ You can add and enable new kprobe events when booting= up the kernel by "kprobe_event=3D" parameter. The parameter accepts a semicolon-delimited kprobe events, which format is similar to the kprobe_events. The difference is that the probe definition parameters are comma-delimited -instead of space. For example, adding myprobe event on do_sys_open like be= low +instead of space. For example, adding myprobe event on do_sys_open like be= low:: =20 p:myprobe do_sys_open dfd=3D%ax filename=3D%dx flags=3D%cx mode=3D+4($st= ack) =20 -should be below for kernel boot parameter (just replace spaces with comma) +should be below for kernel boot parameter (just replace spaces with comma)= :: =20 p:myprobe,do_sys_open,dfd=3D%ax,filename=3D%dx,flags=3D%cx,mode=3D+4($st= ack) =20 --=20 2.30.2 From nobody Sun Sep 14 12:39:27 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08A31C004D4 for ; Sat, 21 Jan 2023 14:31:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbjAUObj (ORCPT ); Sat, 21 Jan 2023 09:31:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbjAUObd (ORCPT ); Sat, 21 Jan 2023 09:31:33 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF88F21A07 for ; Sat, 21 Jan 2023 06:31:32 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id y1so2649876wru.2 for ; Sat, 21 Jan 2023 06:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile-fr.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rarW0C3V0LVCbRSxn5OZzPRQcVqqpTUYjlstsxkGCnQ=; b=XsCu29i8Z1oc6uq5sN0yrMDgSjJpECZK4tV/ZSWpv7Uv/K2PEwE5UMbv20VjjgyxlY vg8bhcorENStwyLLUyjey9dNr++wfIekEVSst6gupetTukZG9rMpYTpYHfbIHuk66jam iKAWboGyzIl6Ep6fEHRYZXEmB+YB3H0ucf7nvQKEWidcjOusrcuCYpG6FtbisyPCE8Gc gWBRQ8HqXvNuHuNu5A6i/9gh7TNaC+jl+3hEqOHUdIDAypMszBN08bnuRVw0l6qhzGDP dfEjDWnOY0WCx9R8ODnSCGEPQ3dGmxqMEcp64N7ymD7xgAyUanO++dHng7c2mD6BN2qh xG8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rarW0C3V0LVCbRSxn5OZzPRQcVqqpTUYjlstsxkGCnQ=; b=1j9FjrNXsOJESF73rnjq+5TEuiLFMSBxMFePpozYo1JTX4ppBSZnLlfIKJiXeh9USb a1m4ioQ46ewx8RSQ8LsmCjhfpzhVQoHovthV0kOhQ+ozp5/lr4KT670i4HHPB8FF57ZR 6PkNNjjSd6HT6viLQQCpwAYxyHtny9DYJPu4DZJT8V05eTVSWLDtGijellHTgti/7R17 ORdv8mZnkfSDETWMFuGjBEM7EYs4GNE6I40X1wb1mR+oRrh/62sNA/saavM4Rwa6g1hA rMEjm4bRCn8w/esR1Wof1MIkAZxc+MxtIOxTp3l3UXhmXkbw5ppX+tKdWDJjsKciA/GO zvqg== X-Gm-Message-State: AFqh2koZ3IRg/Aw9pwSvWGshHQhW1548xGCq1Orwa63CvQQqoc6p2Rws rQbd5cqa0LW2nsPnQd5AXa1yMQ== X-Google-Smtp-Source: AMrXdXvFZMIUXANWl+eYIekkOFr+wSSWg8hb1mKA3uO8qLOhdES9+Kt8xsHL6GIfJpTslkJ2YxykPw== X-Received: by 2002:a5d:4d4b:0:b0:2be:9945:8112 with SMTP id a11-20020a5d4d4b000000b002be99458112mr4332624wru.41.1674311491377; Sat, 21 Jan 2023 06:31:31 -0800 (PST) Received: from P-ASN-ECS-830T8C3.mpl.intranet (89-159-1-53.rev.numericable.fr. [89.159.1.53]) by smtp.gmail.com with ESMTPSA id p8-20020a5d4588000000b002bdfb97e029sm16314604wrq.19.2023.01.21.06.31.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 06:31:31 -0800 (PST) From: Yoann Congal To: linux-trace-kernel@vger.kernel.org Cc: Yoann Congal , Steven Rostedt , Masami Hiramatsu , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v2 3/3] Documentation: kprobetrace: Split paragraphs Date: Sat, 21 Jan 2023 15:31:10 +0100 Message-Id: <20230121143110.1706962-3-yoann.congal@smile.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230121142242.1706081-1-yoann.congal@smile.fr> References: <20230121143110.1706962-1-yoann.congal@smile.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add an empty line to force the output to split paragraphs like it is splitin the REST source. Signed-off-by: Yoann Congal --- Documentation/trace/kprobetrace.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kpro= betrace.rst index ad18c2fdbd153..99251bcdeb13d 100644 --- a/Documentation/trace/kprobetrace.rst +++ b/Documentation/trace/kprobetrace.rst @@ -74,12 +74,14 @@ respectively. 'x' prefix implies it is unsigned. Traced= arguments are shown in decimal ('s' and 'u') or hexadecimal ('x'). Without type casting, 'x32' or 'x64' is used depends on the architecture (e.g. x86-32 uses x32, and x86-64 uses x64). + These value types can be an array. To record array data, you can add '[N]' (where N is a fixed number, less than 64) to the base type. E.g. 'x16[4]' means an array of x16 (2-bytes hex) with 4 elements. Note that the array can be applied to memory type fetchargs, you can not apply it to registers/stack-entries etc. (for example, '$stack1:x8[8]' is wrong, but '+8($stack):x8[8]' is OK.) + String type is a special type, which fetches a "null-terminated" string fr= om kernel space. This means it will fail and store NULL if the string contain= er has been paged out. "ustring" type is an alternative of string for user-sp= ace. --=20 2.30.2