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: <aL8B7gvFAthV4EX0@google.com>
Date: Mon, 8 Sep 2025 16:18:54 +0000
From: Carlos Llamas <cmllamas@...gle.com>
To: "Matthieu Baerts (NGI0)" <matttbe@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Elliot Berman <quic_eberman@...cinc.com>,
	Stephen Boyd <swboyd@...omium.org>,
	Breno Leitao <leitao@...ian.org>,
	Luca Ceresoli <luca.ceresoli@...tlin.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] scripts/decode_stacktrace.sh: symbol: avoid trailing
 whitespaces

On Mon, Sep 08, 2025 at 05:41:57PM +0200, Matthieu Baerts (NGI0) wrote:
> Lines having a symbol to decode might not always have info after this
> symbol. It means ${info_str} might not be set, but it will always be
> printed after a space, causing trailing whitespaces.
> 
> That's a detail, but when the output is opened with an editor marking
> these trailing whitespaces, that's a bit disturbing. It is easy to
> remove them by printing this variable with a space only if it is set.
> 
> While at it, do the same with ${module} and print everything in one line.
> 
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@...nel.org>
> ---
>  scripts/decode_stacktrace.sh | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
> index 17abc4e7a9855b10e76acfdb92847e1671d6c2bd..c6b5c14412f0f6f78fb60b0b042d6e22bbb46b79 100755
> --- a/scripts/decode_stacktrace.sh
> +++ b/scripts/decode_stacktrace.sh
> @@ -323,12 +323,7 @@ handle_line() {
>  	parse_symbol # modifies $symbol
>  
>  	# Add up the line number to the symbol
> -	if [[ -z ${module} ]]
> -	then
> -		echo "${words[@]}" "$symbol ${info_str}"
> -	else
> -		echo "${words[@]}" "$symbol $module ${info_str}"
> -	fi
> +	echo "${words[@]}" "${symbol}${module:+ ${module}}${info_str:+ ${info_str}}"
>  }
>  
>  while read line; do
> 
> -- 
> 2.51.0
> 

LGTM,

Reviewed-by: Carlos Llamas <cmllamas@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ