From: Dave Jiang <dave.jiang@intel.com>
To: Dan Williams <dan.j.williams@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
the arch/x86 maintainers <x86@kernel.org>,
Dave Chinner <david@fromorbit.com>,
LKML <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] x86: Add warning when memmap=nn!ss and CONFIG_RANDOMIZE_BASE enabled
Date: Fri, 18 Nov 2016 10:13:05 -0700 [thread overview]
Message-ID: <ef0f4b1c-2a18-3dd9-a2f4-8c49d980c2ff@intel.com> (raw)
In-Reply-To: <CAA9_cmf9bPnPLZN0m1_OtLxZBJZhE6X16fRzkC7WOQQBZnu4QA@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 11/18/2016 10:07 AM, Dan Williams wrote:
> 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().
>
Actually it was my fault. I was digging around that and somehow
totally missed the early command line parsing bits.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iF4EAREIAAYFAlgvNqEACgkQZBXE8WajuT71LAD9GGV5sL9bAkunWlZZylNGZ+Ug
XRfcnKB1g1+SJ4JFDuYA/RxrHAyBBhteIfSuORl5T+1ACYqwTA0MuHFwiASHXbuQ
=+j9S
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2016-11-18 17:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 20:36 Dave Jiang
2016-11-18 11:33 ` Thomas Gleixner
2016-11-18 16:47 ` Dave Jiang
2016-11-18 17:07 ` Dan Williams
2016-11-18 17:13 ` Dave Jiang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef0f4b1c-2a18-3dd9-a2f4-8c49d980c2ff@intel.com \
--to=dave.jiang@intel.com \
--cc=dan.j.williams@gmail.com \
--cc=david@fromorbit.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@ml01.01.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®