[PATCH OLK-6.6] livepatch/core: Fix miss disable ro for MOD_RO_AFTER_INIT memory

hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8HNHM -------------------------------- It was missed to set MOD_RO_AFTER_INIT type memory to be writable when porting c8783f92771c ("livepatch/core: Revert module_enable_ro and module_disable_ro"). Thanks the report from laokz in https://gitee.com/laokz/klpmake/issues/I8HFMR. Fixes: c8783f92771c ("livepatch/core: Revert module_enable_ro and module_disable_ro") Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com> --- kernel/module/strict_rwx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/module/strict_rwx.c b/kernel/module/strict_rwx.c index 397e18f50517..575bf99c723a 100644 --- a/kernel/module/strict_rwx.c +++ b/kernel/module/strict_rwx.c @@ -46,6 +46,7 @@ void module_disable_ro(const struct module *mod) module_set_memory(mod, MOD_INIT_TEXT, set_memory_rw); module_set_memory(mod, MOD_RODATA, set_memory_rw); module_set_memory(mod, MOD_INIT_RODATA, set_memory_rw); + module_set_memory(mod, MOD_RO_AFTER_INIT, set_memory_rw); } #endif /* CONFIG_LIVEPATCH_WO_FTRACE */ -- 2.25.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/3755 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/O... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/3755 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/O...
participants (2)
-
patchwork bot
-
Zheng Yejian