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]
Date:   Tue, 19 Mar 2019 15:56:52 +0000
From:   Daniel Thompson <daniel.thompson@...aro.org>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Doug Anderson <dianders@...omium.org>,
        Ingo Molnar <mingo@...hat.com>,
        Jason Wessel <jason.wessel@...driver.com>,
        kgdb-bugreport@...ts.sourceforge.net,
        Brian Norris <briannorris@...omium.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 2/3] tracing: Add trace_total_entries() /
 trace_total_entries_cpu()

On Tue, Mar 19, 2019 at 10:55:25AM -0400, Steven Rostedt wrote:
> On Tue, 19 Mar 2019 07:45:38 -0700
> Doug Anderson <dianders@...omium.org> wrote:
> 
> > > > +unsigned long trace_total_entries_cpu(struct trace_array *tr, int cpu)
> > > > +{
> > > > +     unsigned long total, entries;
> > > > +
> > > > +     if (!tr)
> > > > +             tr = &global_trace;  
> > >
> > > This function is only ever called with tr set to NULL which means tr is
> > > an argument looking for a user.
> > >
> > > I wouldn't mind except if this was following copying prior art to keep
> > > the API feel the same but I can't find any other trace function where
> > > the trace_array can be substituted for NULL. AFAICT all the existing
> > > sites where global_trace is used will use it unconditionally.  
> 
> I'm in the process of making everything work better with tracing
> instances. Which means, making all the APIs use the tr pointer (which is
> the descriptor for the instance).
> 
> All new APIs added to the tracing infrastructure should reference a "tr"
> pointer, and not use the global_trace directly. We can default it if tr
> is NULL.
> 
> There are currently lots of cases in the code that do so, but I'm
> trying to get rid of them.

I see. So this API style will align with the rest of the family when
that works lands.

Fine for me.


Daniel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ