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: <20170117001237.GU5238@linux.vnet.ibm.com>
Date:   Mon, 16 Jan 2017 16:12:37 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Josh Triplett <josh@...htriplett.org>
Cc:     linux-kernel@...r.kernel.org, mingo@...nel.org,
        jiangshanlai@...il.com, dipankar@...ibm.com,
        akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
        tglx@...utronix.de, peterz@...radead.org, rostedt@...dmis.org,
        dhowells@...hat.com, edumazet@...gle.com, dvhart@...ux.intel.com,
        fweisbec@...il.com, oleg@...hat.com, bobby.prani@...il.com
Subject: Re: [PATCH tip/core/rcu 3/6] rcu: Abstract dynticks extended
 quiescent state enter/exit operations

On Mon, Jan 16, 2017 at 11:25:38AM -0800, Josh Triplett wrote:
> On Mon, Jan 16, 2017 at 03:34:20AM -0800, Paul E. McKenney wrote:
> > On Sun, Jan 15, 2017 at 11:47:35PM -0800, Josh Triplett wrote:
> > > On Sat, Jan 14, 2017 at 12:54:42AM -0800, Paul E. McKenney wrote:

[ . . . ]

> > > > @@ -693,7 +752,7 @@ static void rcu_eqs_enter_common(long long oldval, bool user)
> > > >  {
> > > >  	struct rcu_state *rsp;
> > > >  	struct rcu_data *rdp;
> > > > -	struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
> > > > +	struct rcu_dynticks __maybe_unused *rdtp = this_cpu_ptr(&rcu_dynticks);
> > > 
> > > Rather than marking a local variable as __maybe_unused (such that the
> > > compiler can no longer help detect it as unused), could you move it into
> > > the portion of the function that uses it, so that if reached, it'll
> > > always get used?
> > > 
> > > >  	trace_rcu_dyntick(TPS("Start"), oldval, rdtp->dynticks_nesting);
> > 
> > Its only use is in the above event trace, which can be disabled via
> > CONFIG_RCU_TRACE=n.  I could put the definition of rdtp under #ifdef,
> > but this seems ugly.  I could eliminate the variable, substituting
> > the initialization for rdtp in the event trace, but that would make
> > for a very long line, or an odd line break.
> 
> For the trace_rcu_dyntick calls, you could create a small static inline
> helper to do the tracing, eliminating the third argument.  Or you could
> create a helper that returns
> this_cpu_ptr(&rcu_dynticks)->dynticks_nesting.  Either way would work.
> 
> Or, if you prefer, you could wrap the variable
> declaration/initialization in RCU_TRACE() rather than adding
> __maybe_unused.

RCU_TRACE() it is in both cases, thank you!  (You would think I would
remember the code that I wrote...)

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ