diff mbox series

[1/4] arm: ptdump: Rename CONFIG_DEBUG_WX to CONFIG_ARM_DEBUG_WX

Message ID d651269a681150f9bdca8103434fb3f4b509f784.1704800524.git.christophe.leroy@csgroup.eu (mailing list archive)
State Handled Elsewhere
Headers show
Series Refactor CONFIG_DEBUG_WX and check_wx_pages debugfs attribute | expand

Commit Message

Christophe Leroy Jan. 9, 2024, 12:14 p.m. UTC
CONFIG_DEBUG_WX is a core option defined in mm/Kconfig.debug

To avoid any future conflict, rename ARM version
into CONFIG_ARM_DEBUG_WX.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/arm/Kconfig.debug        | 2 +-
 arch/arm/include/asm/ptdump.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Florian Fainelli Jan. 9, 2024, 5:09 p.m. UTC | #1
On 1/9/24 04:14, Christophe Leroy wrote:
> CONFIG_DEBUG_WX is a core option defined in mm/Kconfig.debug
> 
> To avoid any future conflict, rename ARM version
> into CONFIG_ARM_DEBUG_WX.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>

Looks fine, you might also want to 
s/CONFIG_DEBUG_WX/CONFIG_ARM_DEBUG_WX/ in 
arch/arm/configs/aspeed_g{4,5}_defconfig so there are no surprises when 
people pull in those changes.
kernel test robot Jan. 10, 2024, 6:34 a.m. UTC | #2
Hi Christophe,

kernel test robot noticed the following build errors:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes s390/features tip/x86/mm linus/master v6.7 next-20240109]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Christophe-Leroy/arm-ptdump-Rename-CONFIG_DEBUG_WX-to-CONFIG_ARM_DEBUG_WX/20240109-201723
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/d651269a681150f9bdca8103434fb3f4b509f784.1704800524.git.christophe.leroy%40csgroup.eu
patch subject: [PATCH 1/4] arm: ptdump: Rename CONFIG_DEBUG_WX to CONFIG_ARM_DEBUG_WX
config: arm-randconfig-003-20240110 (https://download.01.org/0day-ci/archive/20240110/202401101442.H0AGuwzu-lkp@intel.com/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 7e186d366d6c7def0543acc255931f617e76dff0)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240110/202401101442.H0AGuwzu-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401101442.H0AGuwzu-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/arm/mm/init.c:461:2: error: call to undeclared function 'debug_checkwx'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     461 |         debug_checkwx();
         |         ^
   1 error generated.


vim +/debug_checkwx +461 arch/arm/mm/init.c

08925c2f124f1b Laura Abbott 2015-11-30  457  
80d6b0c2eed2a5 Kees Cook    2014-04-03  458  void mark_rodata_ro(void)
80d6b0c2eed2a5 Kees Cook    2014-04-03  459  {
08925c2f124f1b Laura Abbott 2015-11-30  460  	stop_machine(__mark_rodata_ro, NULL, NULL);
a8e53c151fe7ac Jinbum Park  2017-12-12 @461  	debug_checkwx();
80d6b0c2eed2a5 Kees Cook    2014-04-03  462  }
80d6b0c2eed2a5 Kees Cook    2014-04-03  463
kernel test robot Jan. 10, 2024, 6:34 a.m. UTC | #3
Hi Christophe,

kernel test robot noticed the following build errors:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes s390/features tip/x86/mm linus/master v6.7 next-20240109]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Christophe-Leroy/arm-ptdump-Rename-CONFIG_DEBUG_WX-to-CONFIG_ARM_DEBUG_WX/20240109-201723
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/d651269a681150f9bdca8103434fb3f4b509f784.1704800524.git.christophe.leroy%40csgroup.eu
patch subject: [PATCH 1/4] arm: ptdump: Rename CONFIG_DEBUG_WX to CONFIG_ARM_DEBUG_WX
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240110/202401101436.2juWuJ02-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240110/202401101436.2juWuJ02-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401101436.2juWuJ02-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/arm/mm/init.c:461:2: error: implicit declaration of function 'debug_checkwx' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           debug_checkwx();
           ^
   1 error generated.


vim +/debug_checkwx +461 arch/arm/mm/init.c

08925c2f124f1b Laura Abbott 2015-11-30  457  
80d6b0c2eed2a5 Kees Cook    2014-04-03  458  void mark_rodata_ro(void)
80d6b0c2eed2a5 Kees Cook    2014-04-03  459  {
08925c2f124f1b Laura Abbott 2015-11-30  460  	stop_machine(__mark_rodata_ro, NULL, NULL);
a8e53c151fe7ac Jinbum Park  2017-12-12 @461  	debug_checkwx();
80d6b0c2eed2a5 Kees Cook    2014-04-03  462  }
80d6b0c2eed2a5 Kees Cook    2014-04-03  463
diff mbox series

Patch

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index fc2b41d41447..141151d632f6 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -17,7 +17,7 @@  config ARM_PTDUMP_DEBUGFS
 	  kernel.
 	  If in doubt, say "N"
 
-config DEBUG_WX
+config ARM_DEBUG_WX
 	bool "Warn on W+X mappings at boot"
 	depends on MMU
 	select ARM_PTDUMP_CORE
diff --git a/arch/arm/include/asm/ptdump.h b/arch/arm/include/asm/ptdump.h
index aad1d034136c..46a4575146ee 100644
--- a/arch/arm/include/asm/ptdump.h
+++ b/arch/arm/include/asm/ptdump.h
@@ -32,10 +32,10 @@  void ptdump_check_wx(void);
 
 #endif /* CONFIG_ARM_PTDUMP_CORE */
 
-#ifdef CONFIG_DEBUG_WX
-#define debug_checkwx() ptdump_check_wx()
+#ifdef CONFIG_ARM_DEBUG_WX
+#define arm_debug_checkwx() ptdump_check_wx()
 #else
-#define debug_checkwx() do { } while (0)
+#define arm_debug_checkwx() do { } while (0)
 #endif
 
 #endif /* __ASM_PTDUMP_H */