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:   Tue, 24 Oct 2017 11:31:04 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:     linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        will.deacon@....com, mark.rutland@....com, snitzer@...hat.com,
        thor.thayer@...ux.intel.com, viro@...iv.linux.org.uk,
        davem@...emloft.net, shuah@...nel.org, mpe@...erman.id.au,
        tj@...nel.org, torvalds@...ux-foundation.org
Subject: Re: [PATCH 17/19] locking/barriers: Kill lockless_dereference


* Paul E. McKenney <paulmck@...ux.vnet.ibm.com> wrote:

> From: Will Deacon <will.deacon@....com>
> 
> lockless_dereference is a nice idea, but its gained little traction in
> kernel code since it's introduction three years ago. This is partly

s/its/it
s/it's/its

> because it's a pain to type, but also because using READ_ONCE instead
> will work correctly on all architectures apart from Alpha, which is a
> fully supported but somewhat niche architecture these days.
> 
> This patch moves smp_read_barrier_depends() (a NOP on all architectures
> other than Alpha) from lockless_dereference into READ_ONCE, converts
> the few actual users over to READ_ONCE and then finally removes
> lockless_dereference altogether.

Nit: if we refer to smp_read_barrier_depends() with parentheses (which is the nice 
thing to do for function-alike symbols), then we should do the same with 
READ_ONCE() and lockless_dereference() as well.

Also, could we please split this into three patches:

 #1: Add smp_read_barrier_depends() to READ_ONCE()
 #2: Convert all lockless_dereference() users to READ_ONCE()
 #3: Remove the now unused lockless_dereference() API

to make it easier to analyze if bisected to, should any problems arise?

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ