Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753992AbcKQTKj (ORCPT ); Thu, 17 Nov 2016 14:10:39 -0500 Received: from merlin.infradead.org ([205.233.59.134]:43932 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbcKQTKi (ORCPT ); Thu, 17 Nov 2016 14:10:38 -0500 Date: Thu, 17 Nov 2016 20:10:25 +0100 From: Peter Zijlstra To: "Reshetova, Elena" Cc: David Windsor , Kees Cook , Greg KH , Will Deacon , Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , LKML , Alexei Starovoitov , Daniel Borkmann Subject: Re: [RFC][PATCH 2/7] kref: Add kref_read() Message-ID: <20161117191025.GI3117@twins.programming.kicks-ass.net> References: <20161115080314.GD3142@twins.programming.kicks-ass.net> <20161116100925.GM3142@twins.programming.kicks-ass.net> <20161117083458.GZ3142@twins.programming.kicks-ass.net> <20161117124339.GC3117@twins.programming.kicks-ass.net> <2236FBA76BA1254E88B949DDB74E612B41C14089@IRSMSX102.ger.corp.intel.com> <20161117132206.GE3117@twins.programming.kicks-ass.net> <2236FBA76BA1254E88B949DDB74E612B41C142E6@IRSMSX102.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2236FBA76BA1254E88B949DDB74E612B41C142E6@IRSMSX102.ger.corp.intel.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 773 Lines: 16 On Thu, Nov 17, 2016 at 06:02:33PM +0000, Reshetova, Elena wrote: > > > Even if we now find all occurrences of atomic_t used as refcounter > > (which we cannot actually guarantee in any case unless someone > > manually reads every line) and convert it to refcount_t, we still have > > atomic_t type present and new usage of it as refount will crawl in. It > > is just a matter of time IMO. > > >Improve tooling. The patterns shouldn't be _that_ hard to find. Once the tools are good, new code isn't a problem either. > > Moreover, thinking of out of tree drivers: you think they would always > do checkpatch or run some of our tools for security checks? If they can't be arsed, neither can I. You can't fix the unfixable. Like I said before, its chasing unicorns.