Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754427AbbBZXjb (ORCPT ); Thu, 26 Feb 2015 18:39:31 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60549 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbbBZXja (ORCPT ); Thu, 26 Feb 2015 18:39:30 -0500 Date: Thu, 26 Feb 2015 15:39:28 -0800 From: Andrew Morton To: Kees Cook Cc: Ingo Molnar , Hector Marco Gisbert , LKML , ismael Ripoll , "x86@kernel.org" , "linux-arm-kernel@lists.infradead.org" , Linux MIPS Mailing List , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS Message-Id: <20150226153928.1df44df8a0d885fa71c471ce@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> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 933 Lines: 24 On Thu, 26 Feb 2015 15:34:36 -0800 Kees Cook wrote: > >> That pointless repetition should be avoided. > > > > That's surprisingly hard! > > > > After renaming mips brk_rnd() to mmap_rnd() I had a shot. I'm not very > > confident in the result. Does that __weak trick even work? > > In theory, it shouldn't be needed since only randomize_et_dyn will > call mmap_rnd, and only architectures that use randomize_et_dyn will > call it ... and will define mmap_rnd. But randomize_et_dyn() is compiled for all architectures. Or it was, until I did the CONFIG_ARCH_HAVE_ELF_ASLR thing. It seems odd that we have this per-arch feature but no Kconfig switch for it. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/