Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751766AbdFHHx2 convert rfc822-to-8bit (ORCPT ); Thu, 8 Jun 2017 03:53:28 -0400 Received: from mga03.intel.com ([134.134.136.65]:55560 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751035AbdFHHxZ (ORCPT ); Thu, 8 Jun 2017 03:53:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,314,1493708400"; d="scan'208";a="110614048" From: "Reshetova, Elena" To: Christoph Hellwig , Kees Cook CC: "linux-kernel@vger.kernel.org" , "Peter Zijlstra" , "Eric W. Biederman" , Andrew Morton , Josh Poimboeuf , Jann Horn , Eric Biggers , Hans Liljestrand , David Windsor , Greg KH , 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 Thread-Topic: [PATCH v2] refcount: Create unchecked atomic_t implementation Thread-Index: AQHS4AMo46Cg9BA/JkmPX18UI6XKw6IaeGKAgAAfx6A= Date: Thu, 8 Jun 2017 07:53:04 +0000 Message-ID: <2236FBA76BA1254E88B949DDB74E612B6FF0E5C7@IRSMSX102.ger.corp.intel.com> References: <20170608025831.GA43608@beast> <20170608065809.GC14568@infradead.org> In-Reply-To: <20170608065809.GC14568@infradead.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1181 Lines: 23 > 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 > > --- > > 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. +1. If this gets in, I can refresh the rest of the patches in net, mm, ipc, block, etc. and send them for review again. Best Regards, Elena