linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: james.morse@arm.com (James Morse)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: mark kernel text segment as MEMBLOCK_NOMAP
Date: Tue, 16 Feb 2016 11:13:05 +0000	[thread overview]
Message-ID: <56C30441.1080003@arm.com> (raw)
In-Reply-To: <CAKv+Gu_yTz-ohFPS0wMX42iCkDNaSwZoZ8Yi-zsZNNu1LNDkZQ@mail.gmail.com>

On 16/02/16 10:57, Ard Biesheuvel wrote:
> On 16 February 2016 at 11:50, James Morse <james.morse@arm.com> wrote:
>> On 15/02/16 09:28, Ard Biesheuvel wrote:
>>> This should hopefully address the issue reported by James, but I suppose
>>> more work is required on the hibernate side to ensure the unmapped text
>>> region is preserved, since it is no longer covered by the linear mapping.
>>
>> It does, now I have to work out how best to fix hibernate!
>>
> 
> Indeed. The alternative would be to map the [_stext, _etext] interval
> into the linear region as a ro/nx alias of the actual mapping in the
> vmalloc region. That would probably make your life easier, but I am
> not convinced the overall result is better.

I assumed you would NACK any approach that looked like that:
It could be done temporarily while the memory snapshot is being taken, only
swsusp_save() would see this mapping, it can be removed again afterwards. But
pfn_valid() will still say those pages aren't there, and there is no
memblock_clear_nomap() to change this.


The current approach involves copying the kernel text into pages that are saved,
and having two lists of pages that need restoring. (wheels within wheels!)
Pretty unpleasant, and requires another patch in the core code, so likely won't
be possible for v4.6. I should have the patches out for review later today.



James

  reply	other threads:[~2016-02-16 11:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  9:28 [PATCH] arm64: mark kernel text segment as MEMBLOCK_NOMAP Ard Biesheuvel
2016-02-15 11:45 ` Catalin Marinas
2016-02-15 11:53   ` Ard Biesheuvel
2016-02-15 11:56     ` Ard Biesheuvel
2016-02-15 12:08     ` Catalin Marinas
2016-02-15 17:17       ` Ard Biesheuvel
2016-02-15 17:35         ` Catalin Marinas
2016-02-16  8:49       ` Ard Biesheuvel
2016-02-16 10:57         ` Catalin Marinas
2016-02-16 10:50 ` James Morse
2016-02-16 10:57   ` Ard Biesheuvel
2016-02-16 11:13     ` James Morse [this message]
2016-02-16 12:11       ` Ard Biesheuvel

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=56C30441.1080003@arm.com \
    --to=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).