From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752198AbbCXMEw (ORCPT ); Tue, 24 Mar 2015 08:04:52 -0400 Received: from mail-we0-f180.google.com ([74.125.82.180]:34540 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751643AbbCXMEu (ORCPT ); Tue, 24 Mar 2015 08:04:50 -0400 Date: Tue, 24 Mar 2015 13:04:47 +0100 From: Paolo Pisati To: Laura Abbott Cc: Kees Cook , Will Deacon , Catalin Marinas , Rusty Russell , Russell King , "linux-arm-kernel@lists.infradead.org" , LKML Subject: Re: [PATCH 0/3] CONFIG_DEBUG_SET_MODULE_RONX fixups Message-ID: <20150324120447.GA3570@luxor.wired.org> References: <1424902497-32141-1-git-send-email-lauraa@codeaurora.org> 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 Wed, Feb 25, 2015 at 02:17:55PM -0800, Kees Cook wrote: > On Wed, Feb 25, 2015 at 2:14 PM, Laura Abbott wrote: > > Hi, > > > > CONFIG_DEBUG_SET_MODULE_RONX is currently non-functional on arm and arm64 > > because of changes in behavior of is_module_addr. This series fixes > > both arm and arm64 to work correctly and corrects a minor bug > > related to section alignment in modules. > > > > Laura Abbott (3): > > arm64: Don't use is_module_addr in setting page attributes > > arm: Don't use is_module_addr in setting page attributes > > kernel/module.c: Update debug alignment after symtable generation > > > > arch/arm/mm/pageattr.c | 5 ++++- > > arch/arm64/mm/pageattr.c | 5 ++++- > > kernel/module.c | 2 ++ > > 3 files changed, 10 insertions(+), 2 deletions(-) > > Thanks for fixing this! > > Out of curiosity, which change broke DEBUG_SET_MODULE_RONX ? (i.e. > does this need a CC: stable, and if so, through which release?) we need it for 3.19.x too: without your patches: root@beaglebone:~# cat /sys/module/bridge/sections/.text 0xbf199000 root@beaglebone:~# cat /sys/module/bridge/sections/.data 0xbf1ae000 root@beaglebone:~# grep -e 0xbf199000 -e 0xbf1ae000 /sys/kernel/debug/kernel_page_tables 0xbf199000-0xbf1b6000 116K RW x MEM/CACHED/WBRA with you patches: root@beaglebone:~# cat /sys/module/bridge/sections/.text 0xbf191000 root@beaglebone:~# cat /sys/module/bridge/sections/.data 0xbf1a6000 root@beaglebone:~# grep -e 0xbf191000 -e 0xbf1a6000 /sys/kernel/debug/kernel_page_tables 0xbf191000-0xbf1a2000 68K ro x MEM/CACHED/WBRA 0xbf1a2000-0xbf1a6000 16K ro NX MEM/CACHED/WBRA 0xbf1a6000-0xbf1ae000 32K RW NX MEM/CACHED/WBRA root@beaglebone:~# uname -a Linux beaglebone 3.19.0-9-generic #9~RONXFIX SMP Tue Mar 24 10:34:39 UTC 2015 armv7l armv7l armv7l GNU/Linux root@beaglebone:~# can you cc: stable@ ? -- bye, p. From mboxrd@z Thu Jan 1 00:00:00 1970 From: p.pisati@gmail.com (Paolo Pisati) Date: Tue, 24 Mar 2015 13:04:47 +0100 Subject: [PATCH 0/3] CONFIG_DEBUG_SET_MODULE_RONX fixups In-Reply-To: References: <1424902497-32141-1-git-send-email-lauraa@codeaurora.org> Message-ID: <20150324120447.GA3570@luxor.wired.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Feb 25, 2015 at 02:17:55PM -0800, Kees Cook wrote: > On Wed, Feb 25, 2015 at 2:14 PM, Laura Abbott wrote: > > Hi, > > > > CONFIG_DEBUG_SET_MODULE_RONX is currently non-functional on arm and arm64 > > because of changes in behavior of is_module_addr. This series fixes > > both arm and arm64 to work correctly and corrects a minor bug > > related to section alignment in modules. > > > > Laura Abbott (3): > > arm64: Don't use is_module_addr in setting page attributes > > arm: Don't use is_module_addr in setting page attributes > > kernel/module.c: Update debug alignment after symtable generation > > > > arch/arm/mm/pageattr.c | 5 ++++- > > arch/arm64/mm/pageattr.c | 5 ++++- > > kernel/module.c | 2 ++ > > 3 files changed, 10 insertions(+), 2 deletions(-) > > Thanks for fixing this! > > Out of curiosity, which change broke DEBUG_SET_MODULE_RONX ? (i.e. > does this need a CC: stable, and if so, through which release?) we need it for 3.19.x too: without your patches: root at beaglebone:~# cat /sys/module/bridge/sections/.text 0xbf199000 root at beaglebone:~# cat /sys/module/bridge/sections/.data 0xbf1ae000 root at beaglebone:~# grep -e 0xbf199000 -e 0xbf1ae000 /sys/kernel/debug/kernel_page_tables 0xbf199000-0xbf1b6000 116K RW x MEM/CACHED/WBRA with you patches: root at beaglebone:~# cat /sys/module/bridge/sections/.text 0xbf191000 root at beaglebone:~# cat /sys/module/bridge/sections/.data 0xbf1a6000 root at beaglebone:~# grep -e 0xbf191000 -e 0xbf1a6000 /sys/kernel/debug/kernel_page_tables 0xbf191000-0xbf1a2000 68K ro x MEM/CACHED/WBRA 0xbf1a2000-0xbf1a6000 16K ro NX MEM/CACHED/WBRA 0xbf1a6000-0xbf1ae000 32K RW NX MEM/CACHED/WBRA root at beaglebone:~# uname -a Linux beaglebone 3.19.0-9-generic #9~RONXFIX SMP Tue Mar 24 10:34:39 UTC 2015 armv7l armv7l armv7l GNU/Linux root at beaglebone:~# can you cc: stable@ ? -- bye, p.