Re: [PATCH v5 0/4] Adjust the padding size for KASLR

From: Borislav Petkov
Date: Thu Dec 12 2019 - 15:17:55 EST


On Fri, Nov 15, 2019 at 09:49:13AM -0500, Masayoshi Mizuma wrote:
> From: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>
>
> The system sometimes crashes while memory hot-adding on KASLR
> enabled system. The crash happens because the regions pointed by
> kaslr_regions[].base are overwritten by the hot-added memory.
>
> It happens because of the padding size for kaslr_regions[].base isn't
> enough for the system whose physical memory layout has huge space for
> memory hotplug. kaslr_regions[].base points "actual installed
> memory size + padding" or higher address. So, if the "actual + padding"
> is lower address than the maximum memory address, which means the memory
> address reachable by memory hot-add, kaslr_regions[].base is destroyed by
> the overwritten.

I can only try to guess what this is trying to tell me so please rewrite
this using simple, declarative sentences.

Use a structure like this:

Problem is A.

It happens because of B.

Fix it by doing C.

(Potentially do D).

For more detailed info, see
Documentation/process/submitting-patches.rst, Section "2) Describe your
changes".

Also, to the tone, from Documentation/process/submitting-patches.rst:

"Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
to do frotz", as if you are giving orders to the codebase to change
its behaviour."

Also, when you write your commit messages, always talk about "why"
you're doing a change and not "what" you're doing - the "what" is
visible from the diff.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette