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: <20220519150607.GC618878@lothringen>
Date:   Thu, 19 May 2022 17:06:07 +0200
From:   Frederic Weisbecker <frederic@...nel.org>
To:     nicolas saenz julienne <nsaenz@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Phil Auld <pauld@...hat.com>,
        Alex Belits <abelits@...vell.com>,
        Xiongfeng Wang <wangxiongfeng2@...wei.com>,
        Neeraj Upadhyay <quic_neeraju@...cinc.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Yu Liao <liaoyu15@...wei.com>,
        Boqun Feng <boqun.feng@...il.com>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Marcelo Tosatti <mtosatti@...hat.com>,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Uladzislau Rezki <uladzislau.rezki@...y.com>,
        Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH 21/21] rcu/context_tracking: Merge dynticks counter and
 context tracking states

On Wed, May 18, 2022 at 05:31:32PM +0200, nicolas saenz julienne wrote:
> On Tue, 2022-05-03 at 12:00 +0200, Frederic Weisbecker wrote:
> 
> [...]
> 
> > diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h
> > index edd9f8f5b753..0841435620cf 100644
> > --- a/include/linux/context_tracking_state.h
> > +++ b/include/linux/context_tracking_state.h
> > @@ -10,12 +10,20 @@
> >  #define DYNTICK_IRQ_NONIDLE	((LONG_MAX / 2) + 1)
> >  
> >  enum ctx_state {
> > -	CONTEXT_DISABLED = -1,	/* returned by ct_state() if unknown */
> > -	CONTEXT_KERNEL = 0,
> > -	CONTEXT_USER,
> > -	CONTEXT_GUEST,
> > +	CONTEXT_DISABLED	= -1,	/* returned by ct_state() if unknown */
> > +	CONTEXT_KERNEL		= 0,
> > +	CONTEXT_IDLE		= 1,
> > +	CONTEXT_USER		= 2,
> > +	CONTEXT_GUEST		= 3,
> > +	CONTEXT_MAX		= 4,
> >  };
> >  
> > +/* Even value for idle, else odd. */
> > +#define RCU_DYNTICKS_IDX CONTEXT_MAX
> > +
> > +#define CT_STATE_MASK (CONTEXT_MAX - 1)
> > +#define CT_DYNTICKS_MASK (~CT_STATE_MASK)
> 
> Nit: These macros only work as long as we don't introduce new contexts. It's
> maybe worth a comment.

Ah good point, forgot that.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ