From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933121AbdBHJk0 (ORCPT ); Wed, 8 Feb 2017 04:40:26 -0500 Received: from foss.arm.com ([217.140.101.70]:43340 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932163AbdBHJjX (ORCPT ); Wed, 8 Feb 2017 04:39:23 -0500 Date: Wed, 8 Feb 2017 09:28:30 +0000 From: Will Deacon To: Kees Cook Cc: Laura Abbott , Russell King , Catalin Marinas , Martin Schwidefsky , Heiko Carstens , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Mark Rutland , Arnd Bergmann , "x86@kernel.org" , "linux-arm-kernel@lists.infradead.org" , LKML , "linux-s390@vger.kernel.org" , linux-arch Subject: Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h Message-ID: <20170208092830.GB30215@arm.com> References: <1486501816-27600-1-git-send-email-labbott@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 07, 2017 at 01:25:53PM -0800, Kees Cook wrote: > On Tue, Feb 7, 2017 at 1:10 PM, Laura Abbott wrote: > > The set_memory_* APIs came out of a desire to have a better way to > > change memory attributes. Many of these attributes were linked to cache > > functionality so the prototypes were put in cacheflush.h. These days, > > the APIs have grown and have a much wider use than just cache APIs. To > > support this growth, split off set_memory_* and friends into a separate > > header file to avoid growing cacheflush.h for APIs that have nothing to > > do with caches. > > > > Signed-off-by: Laura Abbott > > --- > > This came out of a comment Russell made while reviewing RODATA test cases > > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480855.html > > While the final result of that series was the rodata code was refactored into > > its own header file, the set_memory_* APIs are still out of place. > > Yeah, this is a nice clean up to start on. > > > This is a simple attempt at moving all the API stubs to their own file. > > Another idea I had was throwing set_memory_{x,nx,ro,rw} in an asm-generic > > file since those are commonly used for module setting across all arches. > > It seems like asm-generic would be cleaner, yes? Only a few archs have > anything "special" happening in the resulting header files. I'd also prefer the asm-generic approach if it makes the arch part a simple addition to asm/Kbuild. Will From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 8 Feb 2017 09:28:30 +0000 From: Will Deacon Subject: Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h Message-ID: <20170208092830.GB30215@arm.com> References: <1486501816-27600-1-git-send-email-labbott@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-arch-owner@vger.kernel.org Message-ID: <20170208092830.11yup85-qNSgk3F1Ux9I6Gb4b7oIGHTQjo_rnU7srkU@z> List-Archive: List-Post: To: Kees Cook Cc: Laura Abbott , Russell King , Catalin Marinas , Martin Schwidefsky , Heiko Carstens , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Mark Rutland , Arnd Bergmann , "x86@kernel.org" , "linux-arm-kernel@lists.infradead.org" , LKML , "linux-s390@vger.kernel.org" , linux-arch List-ID: On Tue, Feb 07, 2017 at 01:25:53PM -0800, Kees Cook wrote: > On Tue, Feb 7, 2017 at 1:10 PM, Laura Abbott wrote: > > The set_memory_* APIs came out of a desire to have a better way to > > change memory attributes. Many of these attributes were linked to cache > > functionality so the prototypes were put in cacheflush.h. These days, > > the APIs have grown and have a much wider use than just cache APIs. To > > support this growth, split off set_memory_* and friends into a separate > > header file to avoid growing cacheflush.h for APIs that have nothing to > > do with caches. > > > > Signed-off-by: Laura Abbott > > --- > > This came out of a comment Russell made while reviewing RODATA test cases > > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480855.html > > While the final result of that series was the rodata code was refactored into > > its own header file, the set_memory_* APIs are still out of place. > > Yeah, this is a nice clean up to start on. > > > This is a simple attempt at moving all the API stubs to their own file. > > Another idea I had was throwing set_memory_{x,nx,ro,rw} in an asm-generic > > file since those are commonly used for module setting across all arches. > > It seems like asm-generic would be cleaner, yes? Only a few archs have > anything "special" happening in the resulting header files. I'd also prefer the asm-generic approach if it makes the arch part a simple addition to asm/Kbuild. Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h Date: Wed, 8 Feb 2017 09:28:30 +0000 Message-ID: <20170208092830.GB30215@arm.com> References: <1486501816-27600-1-git-send-email-labbott@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Kees Cook Cc: Mark Rutland , "linux-s390@vger.kernel.org" , linux-arch , Arnd Bergmann , Catalin Marinas , "x86@kernel.org" , Heiko Carstens , Russell King , LKML , Ingo Molnar , "H. Peter Anvin" , Martin Schwidefsky , Thomas Gleixner , Laura Abbott , "linux-arm-kernel@lists.infradead.org" List-Id: linux-arch.vger.kernel.org On Tue, Feb 07, 2017 at 01:25:53PM -0800, Kees Cook wrote: > On Tue, Feb 7, 2017 at 1:10 PM, Laura Abbott wrote: > > The set_memory_* APIs came out of a desire to have a better way to > > change memory attributes. Many of these attributes were linked to cache > > functionality so the prototypes were put in cacheflush.h. These days, > > the APIs have grown and have a much wider use than just cache APIs. To > > support this growth, split off set_memory_* and friends into a separate > > header file to avoid growing cacheflush.h for APIs that have nothing to > > do with caches. > > > > Signed-off-by: Laura Abbott > > --- > > This came out of a comment Russell made while reviewing RODATA test cases > > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480855.html > > While the final result of that series was the rodata code was refactored into > > its own header file, the set_memory_* APIs are still out of place. > > Yeah, this is a nice clean up to start on. > > > This is a simple attempt at moving all the API stubs to their own file. > > Another idea I had was throwing set_memory_{x,nx,ro,rw} in an asm-generic > > file since those are commonly used for module setting across all arches. > > It seems like asm-generic would be cleaner, yes? Only a few archs have > anything "special" happening in the resulting header files. I'd also prefer the asm-generic approach if it makes the arch part a simple addition to asm/Kbuild. Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Wed, 8 Feb 2017 09:28:30 +0000 Subject: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h In-Reply-To: References: <1486501816-27600-1-git-send-email-labbott@redhat.com> Message-ID: <20170208092830.GB30215@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Feb 07, 2017 at 01:25:53PM -0800, Kees Cook wrote: > On Tue, Feb 7, 2017 at 1:10 PM, Laura Abbott wrote: > > The set_memory_* APIs came out of a desire to have a better way to > > change memory attributes. Many of these attributes were linked to cache > > functionality so the prototypes were put in cacheflush.h. These days, > > the APIs have grown and have a much wider use than just cache APIs. To > > support this growth, split off set_memory_* and friends into a separate > > header file to avoid growing cacheflush.h for APIs that have nothing to > > do with caches. > > > > Signed-off-by: Laura Abbott > > --- > > This came out of a comment Russell made while reviewing RODATA test cases > > http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480855.html > > While the final result of that series was the rodata code was refactored into > > its own header file, the set_memory_* APIs are still out of place. > > Yeah, this is a nice clean up to start on. > > > This is a simple attempt at moving all the API stubs to their own file. > > Another idea I had was throwing set_memory_{x,nx,ro,rw} in an asm-generic > > file since those are commonly used for module setting across all arches. > > It seems like asm-generic would be cleaner, yes? Only a few archs have > anything "special" happening in the resulting header files. I'd also prefer the asm-generic approach if it makes the arch part a simple addition to asm/Kbuild. Will