2023-01-21 23:20:30

by Yoann Congal

[permalink] [raw]
Subject: [PATCH v3 0/3] Documentation: kprobetrace: Improve readability

Hi,

Version 3 of this series of small readability fixes on kprobetrace.rst.

v1: https://lore.kernel.org/linux-doc/[email protected]/

Changelog
v3 -> v2:
* fix 2 bytes hex -> 2 byte hex typo

v1 -> v2:
* Removed all ``markup`` additions
* Split commits

Regards,

Yoann Congal (3):
Documentation: kprobetrace: Fix some typos
Documentation: kprobetrace: Fix code block markup
Documentation: kprobetrace: Split paragraphs

Documentation/trace/kprobetrace.rst | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)

--
2.30.2


2023-01-21 23:21:20

by Yoann Congal

[permalink] [raw]
Subject: [PATCH v3 1/3] Documentation: kprobetrace: Fix some typos

* Uncapitalise tracepoint
* Hyphen in *-based
* Plurals
* fetch-args -> fetchargs
* 2bytes hex -> 2-byte hex
* .. -> .
* arch -> architecture

Signed-off-by: Yoann Congal <[email protected]>

TBR typo
---
Documentation/trace/kprobetrace.rst | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
index 08a2a6a3782f0..5c49cdc8f8323 100644
--- a/Documentation/trace/kprobetrace.rst
+++ b/Documentation/trace/kprobetrace.rst
@@ -6,16 +6,16 @@ Kprobe-based Event Tracing

Overview
--------
-These events are similar to tracepoint based events. Instead of Tracepoint,
+These events are similar to tracepoint-based events. Instead of tracepoints,
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.

To enable this feature, build your kernel with CONFIG_KPROBE_EVENTS=y.

-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/<EVENT>/enable.
@@ -68,7 +68,7 @@ Synopsis of kprobe_events

Types
-----
-Several types are supported for fetch-args. Kprobe tracer will access memory
+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-byte 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 from
kernel space. This means it will fail and store NULL if the string container
has been paged out. "ustring" type is an alternative of string for user-space.
-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, <base-type>[1] is equal to <base-type> (e.g. +0(%di):x32[1] is same
as +0(%di):x32.) But string[1] is not equal to string. The string type itself
@@ -120,8 +121,8 @@ space. 'ustring' is a shortcut way of performing the same task. That is,

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 type
-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.

Per-Probe Event Filtering
-------------------------
--
2.30.2

2023-01-21 23:23:18

by Yoann Congal

[permalink] [raw]
Subject: [PATCH v3 3/3] Documentation: kprobetrace: Split paragraphs

Add an empty line to force the output to split paragraphs like it is
splitin the REST source.

Signed-off-by: Yoann Congal <[email protected]>
---
Documentation/trace/kprobetrace.rst | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst
index febfd3792854f..fda155237be7a 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-byte 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 from
kernel space. This means it will fail and store NULL if the string container
has been paged out. "ustring" type is an alternative of string for user-space.
--
2.30.2

2023-01-21 23:48:11

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Documentation: kprobetrace: Improve readability

On Sat, 21 Jan 2023 23:53:02 +0100
Yoann Congal <[email protected]> wrote:

> Hi,
>
> Version 3 of this series of small readability fixes on kprobetrace.rst.
>
> v1: https://lore.kernel.org/linux-doc/[email protected]/

Thanks for fixing document!

This series looks good to me.

Acked-by: Masami Hiramatsu (Google) <[email protected]>

for this series.

Thank you!

>
> Changelog
> v3 -> v2:
> * fix 2 bytes hex -> 2 byte hex typo
>
> v1 -> v2:
> * Removed all ``markup`` additions
> * Split commits
>
> Regards,
>
> Yoann Congal (3):Yipeng Zou <[email protected]>
> Documentation: kprobetrace: Fix some typos
> Documentation: kprobetrace: Fix code block markup
> Documentation: kprobetrace: Split paragraphs
>
> Documentation/trace/kprobetrace.rst | 23 +++++++++++++----------
> 1 file changed, 13 insertions(+), 10 deletions(-)
>
> --
> 2.30.2
>


--
Masami Hiramatsu (Google) <[email protected]>

2023-01-23 15:33:51

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Documentation: kprobetrace: Improve readability

On Sun, 22 Jan 2023 08:31:38 +0900
Masami Hiramatsu (Google) <[email protected]> wrote:

> On Sat, 21 Jan 2023 23:53:02 +0100
> Yoann Congal <[email protected]> wrote:
>
> > Hi,
> >
> > Version 3 of this series of small readability fixes on kprobetrace.rst.
> >
> > v1: https://lore.kernel.org/linux-doc/[email protected]/
>
> Thanks for fixing document!
>
> This series looks good to me.
>
> Acked-by: Masami Hiramatsu (Google) <[email protected]>
>
> for this series.
>
>

Reviewed-by: Steven Rostedt (Google) <[email protected]>

Jon, care to take this series through your tree?

Thanks,

-- Steve

2023-01-24 03:08:37

by Bagas Sanjaya

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Documentation: kprobetrace: Improve readability

On Sat, Jan 21, 2023 at 11:53:02PM +0100, Yoann Congal wrote:
> Hi,
>
> Version 3 of this series of small readability fixes on kprobetrace.rst.
>

Quickly skimmed this series, it LGTM. Thanks for submitting.

Reviewed-by: Bagas Sanjaya <[email protected]>

--
An old man doll... just what I always wanted! - Clara


Attachments:
(No filename) (320.00 B)
signature.asc (228.00 B)
Download all attachments

2023-01-24 22:01:15

by Jonathan Corbet

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Documentation: kprobetrace: Improve readability

Steven Rostedt <[email protected]> writes:

> Reviewed-by: Steven Rostedt (Google) <[email protected]>
>
> Jon, care to take this series through your tree?

Done, thanks.

jon

2023-01-25 07:58:56

by Yoann Congal

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Documentation: kprobetrace: Improve readability

Hi,

On 1/24/23 23:01, Jonathan Corbet wrote:
> Steven Rostedt <[email protected]> writes:
>
>> Reviewed-by: Steven Rostedt (Google) <[email protected]>
>>
>> Jon, care to take this series through your tree?
>
> Done, thanks.


Thank you for ack'ing, reviewing and merging :)

Regards,
--
Yoann Congal
Smile ECS - Tech Expert