powerpc/mmu: add is_strict_kernel_rwx() helper
Add a helper to know whether STRICT_KERNEL_RWX is enabled. This is based on rodata_enabled flag which is defined only when CONFIG_STRICT_KERNEL_RWX is selected. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

gecommit door
Michael Ellerman

bovenliggende
02d5d13b45
commit
28ea38b9cb
@@ -108,12 +108,10 @@ static void __init MMU_setup(void)
|
||||
__map_without_bats = 1;
|
||||
__map_without_ltlbs = 1;
|
||||
}
|
||||
#ifdef CONFIG_STRICT_KERNEL_RWX
|
||||
if (rodata_enabled) {
|
||||
if (strict_kernel_rwx_enabled()) {
|
||||
__map_without_bats = 1;
|
||||
__map_without_ltlbs = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Verwijs in nieuw issue
Block a user