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] [day] [month] [year] [list]
Message-ID: <20191218103314.4125cd2a@gandalf.local.home>
Date:   Wed, 18 Dec 2019 10:33:14 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     David Laight <David.Laight@...LAB.COM>
Cc:     'Tom Zanussi' <zanussi@...nel.org>,
        Sven Schnelle <svens@...ckframe.org>,
        "linux-trace-devel@...r.kernel.org" 
        <linux-trace-devel@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: ftrace histogram sorting broken on BE architecures

On Tue, 17 Dec 2019 10:05:57 +0000
David Laight <David.Laight@...LAB.COM> wrote:

> From: Steven Rostedt
> > Sent: 16 December 2019 18:29
> > On Mon, 16 Dec 2019 17:06:50 +0000
> > David Laight <David.Laight@...LAB.COM> wrote:
> >   
> > > > Where original_val_a could be a byte, short, int, long or long long.  
> > >
> > > I'd sort of guessed that, but then the pointer type passed to tracing_map_cmp_##type()
> > > will always be 'u64 *' (since the field the address is taken of must be that type).
> > > Then the (u64 *) casts are no longer needed.
> > >
> > > Possibly you can just pass the u64 values to:
> > > tracing_map_cmp_##type(type a, type b)
> > > {
> > > 	return a > b ? 1 : a < b ? -1 : 0;
> > > }
> > >
> > > The high bit masking and sign extension is then implicit in the call.  
> > 
> > But these are used to pass into a compare function that takes compare
> > functions that are something other than numbers. They can be pointers
> > to strings.  
> 
> In that case I think I'd embed the u64 inside a structure and pass the structure
> address to the compare function.
> 

It's something we can clean up later. As this is going to be marked for
stable, and the code still works, I would like to keep the change as
simple as possible.

Thanks!

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ