|
@@ -145,15 +145,15 @@ u64 __init kaslr_early_init(u64 dt_phys)
|
|
|
|
|
|
|
|
if (IS_ENABLED(CONFIG_RANDOMIZE_MODULE_REGION_FULL)) {
|
|
if (IS_ENABLED(CONFIG_RANDOMIZE_MODULE_REGION_FULL)) {
|
|
|
/*
|
|
/*
|
|
|
- * Randomize the module region over a 4 GB window covering the
|
|
|
|
|
|
|
+ * Randomize the module region over a 2 GB window covering the
|
|
|
* kernel. This reduces the risk of modules leaking information
|
|
* kernel. This reduces the risk of modules leaking information
|
|
|
* about the address of the kernel itself, but results in
|
|
* about the address of the kernel itself, but results in
|
|
|
* branches between modules and the core kernel that are
|
|
* branches between modules and the core kernel that are
|
|
|
* resolved via PLTs. (Branches between modules will be
|
|
* resolved via PLTs. (Branches between modules will be
|
|
|
* resolved normally.)
|
|
* resolved normally.)
|
|
|
*/
|
|
*/
|
|
|
- module_range = SZ_4G - (u64)(_end - _stext);
|
|
|
|
|
- module_alloc_base = max((u64)_end + offset - SZ_4G,
|
|
|
|
|
|
|
+ module_range = SZ_2G - (u64)(_end - _stext);
|
|
|
|
|
+ module_alloc_base = max((u64)_end + offset - SZ_2G,
|
|
|
(u64)MODULES_VADDR);
|
|
(u64)MODULES_VADDR);
|
|
|
} else {
|
|
} else {
|
|
|
/*
|
|
/*
|