Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754176AbbB0AUE (ORCPT ); Thu, 26 Feb 2015 19:20:04 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:48602 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbbB0AUC (ORCPT ); Thu, 26 Feb 2015 19:20:02 -0500 MIME-Version: 1.0 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> <20150226160641.547657c397ecfee078779217@linux-foundation.org> Date: Thu, 26 Feb 2015 16:20:01 -0800 X-Google-Sender-Auth: HSpPumiA1Zzj2Ik5eTXouOWSnv4 Message-ID: Subject: Re: [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS From: Kees Cook To: Andrew Morton Cc: Stephen Rothwell , Ingo Molnar , Hector Marco Gisbert , LKML , ismael Ripoll , "x86@kernel.org" , linuxppc-dev@lists.ozlabs.org, "linux-arm-kernel@lists.infradead.org" , Linux MIPS Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1537 Lines: 46 On Thu, Feb 26, 2015 at 4:11 PM, Kees Cook wrote: > On Thu, Feb 26, 2015 at 4:06 PM, Andrew Morton > wrote: >> 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. > > Okay, fair enough. Even with your configs (though shouldn't they be > ARCH_HAS or just HAVE?) I've now stumbled over the issue that we can't > put randomize_et_dyn in binfmt_elf because it conflicts with linking > against compat_binfmt_elf. Instead of all this, how about we rework the existing CONFIG and just change around how s390 does this to match the other architectures and remove the ifdef in binfmt_elf.c at the same time? Let me work something up... -Kees -- Kees Cook Chrome OS Security -- 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/