lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ttcuzjy7.ffs@tglx>
Date: Tue, 29 Oct 2024 22:18:56 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: kernel test robot <lkp@...el.com>, Vincenzo Frascino
 <vincenzo.frascino@....com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
 x86@...nel.org, Arnd Bergmann <arnd@...db.de>, Geert Uytterhoeven
 <geert@...ux-m68k.org>
Subject: Re: [tip:timers/vdso 11/13] include/vdso/page.h:15:39: error:
 'CONFIG_PAGE_SHIFT' undeclared here (not in a function); did you mean
 'CONFIG_LOG_BUF_SHIFT'?

On Tue, Oct 29 2024 at 06:38, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
> head:   d4a65302dd849fade9e2ca712826c35b8d068ecb
> commit: efe8419ae78d65e83edc31aad74b605c12e7d60c [11/13] vdso: Introduce vdso/page.h
> config: m68k-alldefconfig (https://download.01.org/0day-ci/archive/20241029/202410290639.TBG289SO-lkp@intel.com/config)
> compiler: m68k-linux-gcc (GCC) 14.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241029/202410290639.TBG289SO-lkp@intel.com/reproduce)

>      6	
>      7	/*
>      8	 * PAGE_SHIFT determines the page size.
>      9	 *
>     10	 * Note: This definition is required because PAGE_SHIFT is used
>     11	 * in several places throuout the codebase.
>     12	 */
>   > 13	#define PAGE_SHIFT      CONFIG_PAGE_SHIFT
>     14	
>   > 15	#define PAGE_SIZE	(_AC(1,UL) << CONFIG_PAGE_SHIFT)
>     16	

That's actually not the culprit. The problem exists in mainline too. The
actual root cause is:

  5394f1e9b687 ("arch: define CONFIG_PAGE_SIZE_*KB on all architectures")

The config has no CONFIG_PAGE_SHIFT because nothing selects a page size. The
the original code had:

if defined(CONFIG_SUN3) || defined(CONFIG_COLDFIRE)
#define PAGE_SHIFT     13
#else
#define PAGE_SHIFT     12
#endif                        

But the Kconfig magic changes made this depend on various other things.

The patch below cures it, but it needs an eyeball from Geert.

Thanks,

        tglx
---
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index cc26df907bfe..6f50fdc4dff2 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -85,15 +85,12 @@ config MMU
 
 config MMU_MOTOROLA
 	bool
-	select HAVE_PAGE_SIZE_4KB
 
 config MMU_COLDFIRE
-	select HAVE_PAGE_SIZE_8KB
 	bool
 
 config MMU_SUN3
 	bool
-	select HAVE_PAGE_SIZE_8KB
 	depends on MMU && !MMU_MOTOROLA && !MMU_COLDFIRE
 
 config ARCH_SUPPORTS_KEXEC
diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index c777a129768a..4d16215e7e45 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -21,6 +21,8 @@ choice
 config M68KCLASSIC
 	bool "Classic M68K CPU family support"
 	select HAVE_ARCH_PFN_VALID
+	select HAVE_PAGE_SIZE_4KB if !SUN3
+	select HAVE_PAGE_SIZE_8KB if SUN3
 
 config COLDFIRE
 	bool "Coldfire CPU family support"
@@ -30,7 +32,7 @@ config COLDFIRE
 	select GENERIC_CSUM
 	select GPIOLIB
 	select HAVE_LEGACY_CLK
-	select HAVE_PAGE_SIZE_8KB if !MMU
+	select HAVE_PAGE_SIZE_8KB
 
 endchoice
 
@@ -46,7 +48,6 @@ config M68000
 	select GENERIC_CSUM
 	select CPU_NO_EFFICIENT_FFS
 	select HAVE_ARCH_HASH
-	select HAVE_PAGE_SIZE_4KB
 	select LEGACY_TIMER_TICK
 	help
 	  The Freescale (was Motorola) 68000 CPU is the first generation of

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ