Return-Path: Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id CD13D1A0007 for ; Fri, 27 Feb 2015 11:06:44 +1100 (AEDT) Date: Thu, 26 Feb 2015 16:06:41 -0800 From: Andrew Morton To: Kees Cook Subject: Re: [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS Message-Id: <20150226160641.547657c397ecfee078779217@linux-foundation.org> In-Reply-To: References: <54EB735F.5030207@upv.es> <20150223205436.15133mg1kpyojyik@webmail.upv.es> <20150224073906.GA16422@gmail.com> <20150226143815.09386fe280c7bd8797048bb2@linux-foundation.org> <20150227102136.17ef1fe6@canb.auug.org.au> <20150226153435.df670671fb10eb9efa0fa845@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: Stephen Rothwell , "x86@kernel.org" , Hector Marco Gisbert , LKML , "linux-arm-kernel@lists.infradead.org\" , Linux MIPS Mailing List , linuxppc-dev@lists.ozlabs.org"@localhost.localdomain, Ingo Molnar , ismael Ripoll List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 26 Feb 2015 15:37:37 -0800 Kees Cook wrote: > Agh, no, please let's avoid the CONFIG addition. That is precisely how we do this. > Hector mentioned in private mail that he was looking at an alternative > that adds exec_base to struct mm which would avoid all this insanity. > > Can't we do something like: > > #ifndef mmap_rnd > # define mmap_rnd 0 > #endif Sure, and sprinkle #define mmap_rnd mmap_rnd in five arch header files where nobody thinks to look. For better or for worse, we are consolidating such things into arch/*/Kconfig.