Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-17 Thread Borislav Petkov
On Wed, Aug 17, 2016 at 12:19:48PM +0200, Ingo Molnar wrote: > So I really hate this pattern, and we already have it in > arch/x86/kernel/cpu/microcode/intel.c as well: > > start += PAGE_OFFSET - __PAGE_OFFSET_BASE; > > and note that it's not #ifdefed there - I think it's safe

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-17 Thread Borislav Petkov
On Wed, Aug 17, 2016 at 12:19:48PM +0200, Ingo Molnar wrote: > So I really hate this pattern, and we already have it in > arch/x86/kernel/cpu/microcode/intel.c as well: > > start += PAGE_OFFSET - __PAGE_OFFSET_BASE; > > and note that it's not #ifdefed there - I think it's safe

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-17 Thread Ingo Molnar
* Borislav Petkov wrote: > On Tue, Aug 16, 2016 at 08:31:28PM -0400, Brian Gerst wrote: > > These fixes work for my system. > > Thanks Brian. > > Ingo, please queue this into x86/urgent. > > Thanks! > > --- > From: Borislav Petkov > Date: Wed, 17 Aug 2016

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-17 Thread Ingo Molnar
* Borislav Petkov wrote: > On Tue, Aug 16, 2016 at 08:31:28PM -0400, Brian Gerst wrote: > > These fixes work for my system. > > Thanks Brian. > > Ingo, please queue this into x86/urgent. > > Thanks! > > --- > From: Borislav Petkov > Date: Wed, 17 Aug 2016 08:23:29 +0200 > Subject: [PATCH]

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-17 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 08:31:28PM -0400, Brian Gerst wrote: > These fixes work for my system. Thanks Brian. Ingo, please queue this into x86/urgent. Thanks! --- From: Borislav Petkov Date: Wed, 17 Aug 2016 08:23:29 +0200 Subject: [PATCH] x86/microcode/AMD: Fix initrd loading

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-17 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 08:31:28PM -0400, Brian Gerst wrote: > These fixes work for my system. Thanks Brian. Ingo, please queue this into x86/urgent. Thanks! --- From: Borislav Petkov Date: Wed, 17 Aug 2016 08:23:29 +0200 Subject: [PATCH] x86/microcode/AMD: Fix initrd loading with

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Brian Gerst
On Tue, Aug 16, 2016 at 5:01 PM, Borislav Petkov wrote: > On Tue, Aug 16, 2016 at 12:49:52PM -0700, Kees Cook wrote: >> Am I misreading this? > > No you're not. > >> Shouldn't it be: >> >>cont = container; >> #ifdef CONFIG_RANDOMIZE_MEMORY >>cont += PAGE_OFFSET -

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Brian Gerst
On Tue, Aug 16, 2016 at 5:01 PM, Borislav Petkov wrote: > On Tue, Aug 16, 2016 at 12:49:52PM -0700, Kees Cook wrote: >> Am I misreading this? > > No you're not. > >> Shouldn't it be: >> >>cont = container; >> #ifdef CONFIG_RANDOMIZE_MEMORY >>cont += PAGE_OFFSET -

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 12:49:52PM -0700, Kees Cook wrote: > Am I misreading this? No you're not. > Shouldn't it be: > >cont = container; > #ifdef CONFIG_RANDOMIZE_MEMORY >cont += PAGE_OFFSET - __PAGE_OFFSET_BASE; > #endif > > (otherwise cont is undefined in the

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 12:49:52PM -0700, Kees Cook wrote: > Am I misreading this? No you're not. > Shouldn't it be: > >cont = container; > #ifdef CONFIG_RANDOMIZE_MEMORY >cont += PAGE_OFFSET - __PAGE_OFFSET_BASE; > #endif > > (otherwise cont is undefined in the

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Kees Cook
On Tue, Aug 16, 2016 at 10:50 AM, Borislav Petkov wrote: > On Tue, Aug 16, 2016 at 05:54:12PM +0200, Borislav Petkov wrote: >> Ok, I ran this in a guest and it finds the microcode patches properly. > > Here's a better version to take care of the APs too: > > --- > diff --git

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Kees Cook
On Tue, Aug 16, 2016 at 10:50 AM, Borislav Petkov wrote: > On Tue, Aug 16, 2016 at 05:54:12PM +0200, Borislav Petkov wrote: >> Ok, I ran this in a guest and it finds the microcode patches properly. > > Here's a better version to take care of the APs too: > > --- > diff --git

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 05:54:12PM +0200, Borislav Petkov wrote: > Ok, I ran this in a guest and it finds the microcode patches properly. Here's a better version to take care of the APs too: --- diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 05:54:12PM +0200, Borislav Petkov wrote: > Ok, I ran this in a guest and it finds the microcode patches properly. Here's a better version to take care of the APs too: --- diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c index

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 03:49:28PM +0200, Borislav Petkov wrote: > Just a stab in the dark: does something like that help? > > --- > diff --git a/arch/x86/kernel/cpu/microcode/amd.c > b/arch/x86/kernel/cpu/microcode/amd.c > index 27a0228c9cae..2debaf119baf 100644 > ---

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 03:49:28PM +0200, Borislav Petkov wrote: > Just a stab in the dark: does something like that help? > > --- > diff --git a/arch/x86/kernel/cpu/microcode/amd.c > b/arch/x86/kernel/cpu/microcode/amd.c > index 27a0228c9cae..2debaf119baf 100644 > ---

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 03:42:05PM +0200, Borislav Petkov wrote: > I'll try to reproduce and fix this at some point but am away currently > so don't hold your breath. Does "dis_ucode_ldr" on the kernel cmdline > get you any further? Just a stab in the dark: does something like that help? ---

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 03:42:05PM +0200, Borislav Petkov wrote: > I'll try to reproduce and fix this at some point but am away currently > so don't hold your breath. Does "dis_ucode_ldr" on the kernel cmdline > get you any further? Just a stab in the dark: does something like that help? ---

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 07:31:20AM -0400, Brian Gerst wrote: > That didn't provide any useful information. However, when I boot with > "nosmp", I do get an oops in load_microcode_amd(). I can't capture > the oops message (no serial console), but it's being called from >

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Borislav Petkov
On Tue, Aug 16, 2016 at 07:31:20AM -0400, Brian Gerst wrote: > That didn't provide any useful information. However, when I boot with > "nosmp", I do get an oops in load_microcode_amd(). I can't capture > the oops message (no serial console), but it's being called from >

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Brian Gerst
On Sun, Aug 14, 2016 at 7:26 PM, Baoquan He wrote: > On 08/14/16 at 12:25am, Brian Gerst wrote: >> On Fri, Jul 8, 2016 at 4:35 PM, tip-bot for Thomas Garnier >> wrote: >> > Commit-ID: 021182e52fe01c1f7b126f97fd6ba048dc4234fd >> > Gitweb: >> >

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-16 Thread Brian Gerst
On Sun, Aug 14, 2016 at 7:26 PM, Baoquan He wrote: > On 08/14/16 at 12:25am, Brian Gerst wrote: >> On Fri, Jul 8, 2016 at 4:35 PM, tip-bot for Thomas Garnier >> wrote: >> > Commit-ID: 021182e52fe01c1f7b126f97fd6ba048dc4234fd >> > Gitweb: >> >

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-14 Thread Baoquan He
On 08/14/16 at 12:25am, Brian Gerst wrote: > On Fri, Jul 8, 2016 at 4:35 PM, tip-bot for Thomas Garnier > wrote: > > Commit-ID: 021182e52fe01c1f7b126f97fd6ba048dc4234fd > > Gitweb: > > http://git.kernel.org/tip/021182e52fe01c1f7b126f97fd6ba048dc4234fd > > Author:

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-14 Thread Baoquan He
On 08/14/16 at 12:25am, Brian Gerst wrote: > On Fri, Jul 8, 2016 at 4:35 PM, tip-bot for Thomas Garnier > wrote: > > Commit-ID: 021182e52fe01c1f7b126f97fd6ba048dc4234fd > > Gitweb: > > http://git.kernel.org/tip/021182e52fe01c1f7b126f97fd6ba048dc4234fd > > Author: Thomas Garnier > >

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-14 Thread Brian Gerst
On Fri, Jul 8, 2016 at 4:35 PM, tip-bot for Thomas Garnier wrote: > Commit-ID: 021182e52fe01c1f7b126f97fd6ba048dc4234fd > Gitweb: http://git.kernel.org/tip/021182e52fe01c1f7b126f97fd6ba048dc4234fd > Author: Thomas Garnier > AuthorDate: Tue, 21 Jun

Re: [tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-08-14 Thread Brian Gerst
On Fri, Jul 8, 2016 at 4:35 PM, tip-bot for Thomas Garnier wrote: > Commit-ID: 021182e52fe01c1f7b126f97fd6ba048dc4234fd > Gitweb: http://git.kernel.org/tip/021182e52fe01c1f7b126f97fd6ba048dc4234fd > Author: Thomas Garnier > AuthorDate: Tue, 21 Jun 2016 17:47:03 -0700 > Committer: Ingo

[tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-07-08 Thread tip-bot for Thomas Garnier
Commit-ID: 021182e52fe01c1f7b126f97fd6ba048dc4234fd Gitweb: http://git.kernel.org/tip/021182e52fe01c1f7b126f97fd6ba048dc4234fd Author: Thomas Garnier AuthorDate: Tue, 21 Jun 2016 17:47:03 -0700 Committer: Ingo Molnar CommitDate: Fri, 8 Jul 2016

[tip:x86/boot] x86/mm: Enable KASLR for physical mapping memory regions

2016-07-08 Thread tip-bot for Thomas Garnier
Commit-ID: 021182e52fe01c1f7b126f97fd6ba048dc4234fd Gitweb: http://git.kernel.org/tip/021182e52fe01c1f7b126f97fd6ba048dc4234fd Author: Thomas Garnier AuthorDate: Tue, 21 Jun 2016 17:47:03 -0700 Committer: Ingo Molnar CommitDate: Fri, 8 Jul 2016 17:35:15 +0200 x86/mm: Enable KASLR for