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


Groups > linux.kernel > #1453512

Re: [PATCH v1 0/2] x86/power/64: Make KASLR memory randomization compatible with hibernation

From "Rafael J. Wysocki" <rjw@rjwysocki.net>
Newsgroups linux.kernel
Subject Re: [PATCH v1 0/2] x86/power/64: Make KASLR memory randomization compatible with hibernation
Date 2016-08-02 01:50 +0200
Message-ID <s1v85-4Pg-15@gated-at.bofh.it> (permalink)
References <s1oT0-Iy-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Monday, August 01, 2016 10:07:58 AM Thomas Garnier wrote:
> ***Background:
> KASLR memory randomization for x86_64 was added when KASLR did not support hibernation. Now that it does, some changes are needed.
> 
> ***Problems that needed solving:
> Hibernation was failing on reboot with a GP fault when CONFIG_RANDOMIZE_MEMORY was enabled. Two issues were identified.
> 
> The original fault was due to a wrong physical address assigned to cr3. The problem was introduced with __PAGE_OFFSET becoming a global variable when randomized. The fix uses a define to use the glbobal or immediate value based on config settings.
> 
> The second isssue was that the temporary page table mapping did not support virtual addresses not aligned on PGD level. KASLR memory randomization will generated a random address aligned on PUD level. The fix correctly calculates the offset on all levels of the temporary page table.
> 
> ***Parts:
>  - 01/02: Support unaligned addresses (second issue)
>  - 02/02: Fix __PAGE_OFFSET usage on assembly (first issue)

Thanks a lot for taking care of this!

Patch [2/2] looks good to me, but I'd to the [1/2] differently (more details
will follow).

Thanks,
Rafael

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


Thread

[PATCH v1 0/2] x86/power/64: Make KASLR memory randomization compatible with hibernation Thomas Garnier <thgarnie@google.com> - 2016-08-01 19:10 +0200
  [PATCH v1 1/2] x86/power/64: Support unaligned addresses for temporary mapping Thomas Garnier <thgarnie@google.com> - 2016-08-01 19:10 +0200
    Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for temporary mapping "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-02 02:40 +0200
      Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for  temporary mapping Yinghai Lu <yinghai@kernel.org> - 2016-08-02 21:10 +0200
    Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for  temporary mapping Yinghai Lu <yinghai@kernel.org> - 2016-08-02 20:00 +0200
      Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for  temporary mapping Thomas Garnier <thgarnie@google.com> - 2016-08-02 20:00 +0200
        Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for  temporary mapping Yinghai Lu <yinghai@kernel.org> - 2016-08-02 22:00 +0200
          Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for  temporary mapping Thomas Garnier <thgarnie@google.com> - 2016-08-03 18:40 +0200
          [PATCH v2] x86/power/64: Support unaligned addresses for temporary mapping Yinghai Lu <yinghai@kernel.org> - 2016-08-03 23:00 +0200
            Re: [PATCH v2] x86/power/64: Support unaligned addresses for  temporary mapping "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-04 00:40 +0200
              Re: [PATCH v2] x86/power/64: Support unaligned addresses for temporary mapping "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-07 03:00 +0200
                Re: [PATCH v2] x86/power/64: Support unaligned addresses for  temporary mapping Yinghai Lu <yinghai@kernel.org> - 2016-08-07 07:00 +0200
                Re: [PATCH v2] x86/power/64: Support unaligned addresses for temporary mapping "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-08 01:20 +0200
                Re: [PATCH v2] x86/power/64: Support unaligned addresses for  temporary mapping Yinghai Lu <yinghai@kernel.org> - 2016-08-08 09:10 +0200
                Re: [PATCH v2] x86/power/64: Support unaligned addresses for  temporary mapping Yinghai Lu <yinghai@kernel.org> - 2016-08-08 09:30 +0200
                Re: [PATCH v2] x86/power/64: Support unaligned addresses for temporary mapping "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-08 15:20 +0200
  Re: [PATCH v1 0/2] x86/power/64: Make KASLR memory randomization compatible with hibernation "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-02 01:50 +0200
    Re: [PATCH v1 0/2] x86/power/64: Make KASLR memory randomization compatible with hibernation "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-02 02:50 +0200

csiph-web