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:   Fri, 01 Sep 2017 22:15:39 +0100
From:   David Howells <dhowells@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     dhowells@...hat.com, linux-afs@...ts.infradead.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

Peter Zijlstra <peterz@...radead.org> wrote:

> > 	unsigned int refcount_dec_return(refcount_t *r);
> > 	unsigned int refcount_inc_return(refcount_t *r);
> > 
> 
> I'm not immediately seeing how wanting 1 to mean unused leads to
> requiring these two functions.

Did you read the other other part of the description?

	Further, both functions can be used to accurately trace the refcount
	(refcount_inc() followed by refcount_read() can't be considered
	accurate).

> If you'll remember, I did that for inode_count and only needed
> dec_unless().

I don't remember.  inode_count?  I can't find such a thing - did you mean
i_count?  I don't find anything matching "dec_unless.*i_count" either.

David

Powered by blists - more mailing lists