From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932410AbdBGVcC (ORCPT ); Tue, 7 Feb 2017 16:32:02 -0500 Received: from mail-it0-f54.google.com ([209.85.214.54]:33480 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754736AbdBGVcA (ORCPT ); Tue, 7 Feb 2017 16:32:00 -0500 MIME-Version: 1.0 In-Reply-To: <1486501816-27600-1-git-send-email-labbott@redhat.com> References: <1486501816-27600-1-git-send-email-labbott@redhat.com> From: Kees Cook Date: Tue, 7 Feb 2017 13:25:53 -0800 X-Google-Sender-Auth: QT2j5VTBnUi5_hsDuwB8edgilb8 Message-ID: Subject: Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h To: Laura Abbott Cc: Russell King , Catalin Marinas , Will Deacon , 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -Kees -- Kees Cook Pixel Security From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <1486501816-27600-1-git-send-email-labbott@redhat.com> References: <1486501816-27600-1-git-send-email-labbott@redhat.com> From: Kees Cook Date: Tue, 7 Feb 2017 13:25:53 -0800 Message-ID: Subject: Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h Content-Type: text/plain; charset=UTF-8 Sender: linux-arch-owner@vger.kernel.org Message-ID: <20170207212553.zfIGqK8QamfKwgB5L5yxNYomxMf1-iwPSJajlHNLV2I@z> List-Archive: List-Post: To: Laura Abbott Cc: Russell King , Catalin Marinas , Will Deacon , 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 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. -Kees -- Kees Cook Pixel Security From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h Date: Tue, 7 Feb 2017 13:25:53 -0800 Message-ID: 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: In-Reply-To: <1486501816-27600-1-git-send-email-labbott@redhat.com> 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: Laura Abbott Cc: Mark Rutland , "linux-s390@vger.kernel.org" , linux-arch , Arnd Bergmann , Heiko Carstens , Catalin Marinas , "x86@kernel.org" , Will Deacon , Russell King , LKML , Ingo Molnar , "H. Peter Anvin" , Martin Schwidefsky , Thomas Gleixner , "linux-arm-kernel@lists.infradead.org" List-Id: linux-arch.vger.kernel.org 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. -Kees -- Kees Cook Pixel Security From mboxrd@z Thu Jan 1 00:00:00 1970 From: keescook@chromium.org (Kees Cook) Date: Tue, 7 Feb 2017 13:25:53 -0800 Subject: [RFC][PATCH] treewide: Move set_memory_* functions away from cacheflush.h In-Reply-To: <1486501816-27600-1-git-send-email-labbott@redhat.com> References: <1486501816-27600-1-git-send-email-labbott@redhat.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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. -Kees -- Kees Cook Pixel Security