Thread (9 messages) 9 messages, 8 authors, 2017-06-21

Re: [PATCH v2] refcount: Create unchecked atomic_t implementation

From: Christoph Hellwig <hch@infradead.org>
Date: 2017-06-08 06:58:15
Also in: lkml

On Wed, Jun 07, 2017 at 07:58:31PM -0700, Kees Cook wrote:
Many subsystems will not use refcount_t unless there is a way to build the
kernel so that there is no regression in speed compared to atomic_t. This
adds CONFIG_REFCOUNT_FULL to enable the full refcount_t implementation
which has the validation but is slightly slower. When not enabled,
refcount_t uses the basic unchecked atomic_t routines, which results in
no code changes compared to just using atomic_t directly.

Signed-off-by: Kees Cook <redacted>
---
This is v2 of this patch, which I've split from the arch-specific
alternative implementation for x86. Getting this patch in will unblock
atomic_t -> refcount_t conversion, and the x86 alternative implementation
can be developed in parallel. Changes from v1: use better atomic ops,
thanks to Elena and Peter.
Yeah, can we get this in ASAP?  Without having to always incur the over
this will allow us to convert subsystems to refcount_t broadly.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help