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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D23DC9B8BD1C245D+20250211140740.1812778-2-wangyuli@uniontech.com>
Date: Tue, 11 Feb 2025 22:07:40 +0800
From: WangYuli <wangyuli@...ontech.com>
To: wangyuli@...ontech.com
Cc: tsbogend@...ha.franken.de,
	linux-mips@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	macro@...am.me.uk,
	masahiroy@...nel.org,
	jiaxun.yang@...goat.com,
	zhanjun@...ontech.com,
	guanwentao@...ontech.com,
	Chen Linxuan <chenlinxuan@...ontech.com>
Subject: [PATCH 2/2] MIPS: Explicitly check KBUILD_SYM32=n

During make module_install, the need_compiler variable becomes 0,
so Makefile.compiler isn't included.

This results in call cc-option-yn returning nothing.

Add a check for KBUILD_SYM32=n to avoid the
"CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32" error
when KBUILD_SYM32 is unset (meaning it's not 'y' or 'n').

Fixes: 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed")
Fixes: 18ca63a2e23c ("MIPS: Probe toolchain support of -msym32")
Reported-by: Maciej W. Rozycki <macro@...am.me.uk>
Closes: https://lore.kernel.org/all/alpine.DEB.2.21.2501030535080.49841@angie.orcam.me.uk/
Co-developed-by: Chen Linxuan <chenlinxuan@...ontech.com>
Signed-off-by: Chen Linxuan <chenlinxuan@...ontech.com>
Signed-off-by: WangYuli <wangyuli@...ontech.com>
---
 arch/mips/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 962eb749ed23..2a0bf69c842b 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -304,8 +304,13 @@ ifdef CONFIG_64BIT
   ifeq ($(KBUILD_SYM32), y)
     cflags-y += -msym32 -DKBUILD_64BIT_SYM32
   else
-    ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
-      $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
+# During make module_install, the need_compiler variable
+# becomes 0, so Makefile.compiler isn't included.
+# This results in call cc-option-yn returning nothing.
+    ifeq ($(KBUILD_SYM32), n)
+      ifeq ($(CONFIG_CPU_DADDI_WORKAROUNDS), y)
+        $(error CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32)
+      endif
     endif
   endif
 endif
-- 
2.47.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ