mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 13:19:56 -04:00
powerpc/modules: Make module_alloc() Strict Module RWX aware
Make module_alloc() use PAGE_KERNEL protections instead of PAGE_KERNEL_EXEX if Strict Module RWX is enabled. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210609013431.9805-4-jniethe5@gmail.com
This commit is contained in:
committed by
Michael Ellerman
parent
71a5b3db9f
commit
4fcc636615
@@ -345,6 +345,11 @@ static inline bool strict_kernel_rwx_enabled(void)
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline bool strict_module_rwx_enabled(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_STRICT_MODULE_RWX) && strict_kernel_rwx_enabled();
|
||||
}
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
/* The kernel use the constants below to index in the page sizes array.
|
||||
|
||||
Reference in New Issue
Block a user