Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1525548

Re: [PATCH] x86: Add warning when memmap=nn!ss and CONFIG_RANDOMIZE_BASE enabled

From Dan Williams <dan.j.williams@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] x86: Add warning when memmap=nn!ss and CONFIG_RANDOMIZE_BASE enabled
Date 2016-11-18 18:10 +0100
Message-ID <sEUPM-1xM-17@gated-at.bofh.it> (permalink)
References <sEBDs-5zX-5@gated-at.bofh.it> <sEPGp-6vc-3@gated-at.bofh.it> <sEUwq-1by-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Nov 18, 2016 at 8:47 AM, Dave Jiang <dave.jiang@intel.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
>
> On 11/18/2016 04:33 AM, Thomas Gleixner wrote:
>> On Thu, 17 Nov 2016, Dave Jiang wrote:
>>> CONFIG_RANDOMIZE_BASE can place the kernel anywhere. This causes
>>> a problem for when memmap=nn!ss is used. This information is not
>>> known until after the kernel starts executing and the decision
>>> for where the randomized base goes happens before the kernel is
>>> uncompressed. memmap=nn!ss is not reliable in the presence of
>>> CONFIG_RANDOMIZE_BASE.
>>
>> So this is a description of a problem. Now what's missing is a
>> useful explanation why you think that adding a warning will make
>> things better.
>>
>> IMNSHO adding that warning is just a pointless exercise.
>>
>> Why aren't you addressing the real issue and make the boot code
>> parse that option and prevent that region from being used for
>> kernel placement?
>>
>> The same issue exists for other memmap options as well, not just
>> for that PMEM thingy.
>>
>> Thanks,
>>
>> tglx
>>
>
> I wasn't planning to fix it because the pmem memmap option is really
> only used for testing. Is it possible to parse the kernel commandline
> parameters before the kernel is uncompressed?

Apologies, this was my mistake.  I missed that we have early boot
command line parsing in addition to the in-kernel cmdline parsing.

Dave, I think we could fix this in:
arch/x86/boot/compressed/kaslr.c::choose_random_location().

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86: Add warning when memmap=nn!ss and  CONFIG_RANDOMIZE_BASE enabled Dave Jiang <dave.jiang@intel.com> - 2016-11-17 21:40 +0100
  Re: [PATCH] x86: Add warning when memmap=nn!ss and CONFIG_RANDOMIZE_BASE  enabled Thomas Gleixner <tglx@linutronix.de> - 2016-11-18 12:40 +0100
    Re: [PATCH] x86: Add warning when memmap=nn!ss and  CONFIG_RANDOMIZE_BASE enabled Dave Jiang <dave.jiang@intel.com> - 2016-11-18 17:50 +0100
      Re: [PATCH] x86: Add warning when memmap=nn!ss and  CONFIG_RANDOMIZE_BASE enabled Dan Williams <dan.j.williams@gmail.com> - 2016-11-18 18:10 +0100
        Re: [PATCH] x86: Add warning when memmap=nn!ss and  CONFIG_RANDOMIZE_BASE enabled Dave Jiang <dave.jiang@intel.com> - 2016-11-18 18:20 +0100

csiph-web