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: <3b45bdf6-234d-4859-8344-c18b48c8b415@efficios.com>
Date:   Sun, 10 Dec 2023 09:26:13 -0500
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
        linux-trace-kernel@...r.kernel.org
Cc:     Masami Hiramatsu <mhiramat@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Tzvetomir Stoyanov <tz.stoyanov@...il.com>,
        Vincent Donnefort <vdonnefort@...gle.com>,
        Kent Overstreet <kent.overstreet@...il.com>
Subject: Re: [PATCH 14/14] ringbuffer/selftest: Add basic selftest to test
 chaning subbuf order

On 2023-12-09 22:54, Steven Rostedt wrote:
[...]
> +get_buffer_data_size() {
> +	sed -ne 's/^.*data.*size:\([0-9][0-9]*\).*/\1/p' events/header_page
> +}
> +
> +a="1234567890"
> +
> +make_str() {
> +        cnt=$1
> +        s=""
> +        while [ $cnt -gt 10 ]; do
> +                s="${s}${a}"
> +                cnt=$((cnt-10))
> +        done
> +        while [ $cnt -gt 0 ]; do
> +                s="${s}X"
> +                cnt=$((cnt-1))
> +        done
> +        echo -n $s
> +}
> +
> +test_buffer() {
> +
> +	size=`get_buffer_data_size`
> +
> +	str=`make_str $size`
> +
> +	echo $str > trace_marker
> +
> +	grep -q $a trace

This test has no clue if the record was truncated or not.

It basically repeats the string

"1234567890" until it fills the subbuffer size and pads with
XXXX as needed as trace marker payload, but the grep looks for the
"1234567890" pattern only.

The test should be extended to validate whether the trace marker
payload was truncated or not, otherwise it is of limited value.

Thanks,

Mathieu


-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ