Re: [PATCH v4 1/3] x86: Introduce a new constant KERNEL_MAPPING_SIZE

From: Baoquan He
Date: Thu Mar 16 2017 - 05:46:09 EST


On 03/16/17 at 09:14am, Ingo Molnar wrote:
>
> * Borislav Petkov <bp@xxxxxxx> wrote:
> > So what I'd do is keep KERNEL_IMAGE_SIZE and make it default 1G and use it
> > everywhere.
> >
> > Then, define a separate define which is used only in vmlinux.lds.S to
> > enforce the size check. Having MAPPING_SIZE and IMAGE_SIZE is just
> > needlessly confusing.
>
> That sounds like the right solution to me - having two values is asking for
> trouble.

Thanks for your suggestion.

OK, I will repost with only changing KERNEL_IMAGE_SIZE to 1G, just like
CONFIG_RANDOMIZE_BASE is enabled in old code.

I made one but haven't tested it yet, do you think it's OK?