[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191121145533.GZ3001@twin.jikos.cz>
Date: Thu, 21 Nov 2019 15:55:33 +0100
From: David Sterba <dsterba@...e.cz>
To: Will Deacon <will@...nel.org>
Cc: linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>,
Ingo Molnar <mingo@...nel.org>,
Elena Reshetova <elena.reshetova@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Hanjun Guo <guohanjun@...wei.com>
Subject: Re: [RESEND PATCH v4 03/10] lib/refcount: Remove unused
refcount_*_checked() variants
On Thu, Nov 21, 2019 at 11:58:55AM +0000, Will Deacon wrote:
> The full-fat refcount implementation is exposed via a set of functions
> suffixed with "_checked()", the idea being that code can choose to use
> the more expensive, yet more secure implementation on a case-by-case
> basis.
>
> In reality, this hasn't happened, so with a grand total of zero users,
> let's remove the checked variants for now by simply dropping the suffix
> and predicating the out-of-line functions on CONFIG_REFCOUNT_FULL=y.
I am still interested in the _checked versions and have a WIP patch that
adds that to btrfs (that was my original plan) but haven't had enough
time to finalize it. The patch itself is simple, the missing part is to
understand and document what the saturated counters would do with the
structures.
If the _checked helpers are really bothering for you, then well remove
it, but I think it's a good API extension that makes the full-refcount
semantics independent of the config.
Powered by blists - more mailing lists