lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250411152610.64d555bf@gandalf.local.home>
Date: Fri, 11 Apr 2025 15:26:10 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
 bpf@...r.kernel.org, Masami Hiramatsu <mhiramat@...nel.org>, Mark Rutland
 <mark.rutland@....com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Andrew Morton <akpm@...ux-foundation.org>, Sven Schnelle
 <svens@...ux.ibm.com>, Paul Walmsley <paul.walmsley@...ive.com>, Palmer
 Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>, Guo Ren
 <guoren@...nel.org>, Donglin Peng <dolinux.peng@...il.com>, Zheng Yejian
 <zhengyejian@...weicloud.com>, Aishwarya.TCV@....com
Subject: Re: [PATCH v4 2/4] ftrace: Add support for function argument to
 graph tracer


Replying to my email as it appears gmail blocked it. Probably due to all
the escape characters my output had. Resending with that cut out.

Masami, I was sent a message from gmail that it blocked this from you.

If you want to see the original email:

  https://lore.kernel.org/all/20250411151358.1d4fd8c7@gandalf.local.home/

-- Steve

On Fri, 11 Apr 2025 15:13:58 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Fri, 11 Apr 2025 14:31:32 -0400
> Steven Rostedt <rostedt@...dmis.org> wrote:
> 
> > Hmm, I just tested this, and it fails on my box too (I test on a debian VM).
> > 
> > It fails with and without setting it to bash. I'll take a look too.  
> 
> Hmm, maybe it is a bashism.
> 
> The test has this:
> 
>   # Max arguments limitation
>   MAX_ARGS=128
>   EXCEED_ARGS=$((MAX_ARGS + 1))
> 
>   check_max_args() { # event_header
>     TEST_STRING=$1
>     # Acceptable
>     for i in `seq 1 $MAX_ARGS`; do
>       TEST_STRING="$TEST_STRING \\$i"
>     done
>     echo "$TEST_STRING" >> dynamic_events
>     echo > dynamic_events
>     # Error
>     TEST_STRING="$TEST_STRING \\$EXCEED_ARGS"
>     ! echo "$TEST_STRING" >> dynamic_events
>     return 0
>   }
> 
>   # Kprobe max args limitation
>   if grep -q "kprobe_events" README; then
>     check_max_args "p vfs_read"
>   fi
> 
> So I tried manually executing this in bash:
> 
> --------------------------8<--------------------------
> # TEST_STRING='p vfs_read'
> # for i in `seq 1 128`; do TEST_STRING="$TEST_STRING \\$i" ; done
> # echo $TEST_STRING
> p vfs_read \1 \2

[ This  is cut out to see if it doesn't trigger gmail blocking it again! ]

> # echo "$TEST_STRING" >> /sys/kernel/tracing/dynamic_events
> # echo $?
> 0
> # cat /sys/kernel/tracing/dynamic_events
> p:kprobes/p_vfs_read_0 vfs_read arg1=\1

[ This  is cut out to see if it doesn't trigger gmail blocking it again! ]

> -------------------------->8--------------------------  
> 
> Doing the same in dash:
> 
> --------------------------8<--------------------------
> # dash
> # TEST_STRING='p vfs_read'
> # for i in `seq 1 128`; do TEST_STRING="$TEST_STRING \\$i" ; done
> # echo $TEST_STRING
> p vfs_read         \8 \9 	 

[ This  is cut out to see if it doesn't trigger gmail blocking it again! ]

> # echo "$TEST_STRING" >> /sys/kernel/tracing/dynamic_events
> dash: 8: echo: echo: I/O error
> -------------------------->8--------------------------  
> 
> Looks like dash will translate those "\#" into the ASCII equivalent,
> whereas bash does not.
> 
> This patch seems to fix it:
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc b/tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc
> index 6b94b678741a..ebe2a34cbf92 100644
> --- a/tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc
> +++ b/tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc
> @@ -11,7 +11,7 @@ check_max_args() { # event_header
>    TEST_STRING=$1
>    # Acceptable
>    for i in `seq 1 $MAX_ARGS`; do
> -    TEST_STRING="$TEST_STRING \\$i"
> +    TEST_STRING="$TEST_STRING \\\\$i"
>    done
>    echo "$TEST_STRING" >> dynamic_events
>    echo > dynamic_events
> 
> 
> Masami, you just recently added this test (it's dated March 27th 2025), did
> you mean to write in the ASCII characters? Why the backslash?
> 
> -- Steve


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ