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: <1371129052-31506-4-git-send-email-geert@linux-m68k.org>
Date:	Thu, 13 Jun 2013 15:10:52 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	Simon Horman <horms@...ge.net.au>,
	Magnus Damm <magnus.damm@...il.com>,
	Russell King <linux@....linux.org.uk>,
	Paul Mundt <lethal@...ux-sh.org>
Cc:	David McCullough <david_mccullough@...securecomputing.com>,
	Thorsten Glaser <tg@...bsd.org>, linux-sh@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-kbuild@...r.kernel.org,
	Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 3/3] sh/boot: Use POSIX "$((..))" instead of bashism "$[...]"

According to the bash 4.1 manpage, "$[...]" is deprecated, and will be
removed in upcoming versions of bash.
Hence replace the bash-specific "$[...]" by POSIX "$((..))" for arithmetic
expansion, which also allows to drop the forced use of bash.

Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
 arch/sh/boot/Makefile            |   24 ++++++++++++------------
 arch/sh/boot/compressed/Makefile |   14 +++++++-------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile
index 4ab2ba5..e10fb9b 100644
--- a/arch/sh/boot/Makefile
+++ b/arch/sh/boot/Makefile
@@ -46,18 +46,18 @@ $(obj)/romImage: $(obj)/romimage/vmlinux FORCE
 $(obj)/romimage/vmlinux: $(obj)/zImage FORCE
 	$(Q)$(MAKE) $(build)=$(obj)/romimage $@
 
-KERNEL_MEMORY	:= $(shell /bin/bash -c 'printf "0x%08x" \
-		     $$[$(CONFIG_PHYSICAL_START) & 0x1fffffff]')
-
-KERNEL_LOAD	:= $(shell /bin/bash -c 'printf "0x%08x" \
-		     $$[$(CONFIG_PAGE_OFFSET)  + \
-			$(KERNEL_MEMORY) + \
-			$(CONFIG_ZERO_PAGE_OFFSET)]')
-
-KERNEL_ENTRY	:= $(shell /bin/bash -c 'printf "0x%08x" \
-		     $$[$(CONFIG_PAGE_OFFSET)  + \
-			$(KERNEL_MEMORY) + \
-			$(CONFIG_ZERO_PAGE_OFFSET) + $(CONFIG_ENTRY_OFFSET)]')
+KERNEL_MEMORY	:= $(shell printf "0x%08x" \
+		     $$(($(CONFIG_PHYSICAL_START) & 0x1fffffff)))
+
+KERNEL_LOAD	:= $(shell printf "0x%08x" \
+		     $$(($(CONFIG_PAGE_OFFSET) + \
+			 $(KERNEL_MEMORY) + \
+			 $(CONFIG_ZERO_PAGE_OFFSET))))
+
+KERNEL_ENTRY	:= $(shell printf "0x%08x" \
+		     $$(($(CONFIG_PAGE_OFFSET) + \
+			 $(KERNEL_MEMORY) + \
+			 $(CONFIG_ZERO_PAGE_OFFSET) + $(CONFIG_ENTRY_OFFSET))))
 
 UIMAGE_LOADADDR = $(KERNEL_LOAD)
 UIMAGE_ENTRYADDR = $(KERNEL_ENTRY)
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index 43d1b9a..0330ba7 100644
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -17,14 +17,14 @@ GCOV_PROFILE := n
 # IMAGE_OFFSET is the load offset of the compression loader
 #
 ifeq ($(CONFIG_32BIT),y)
-IMAGE_OFFSET	:= $(shell /bin/bash -c 'printf "0x%08x" \
-		     $$[$(CONFIG_MEMORY_START)  + \
-			$(CONFIG_BOOT_LINK_OFFSET)]')
+IMAGE_OFFSET	:= $(shell printf "0x%08x" \
+		     $$(($(CONFIG_MEMORY_START) + \
+			 $(CONFIG_BOOT_LINK_OFFSET))))
 else
-IMAGE_OFFSET	:= $(shell /bin/bash -c 'printf "0x%08x" \
-		     $$[$(CONFIG_PAGE_OFFSET)  + \
-			$(KERNEL_MEMORY) + \
-			$(CONFIG_BOOT_LINK_OFFSET)]')
+IMAGE_OFFSET	:= $(shell printf "0x%08x" \
+		     $$(($(CONFIG_PAGE_OFFSET) + \
+		         $(KERNEL_MEMORY) + \
+			 $(CONFIG_BOOT_LINK_OFFSET))))
 endif
 
 ifeq ($(CONFIG_MCOUNT),y)
-- 
1.7.0.4

--
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