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-next>] [day] [month] [year] [list]
Message-Id: <20221113233812.36784-1-nick.desaulniers@gmail.com>
Date:   Sun, 13 Nov 2022 15:38:09 -0800
From:   Nick Desaulniers <nick.desaulniers@...il.com>
To:     Masahiro Yamada <masahiroy@...nel.org>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Nick Desaulniers <nick.desaulniers@...il.com>,
        Huacai Chen <chenhuacai@...nel.org>,
        WANG Xuerui <git@...0n.name>, Guo Ren <guoren@...nel.org>,
        linux-kernel@...r.kernel.org
Cc:     rust-for-linux@...r.kernel.org, asahi@...ts.linux.dev,
        linux-kbuild@...r.kernel.org
Subject: [PATCH] scripts: subarch.include: fix SUBARCH on MacOS hosts

When building the Linux kernel on an aarch64 MacOS based host, if we don't
specify a value for ARCH when invoking make, we default to arm and thus
multi_v7_defconfig rather than the expected arm64 and arm64's defconfig.

This is because subarch.include invokes `uname -m` which on MacOS hosts
evaluates to `arm64` but on Linux hosts evaluates to `aarch64`,

This allows us to build ARCH=arm64 natively on MacOS (as in ARCH need
not be specified on an aarch64-based system).

Utilize a negative lookahead regular expression to avoid matching arm64.

Signed-off-by: Nick Desaulniers <nick.desaulniers@...il.com>
---
This is only part 1 of
https://github.com/ClangBuiltLinux/linux/commit/f06333e29addbc3d714adb340355f471c1dfe95a
I'm still working on the rest...

 scripts/subarch.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/subarch.include b/scripts/subarch.include
index 4bd327d0ae42..aa130286b627 100644
--- a/scripts/subarch.include
+++ b/scripts/subarch.include
@@ -6,7 +6,7 @@
 
 SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
 				  -e s/sun4u/sparc64/ \
-				  -e s/arm.*/arm/ -e s/sa110/arm/ \
+				  -e s/arm\(?:\(?!64\).*\)/arm/ -e s/sa110/arm/ \
 				  -e s/s390x/s390/ \
 				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
 				  -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
-- 
2.37.0 (Apple Git-136)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ