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]
Date:	Sat, 18 Apr 2009 20:17:14 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Russell King <rmk+lkml@....linux.org.uk>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	takata@...ux-m32r.org, Christoph Hellwig <hch@....de>,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] arm: use include/gen for mach-types.h

mach-types.h is a generated file.
As we no longer has a .gitignore file in asm-arm the risk
that somebody by accident commit mach-types.h is big.

Avoid this by the introduction of include/gen/ to
hold this (and soon other) generated files.

The patch includes two small cleanups to arch/arm/Makefile.
1) delete stale comment
2) combine two targets in one line and drop unused prerequisite

The idea to introduce include/gen/ is originally from Al Viro.

Signed-off-by: Sam Ravnborg <sam@...nborg.org>
Cc: Al Viro <viro@...IV.linux.org.uk>
---

Hi Russell.
This patch is _not_ tested - as I have yet to get the
arm toolchain operational.
But it looks trivial correct.

Please consider applying.

	Sam

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index e84729b..b50dfa0 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -214,15 +214,9 @@ all:	$(KBUILD_IMAGE)
 
 boot := arch/arm/boot
 
-#	Update machine arch and proc symlinks if something which affects
-#	them changed.  We use .arch to indicate when they were updated
-#	last, otherwise make uses the target directory mtime.
-
-archprepare: maketools
-
 PHONY += maketools FORCE
-maketools: include/linux/version.h FORCE
-	$(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
+archprepare maketools:
+	$(Q)$(MAKE) $(build)=arch/arm/tools include/gen/mach-types.h
 
 # Convert bzImage to zImage
 bzImage: zImage
@@ -233,8 +227,7 @@ zImage Image xipImage bootpImage uImage: vmlinux
 zinstall install: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
 
-CLEAN_FILES += include/asm-arm/mach-types.h \
-	       include/asm-arm/arch include/asm-arm/.arch
+CLEAN_FILES += include/gen/mach-types.h
 
 # We use MRPROPER_FILES and CLEAN_FILES now
 archclean:
diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h
new file mode 100644
index 0000000..e6fcab7
--- /dev/null
+++ b/arch/arm/include/asm/mach-types.h
@@ -0,0 +1,4 @@
+# mach-types is the list of machine types supported by arm
+# This file allow us to use: <asm/mach-types.h> when including mach-types
+
+#incude <gen/mach-types.h>
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index 1dbaa29..63a6aae 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -4,7 +4,7 @@
 # Copyright (C) 2001 Russell King
 #
 
-include/asm-arm/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
+include/gen/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
 	@echo '  Generating $@'
 	@mkdir -p $(dir $@)
 	$(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/include/gen/.gitignore b/include/gen/.gitignore
new file mode 100644
index 0000000..1e809fd
--- /dev/null
+++ b/include/gen/.gitignore
@@ -0,0 +1,2 @@
+# mach-types.h is used by arm
+mach-types.h
--
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