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]
Date:   Mon, 5 Aug 2019 22:58:13 +0800
From:   Boqun Feng <boqun.feng@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Oleg Nesterov <oleg@...hat.com>, Will Deacon <will@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org, bigeasy@...utronix.de,
        juri.lelli@...hat.com, williams@...hat.com, bristot@...hat.com,
        longman@...hat.com, dave@...olabs.net, jack@...e.com
Subject: Re: [PATCH] locking/percpu_rwsem: Rewrite to not use rwsem

On Mon, Aug 05, 2019 at 10:43:18PM +0800, Boqun Feng wrote:
> On Mon, Aug 05, 2019 at 04:02:41PM +0200, Peter Zijlstra wrote:
> [...]
> >  
> >  static inline void percpu_up_read(struct percpu_rw_semaphore *sem)
> >  {
> > +	rwsem_release(&sem->dep_map, 1, _RET_IP_);
> > +
> >  	preempt_disable();
> >  	/*
> >  	 * Same as in percpu_down_read().
> >  	 */
> > -	if (likely(rcu_sync_is_idle(&sem->rss)))
> > +	if (likely(rcu_sync_is_idle(&sem->rss))) {
> >  		__this_cpu_dec(*sem->read_count);
> > -	else
> > -		__percpu_up_read(sem); /* Unconditional memory barrier */
> > -	preempt_enable();
> > +		preempt_enable();
> > +		return;
> > +	}
> >  
> > -	rwsem_release(&sem->rw_sem.dep_map, 1, _RET_IP_);
> 
> Missing a preempt_enable() here?
> 

Ah.. you modified the semantics of __percpu_up_read() to imply a
preempt_enable(), sorry for the noise...

Regards,
Boqun

> Regards,
> Boqun
> 
> > +	__percpu_up_read(sem); /* Unconditional memory barrier */
> >  }
> >  
> [...]



Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ