linux-mips
[Top] [All Lists]

Re: [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS

To: Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS
From: Kees Cook <keescook@chromium.org>
Date: Thu, 26 Feb 2015 16:20:01 -0800
Cc: Stephen Rothwell <sfr@canb.auug.org.au>, Ingo Molnar <mingo@kernel.org>, Hector Marco Gisbert <hecmargi@upv.es>, LKML <linux-kernel@vger.kernel.org>, ismael Ripoll <iripoll@upv.es>, "x86@kernel.org" <x86@kernel.org>, linuxppc-dev@lists.ozlabs.org, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, Linux MIPS Mailing List <linux-mips@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=buln40DTAaO8glvl2c6Cee+P8uhXmBnT4FArnfWEgLA=; b=XpeK42CgZPqLZ8BVmhFUMmmqETjETah4H71+SpcpjdCWaFRjH0VF+HWDNrP+ChQqPo kd4AAnJNDArueoiM4lbfCC+n8hB8+40exgh2B2QGfkY7JaZHNdKVzjmncA7VdWNvKNQI 6M1U5cZLwqBVxmKjPoGdWQSGnBsoCg9ixIE7qqksNvQ2kIuJqYg31aeoQ7TML0+ikwY6 xeGFDu6Z5nVHqa3FgNPfWmV+/BUkV552+eFR6e3utl6kl5W5zTceeQKMNAyxlMEO0Umn /G7mVfvoOucTqVrUfXs/DmTn2/yt/ph38lNFWq1zmkmMA6HjZwjNlibUE7CaQZUgHwLm 9a6w==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=buln40DTAaO8glvl2c6Cee+P8uhXmBnT4FArnfWEgLA=; b=d2Qbba0fUzgq12P/T/GcEszb6NoPvqoXVDjG3w+MNAE4Pbd+zF/ORtuCsKHgAO3656 yFl8lmzZZhzH63riWga3Upy/uahRcPZ3scddXs0zR/WPAeZvRnaEQkl1syClYi0xmesd TlEi4hm7DE9XMME+yEttn0m/I/020xrTgcKx8=
In-reply-to: <CAGXu5j+3D7FrAJNLHTgEuK5wnOmUZG13xxi6eONuWiY2zKCMqQ@mail.gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <54EB735F.5030207@upv.es> <CAGXu5j+SBRcj+BGyxEwUzgKsB2fdzNiPY37Q=JTsf=-QbGwoGA@mail.gmail.com> <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> <CAGXu5jK0YbyL+Z=YrCfkfGbYz6=65Rr_MAXLwrF36gJa2Ce4_w@mail.gmail.com> <20150226160641.547657c397ecfee078779217@linux-foundation.org> <CAGXu5j+3D7FrAJNLHTgEuK5wnOmUZG13xxi6eONuWiY2zKCMqQ@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Thu, Feb 26, 2015 at 4:11 PM, Kees Cook <keescook@chromium.org> wrote:
> On Thu, Feb 26, 2015 at 4:06 PM, Andrew Morton
> <akpm@linux-foundation.org> wrote:
>> On Thu, 26 Feb 2015 15:37:37 -0800 Kees Cook <keescook@chromium.org> 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

<Prev in Thread] Current Thread [Next in Thread>