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: <20200828085917.GA7205@lx-t490>
Date:   Fri, 28 Aug 2020 10:59:17 +0200
From:   "Ahmed S. Darwish" <a.darwish@...utronix.de>
To:     peterz@...radead.org
Cc:     Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Sebastian A. Siewior" <bigeasy@...utronix.de>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 2/5] seqlock: Use unique prefix for seqcount_t
 property accessors

On Fri, Aug 28, 2020 at 10:27:54AM +0200, peterz@...radead.org wrote:
> On Fri, Aug 28, 2020 at 03:07:07AM +0200, Ahmed S. Darwish wrote:
> > Differentiate the first group by using "__seqcount_t_" as prefix. This
> > also conforms with the rest of seqlock.h naming conventions.
>
> >  #define __seqprop_case(s, locktype, prop)				\
> >  	seqcount_##locktype##_t: __seqcount_##locktype##_##prop((void *)(s))
> >
> >  #define __seqprop(s, prop) _Generic(*(s),				\
> > -	seqcount_t:		__seqcount_##prop((void *)(s)),		\
> > +	seqcount_t:		__seqcount_t_##prop((void *)(s)),	\
> >  	__seqprop_case((s),	raw_spinlock,	prop),			\
> >  	__seqprop_case((s),	spinlock,	prop),			\
> >  	__seqprop_case((s),	rwlock,		prop),			\
>
> If instead you do:
>
> #define __seqprop_case(s, _lockname, prop) \
> 	seqcount##_lockname##_t: __seqcount##_lockname##_##prop((void *)(s))
>
> You can have:
>
> 	__seqprop_case((s),	,		prop),
> 	__seqprop_case((s),	_raw_spinlock,	prop),
> 	__seqprop_case((s),	_spinlock,	prop),
> 	__seqprop_case((s),	_rwlock,	prop),
> 	__seqprop_case((s),	_mutex,		prop),
> 	__seqprop_case((s),	_ww_mutex,	prop),
>
> And it's all good again.
>
> Although arguably we should do something like s/__seqcount/__seqprop/
> over this lot.
>

ACK.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ