OSDN Git Service

arm64: fix the doc of RANDOMIZE_MODULE_REGION_FULL
authorBarry Song <song.bao.hua@hisilicon.com>
Fri, 30 Jul 2021 12:51:31 +0000 (00:51 +1200)
committerWill Deacon <will@kernel.org>
Tue, 3 Aug 2021 09:36:42 +0000 (10:36 +0100)
commitf9c4ff2ab9fe433d44ebbc2e3c2368a49df44798
tree52fdeb8ee023e4378c6a54cd8b63f6a9b63625fb
parent64ee84c75b5f75132eec97f2c7a201a056d53698
arm64: fix the doc of RANDOMIZE_MODULE_REGION_FULL

Obviously kaslr is setting the module region to 2GB rather than 4GB since
commit b2eed9b588112 ("arm64/kernel: kaslr: reduce module randomization
range to 2 GB"). So fix the size of region in Kconfig.
On the other hand, even though RANDOMIZE_MODULE_REGION_FULL is not set,
module_alloc() can fall back to a 2GB window if ARM64_MODULE_PLTS is set.
In this case, veneers are still needed. !RANDOMIZE_MODULE_REGION_FULL
doesn't necessarily mean veneers are not needed.
So fix the doc to be more precise to avoid any confusion to the readers
of the code.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Qi Liu <liuqi115@huawei.com>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20210730125131.13724-1-song.bao.hua@hisilicon.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/Kconfig
arch/arm64/kernel/kaslr.c