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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZwUVBW72bZQNaWqt@gmail.com>
Date: Tue, 8 Oct 2024 12:18:29 +0100
From: Breno Leitao <leitao@...ian.org>
To: Carlos Llamas <cmllamas@...gle.com>
Cc: akpm@...ux-foundation.org, Luca Ceresoli <luca.ceresoli@...tlin.com>,
	Stephen Boyd <swboyd@...omium.org>,
	Elliot Berman <quic_eberman@...cinc.com>,
	Xiong Nandi <xndchn@...il.com>,
	Kent Overstreet <kent.overstreet@...ux.dev>,
	Bjorn Andersson <quic_bjorande@...cinc.com>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scripts/decode_stacktrace.sh: remove trailing space

Hello Carlos,

On Mon, Oct 07, 2024 at 07:29:27PM +0000, Carlos Llamas wrote:
> On Thu, Oct 03, 2024 at 03:30:05AM -0700, Breno Leitao wrote:
> > decode_stacktrace.sh adds a trailing space at the end of the decoded
> > stack if the module is not set (in most of the lines), which makes the
> > some lines of the stack having trailing space and some others not.
> > 
> > Do not add an extra space at the end of the line if module is not set,
> > adding consistency in output formatting.
> > 
> > Signed-off-by: Breno Leitao <leitao@...ian.org>
> > ---
> >  scripts/decode_stacktrace.sh | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
> > index 826836d264c6..4b3502a007fd 100755
> > --- a/scripts/decode_stacktrace.sh
> > +++ b/scripts/decode_stacktrace.sh
> > @@ -311,7 +311,12 @@ handle_line() {
> >  	parse_symbol # modifies $symbol
> >  
> >  	# Add up the line number to the symbol
> > -	echo "${words[@]}" "$symbol $module"
> > +	if [ -z ${module} ]
> > +	then
> 
> nit: it seems the convention would have been something like:
> 	if [[ -z $module ]]; then

That is how I wrote originally, in fact, but, the rest of the code is
using the other way. Example:

        if [ -z $release ] ; then
                release=$(gdb -ex 'print init_uts_ns.name.release' -ex 'quit' -quiet -batch "$vmlinux" 2>/dev/null | sed -n 's/\$1 = "\(.*\)".*/\1/p')
        fi
        if [ -n "${release}" ] ; then
                release_dirs="/usr/lib/debug/lib/modules/$release /lib/modules/$release"
        fi

Thanks for the review,
Breno

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ