All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Chao Fan <fanc.fnst@cn.fujitsu.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com,
	tglx@linutronix.de, mingo@redhat.com, keescook@chromium.org,
	yasu.isimatu@gmail.com, indou.takao@jp.fujitsu.com,
	lcapitulino@redhat.com
Subject: Re: [PATCH v9 0/5] x86/KASLR: Add parameter kaslr_boot_mem=nn[KMG]@ss[KMG]
Date: Mon, 12 Mar 2018 18:10:31 +0800	[thread overview]
Message-ID: <20180312101031.GH18656@localhost.localdomain> (raw)
In-Reply-To: <20180312093557.gxypr66vrbftz3v3@gmail.com>

Hi Ingo,

On 03/12/18 at 10:35am, Ingo Molnar wrote:
> 
> * Chao Fan <fanc.fnst@cn.fujitsu.com> wrote:
> 
> > Long time no reply, rebase the patchset, change the parameter name
> > from 'kaslr_mem' to 'kaslr_boot_mem'. There's no more code change.
> > 
> > ***Background:
> > People reported that kaslr may randomly chooses some positions
> > which are located in movable memory regions. This will break memory
> > hotplug feature.
> 
> [...]
> 
> > ***Solutions:
> > Introduce a new kernel parameter 'kaslr_boot_mem=nn@ss' to let users to
> > specify the memory regions where kernel can be allowed to randomize
> > safely.
> 
> Manual solutions like that are pretty suboptimal to users, aren't they?
> 
> In what way does memory hotplug feature 'break'? Does it crash or misbehave? Or 
> simply does it not allow the movement of the affected memory region, while still 
> allowing the rest to be moved?

AFAIT, if kernel is randomized into the movable memory region, the
affected memory region can not be hot added/removed since it has kernel
data. Surely, the system can still work, the unaffected part still can
be moved. Still it will cause regression on memory hotplug.

Mainly we parse SRAT table to get the ranges of memory provided by
hot-added memory devices in initmem_init(), that's very late. During boot,
we don't know it. Chao ever posted patches to grab SRAT at decompressing
stage, the code is very complicated and not elegant, ACPI maintainer
NACKed that.

Thanks
Baoquan

  reply	other threads:[~2018-03-12 10:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 10:51 [PATCH v9 0/5] x86/KASLR: Add parameter kaslr_boot_mem=nn[KMG]@ss[KMG] Chao Fan
2018-02-28 10:51 ` [PATCH v9 1/5] x86/KASLR: Add kaslr_boot_mem=nn[KMG]@ss[KMG] Chao Fan
2018-02-28 10:51 ` [PATCH v9 2/5] x86/KASLR: Handle the memory regions specified in kaslr_boot_mem Chao Fan
2018-02-28 10:51 ` [PATCH v9 3/5] x86/KASLR: Give a warning if movable_node specified without kaslr_boot_mem= Chao Fan
2018-02-28 10:51 ` [PATCH v9 4/5] x86/KASLR: Skip memory mirror handling if movable_node specified Chao Fan
2018-02-28 10:51 ` [PATCH v9 5/5] document: add document for kaslr_boot_mem Chao Fan
2018-03-12  9:35 ` [PATCH v9 0/5] x86/KASLR: Add parameter kaslr_boot_mem=nn[KMG]@ss[KMG] Ingo Molnar
2018-03-12 10:10   ` Baoquan He [this message]
2018-03-12 10:57     ` Ingo Molnar
2018-03-12 12:04       ` Chao Fan
2018-03-13 14:02         ` Baoquan He
2018-03-19  7:24         ` Baoquan He
2018-03-19  8:17           ` Chao Fan
2018-03-29  1:47       ` Dou Liyang

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=20180312101031.GH18656@localhost.localdomain \
    --to=bhe@redhat.com \
    --cc=fanc.fnst@cn.fujitsu.com \
    --cc=hpa@zytor.com \
    --cc=indou.takao@jp.fujitsu.com \
    --cc=keescook@chromium.org \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yasu.isimatu@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.