提交 36f72d8e 编写于 作者: Z Zhao Xuehui 提交者: Yang Yingliang

livepatch: Restoring code segment permissions after stop_machine completed

hulk inclusion
category: bugfix
bugzilla: 51821
CVE: NA

---------------------------

The function 'arch_klp_code_modify_prepare' is called before stop_machine
to change the permissions of the code segment to be readable and writable,
but the permissions of the code segment were not restored to the original
state after the stop_mahcine was completed. This may introduce security
issues, so 'arch_klp_code_modify_post_process' is used after 'stop_machine'
to fix this problem in this commit.
Signed-off-by: NZhao Xuehui <zhaoxuehui1@huawei.com>
Reviewed-by: NYang Jihong <yangjihong1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 f360724e
......@@ -663,7 +663,7 @@ static int __klp_enable_patch(struct klp_patch *patch)
arch_klp_code_modify_prepare();
ret = stop_machine(klp_try_enable_patch, &patch_data, cpu_online_mask);
arch_klp_code_modify_prepare();
arch_klp_code_modify_post_process();
if (ret)
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册