Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1457160
| From | Thomas Garnier <thgarnie@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/power/64: Do not refer to __PAGE_OFFSET from assembly code |
| Date | 2016-08-05 17:30 +0200 |
| Message-ID | <s2Pep-PT-3@gated-at.bofh.it> (permalink) |
| References | <s1oT0-Iy-21@gated-at.bofh.it> <s1R8B-2L9-5@gated-at.bofh.it> <s2KHM-6gz-7@gated-at.bofh.it> <s2Os2-i5-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Aug 5, 2016 at 7:44 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > On Friday, August 05, 2016 12:37:13 PM Pavel Machek wrote: >> On Wed 2016-08-03 01:19:26, Rafael J. Wysocki wrote: >> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >> > >> > When CONFIG_RANDOMIZE_MEMORY is set on x86-64, __PAGE_OFFSET becomes >> > a variable and using it as a symbol in the image memory restoration >> > assembly code under core_restore_code is not correct any more. >> >> On a related note... we should really have page_offset variable in >> such case, and use that -- having __FOO_BAR not being a constant is >> ugly/confusing/dangerous. >> >> > To avoid that problem, modify set_up_temporary_mappings() to compute >> > the physical address of the temporary page tables and store it in >> > temp_level4_pgt, so that the value of that variable is ready to be >> > written into CR3. Then, the assembly code doesn't have to worry >> > about converting that value into a physical address and things work >> > regardless of whether or not CONFIG_RANDOMIZE_MEMORY is set. >> > >> > Reported-and-tested-by: Thomas Garnier <thgarnie@google.com> >> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >> >> Acked-by: Pavel Machek <pavel@ucw.cz> >> >> Is similar patch needed for i386? > > Yes, it is, in general, for i386 hibernation to work with ASLR. > > But it doesn't work with it for other reasons ATM, AFAICS. > > Unfortunately, I won't really have the time to take care of this any time > soon. > KASLR memory randomization is only available for x64 right now. I plan on porting to 32bit eventually and will test/adapt hibernation as part of it. > Thanks, > Rafael >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v1 2/2] x86/power/64: Fix __PAGE_OFFSET usage on restore Thomas Garnier <thgarnie@google.com> - 2016-08-01 19:10 +0200
Re: [PATCH v1 2/2] x86/power/64: Fix __PAGE_OFFSET usage on restore "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-02 02:50 +0200
Re: [PATCH v1 2/2] x86/power/64: Fix __PAGE_OFFSET usage on restore Thomas Garnier <thgarnie@google.com> - 2016-08-02 16:50 +0200
Re: [PATCH v1 2/2] x86/power/64: Fix __PAGE_OFFSET usage on restore Thomas Garnier <thgarnie@google.com> - 2016-08-02 23:00 +0200
Re: [PATCH v1 2/2] x86/power/64: Fix __PAGE_OFFSET usage on restore "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-02 23:20 +0200
[PATCH] x86/power/64: Do not refer to __PAGE_OFFSET from assembly code "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-03 01:20 +0200
Re: [PATCH] x86/power/64: Do not refer to __PAGE_OFFSET from assembly code Pavel Machek <pavel@denx.de> - 2016-08-05 12:40 +0200
Re: [PATCH] x86/power/64: Do not refer to __PAGE_OFFSET from assembly code "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-05 16:40 +0200
Re: [PATCH] x86/power/64: Do not refer to __PAGE_OFFSET from assembly code Thomas Garnier <thgarnie@google.com> - 2016-08-05 17:30 +0200
Re: [PATCH] x86/power/64: Do not refer to __PAGE_OFFSET from assembly code Pavel Machek <pavel@denx.de> - 2016-08-06 22:10 +0200
Re: [PATCH] x86/power/64: Do not refer to __PAGE_OFFSET from assembly code "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-06 23:00 +0200
Re: [PATCH v1 2/2] x86/power/64: Fix __PAGE_OFFSET usage on restore "Rafael J. Wysocki" <rafael@kernel.org> - 2016-08-03 15:40 +0200
csiph-web