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: <20140705112238.16142.42735.stgit@zurg>
Date:	Sat, 05 Jul 2014 15:22:38 +0400
From:	Konstantin Khlebnikov <koct9i@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Cc:	x86@...nel.org, user-mode-linux-devel@...ts.sourceforge.net,
	linux-kbuild@...r.kernel.org
Subject: [PATCH] checkstack: use $UTS_MACHINE as target architecture

This fixes command # make checkstack for i386/x86_64.
Looks like $UTS_MACHINE is exactly what scripts/checkstack.pl needs.

By default $UTS_MACHINE is equal to $ARCH, but some arch/${ARCH}/Makefile
overrides it. This patch updates it also in arch/x86/Makefile.um

broken in ffee0de ("x86: Default to ARCH=x86 to avoid overriding CONFIG_64BIT")

Signed-off-by: Konstantin Khlebnikov <koct9i@...il.com>
---
 Makefile             |   11 +----------
 arch/x86/Makefile.um |    2 ++
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile
index b0ee945..50fb690 100644
--- a/Makefile
+++ b/Makefile
@@ -1416,18 +1416,9 @@ endif #ifeq ($(mixed-targets),1)
 
 PHONY += checkstack kernelrelease kernelversion image_name
 
-# UML needs a little special treatment here.  It wants to use the host
-# toolchain, so needs $(SUBARCH) passed to checkstack.pl.  Everyone
-# else wants $(ARCH), including people doing cross-builds, which means
-# that $(SUBARCH) doesn't work here.
-ifeq ($(ARCH), um)
-CHECKSTACK_ARCH := $(SUBARCH)
-else
-CHECKSTACK_ARCH := $(ARCH)
-endif
 checkstack:
 	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
-	$(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
+	$(PERL) $(src)/scripts/checkstack.pl $(UTS_MACHINE)
 
 kernelrelease:
 	@echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index 36b62bc..8fc912b 100644
--- a/arch/x86/Makefile.um
+++ b/arch/x86/Makefile.um
@@ -3,6 +3,7 @@ core-y += arch/x86/crypto/
 ifeq ($(CONFIG_X86_32),y)
 START := 0x8048000
 
+UTS_MACHINE		:= i386
 LDFLAGS			+= -m elf_i386
 ELF_ARCH		:= i386
 ELF_FORMAT 		:= elf32-i386
@@ -47,6 +48,7 @@ KBUILD_AFLAGS += -m64
 LDFLAGS += -m elf_x86_64
 KBUILD_CPPFLAGS += -m64
 
+UTS_MACHINE := x86_64
 ELF_ARCH := i386:x86-64
 ELF_FORMAT := elf64-x86-64
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ