Re: [PATCH v4 3/3] docs: kernel-parameters.txt: document rand_mem_physical_padding parameter
From: Masayoshi Mizuma
Date: Thu Sep 27 2018 - 22:27:01 EST
On Thu, Sep 27, 2018 at 11:17:47PM +0200, Borislav Petkov wrote:
> On Thu, Sep 27, 2018 at 04:31:46PM -0400, Masayoshi Mizuma wrote:
> > From: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>
> >
> > This kernel parameter allows to change the padding used
> > for the physical memory mapping section when KASLR
> > memory is enabled.
> >
> > For memory hotplug capable systems, the default padding size,
> > CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING, may not be enough.
> > The option is useful to adjust the padding size.
> >
> > Signed-off-by: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>
> > ---
> > Documentation/admin-guide/kernel-parameters.txt | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > index 92eb1f4..de43cdf 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -3529,6 +3529,13 @@
> > fully seed the kernel's CRNG. Default is controlled
> > by CONFIG_RANDOM_TRUST_CPU.
> >
> > + rand_mem_physical_padding=
> > + [KNL] Define the padding size in terabytes
> > + used for the physical memory mapping section
> > + when KASLR memory is enabled.
> > + The default value is
> > + CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING.
>
> Yet another kernel parameter which forces me to go look at what the
> code does because this help text doesn't really help. And I see that in
> previous iterations ok lkml it was *actually* properly explained why
> this parameter is needed.
>
> So please summarize that explanation here so that the user can make an
> informed decision when reading this help text. Always think of explaning
> this to a colleague of yours who doesn't know about the memory padding
> and memory hotadd problematic and try to write it in such a way so that
> your colleague understands it.
>
> :-)
You are right, I didn't make it clear enough...
Thank you for your comments, I'll fix the description.
Thanks!
Masa