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] [day] [month] [year] [list]
Message-ID: <20150716163202.GB20221@sepie.suse.cz>
Date:	Thu, 16 Jul 2015 18:32:02 +0200
From:	Michal Marek <mmarek@...e.cz>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Vineet Gupta <Vineet.Gupta1@...opsys.com>,
	lkml <linux-kernel@...r.kernel.org>,
	"arc-linux-dev@...opsys.com" <arc-linux-dev@...opsys.com>,
	Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
	Joel Porquet <joel@...quet.org>
Subject: Re: [GIT PULL] ARC fixes for 4.2-rc3

On Wed, Jul 15, 2015 at 01:29:07PM -0700, Linus Torvalds wrote:
> What happens if the environment has ARCH_CFLAGS set? The build will
> start using them. Sure, we've had this before, and maybe the ARCH_
> prefix makes it unique enough, but generally I think we've tried to
> either
> 
>  (a) make sure they get initialized in the makefiles (eg the usual
> CFLAGS is set to empty by the arch things, so that we don't silently
> take them from the environment)

Good point. I'll add the below patch to my tree.


> I don't think this is a big deal, and I suspect we may have other
> cases where we do this, but I do not think that the *intention* was
> that people could use this as another KCFLAGS replacement...

It was definitely not intended to be set by the user.

Michal

>From f821bf39576444276917bd6737c526d361c69221 Mon Sep 17 00:00:00 2001
From: Michal Marek <mmarek@...e.com>
Date: Thu, 16 Jul 2015 18:23:53 +0200
Subject: [PATCH] kbuild: Do not pick up ARCH_{CPP,A,C}FLAGS from the
 environment

Initialize the ARCH_* overrides before including the arch Makefile, to
avoid picking up the values from the environment. The variables can
still be overriden on the make command line, but this won't happen
by accident.

Signed-off-by: Michal Marek <mmarek@...e.com>
---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index 2f49d89..a99a14d 100644
--- a/Makefile
+++ b/Makefile
@@ -597,6 +597,11 @@ endif # $(dot-config)
 # Defaults to vmlinux, but the arch makefile usually adds further targets
 all: vmlinux
 
+# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
+# values of the respective KBUILD_* variables
+ARCH_CPPFLAGS :=
+ARCH_AFLAGS :=
+ARCH_CFLAGS :=
 include arch/$(SRCARCH)/Makefile
 
 KBUILD_CFLAGS	+= $(call cc-option,-fno-delete-null-pointer-checks,)
-- 
2.1.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