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: <20170904153654.GA4145@infradead.org>
Date:   Mon, 4 Sep 2017 08:36:54 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     David Howells <dhowells@...hat.com>
Cc:     linux-afs@...ts.infradead.org,
        Peter Zijlstra <peterz@...radead.org>,
        linux-fsdevel@...r.kernel.org, Kees Cook <keescook@...omium.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return
 functions

On Fri, Sep 01, 2017 at 04:41:01PM +0100, David Howells wrote:
> Implement functions that increment or decrement a refcount_t object and
> return the value.  The dec-and-ret function can be used to maintain a
> counter in a cache where 1 means the object is unused, but available and
> the garbage collector can use refcount_dec_if_one() to make the object
> unavailable.  Further, both functions can be used to accurately trace the
> refcount (refcount_inc() followed by refcount_read() can't be considered
> accurate).

Please just use a different interface for that instead of overloading
refcount_t.  The main use case of that type is that it is so simple that
it is hard to get wrong (and have additional checking if things go
wrong)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ