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] [day] [month] [year] [list]
Date:   Mon, 12 Aug 2019 11:08:06 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Will Deacon <will@...nel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
        Elena Reshetova <elena.reshetova@...el.com>,
        Ard Biesheuvel <ard.biesheuvel@...aro.org>,
        Hanjun Guo <guohanjun@...wei.com>,
        Jan Glauber <jglauber@...vell.com>
Subject: Re: [PATCH 4/6] lib/refcount: Move bulk of REFCOUNT_FULL
 implementation into header

On Fri, Aug 09, 2019 at 05:04:28PM +0100, Will Deacon wrote:
> On Fri, Aug 02, 2019 at 07:23:07PM -0700, Kees Cook wrote:
> > On Fri, Aug 02, 2019 at 08:52:22PM +0200, Peter Zijlstra wrote:
> > > On Fri, Aug 02, 2019 at 11:09:58AM +0100, Will Deacon wrote:
> > > > In an effort to improve performance of the REFCOUNT_FULL implementation,
> > > > move the bulk of its functions into linux/refcount.h. This allows them
> > > > to be inlined in the same way as if they had been provided via
> > > > CONFIG_ARCH_HAS_REFCOUNT.
> > > 
> > > Hehe, they started out this way, then Linus said to stuff them in a C
> > > file :-)
> > 
> > I asked this at the time and didn't quite get a straight answer; Linus's
> > request was private:
> > 
> > https://lore.kernel.org/lkml/20170213180020.GK6500@twins.programming.kicks-ass.net/
> > 
> > It seemed sensible to me (then and now) to have them be inline if there
> > were so many performance concerns about it, etc. Was it just the image
> > size bloat due to the WARNs? So... since we're back to this topic. Why
> > should they not be inline?
> 
> I mean, I can always just move this into an arm64-specific implementation
> if I have to, but it seems a shame given that it's completely generic and
> seems to perform just as well as the x86-specific implementation on my
> laptop.

Yeah, I prefer this being generic too. I continue to think the race
isn't meaningful compared to the benefit of gaining a reliable and cheap
"inc from zero" check.

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ