|
Lines 840-857
void init_mem_debugging_and_hardening(void)
Link Here
|
| 840 |
} |
840 |
} |
| 841 |
#endif |
841 |
#endif |
| 842 |
|
842 |
|
| 843 |
if (_init_on_alloc_enabled_early) { |
843 |
if (_init_on_alloc_enabled_early || |
| 844 |
if (page_poisoning_requested) |
844 |
IS_ENABLED(CONFIG_INIT_ON_ALLOC_DEFAULT_ON)) { |
|
|
845 |
if (page_poisoning_requested) { |
| 845 |
pr_info("mem auto-init: CONFIG_PAGE_POISONING is on, " |
846 |
pr_info("mem auto-init: CONFIG_PAGE_POISONING is on, " |
| 846 |
"will take precedence over init_on_alloc\n"); |
847 |
"will take precedence over init_on_alloc\n"); |
| 847 |
else |
848 |
static_branch_disable(&init_on_alloc); |
|
|
849 |
} else |
| 848 |
static_branch_enable(&init_on_alloc); |
850 |
static_branch_enable(&init_on_alloc); |
| 849 |
} |
851 |
} |
| 850 |
if (_init_on_free_enabled_early) { |
852 |
if (_init_on_free_enabled_early || |
| 851 |
if (page_poisoning_requested) |
853 |
IS_ENABLED(CONFIG_INIT_ON_FREE_DEFAULT_ON)) { |
|
|
854 |
if (page_poisoning_requested) { |
| 852 |
pr_info("mem auto-init: CONFIG_PAGE_POISONING is on, " |
855 |
pr_info("mem auto-init: CONFIG_PAGE_POISONING is on, " |
| 853 |
"will take precedence over init_on_free\n"); |
856 |
"will take precedence over init_on_free\n"); |
| 854 |
else |
857 |
static_branch_disable(&init_on_free); |
|
|
858 |
} else |
| 855 |
static_branch_enable(&init_on_free); |
859 |
static_branch_enable(&init_on_free); |
| 856 |
} |
860 |
} |
| 857 |
|
861 |
|
| 858 |
- |
|
|