Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751467AbdFHF5C (ORCPT ); Thu, 8 Jun 2017 01:57:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57572 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750822AbdFHF5B (ORCPT ); Thu, 8 Jun 2017 01:57:01 -0400 Date: Thu, 8 Jun 2017 07:56:55 +0200 From: Greg KH To: Kees Cook Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , Peter Zijlstra , "Eric W. Biederman" , Andrew Morton , Josh Poimboeuf , Jann Horn , Eric Biggers , Elena Reshetova , Hans Liljestrand , David Windsor , Ingo Molnar , Alexey Dobriyan , "Serge E. Hallyn" , arozansk@redhat.com, Davidlohr Bueso , Manfred Spraul , "axboe@kernel.dk" , James Bottomley , "x86@kernel.org" , Ingo Molnar , Arnd Bergmann , "David S. Miller" , Rik van Riel , linux-arch Subject: Re: [PATCH v2] refcount: Create unchecked atomic_t implementation Message-ID: <20170608055655.GB19269@kroah.com> References: <20170608025831.GA43608@beast> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170608025831.GA43608@beast> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 601 Lines: 11 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 Acked-by: Greg Kroah-Hartman