Re: [PATCH v2 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime

From: Baoquan He
Date: Sat Dec 10 2016 - 07:28:05 EST


On 12/10/16 at 11:31am, Borislav Petkov wrote:
> On Fri, Dec 09, 2016 at 10:41:58PM +0800, Baoquan He wrote:
> > X86 64 kernel takes KERNEL_IMAGE_SIZE as the kernel text mapping size,
> > and it's fixed as compiling time, changing from 512M to 1G as long as
> > CONFIG_RANDOMIZE_BASE is enabled, though people specify kernel option
> > "nokaslr" explicitly.
> >
> > This could be a wrong behaviour.
>
> A bunch of changes just because "this could be a wrong behavior". I'm
> not really persuaded.


Well, then apologize for this wrong expression. It should be "This is
a wrong behaviour."

Whether CONFIG_RANDOMIZE_BASE is yes or not, with 'nokaslr' specified,
Kernel text mapping size should be 512M, just the same as no kaslr code
compiled in.

Thanks
Baoquan