Commit 7158e252 authored by Zheng Yejian's avatar Zheng Yejian Committed by Zheng Zengkai
Browse files

livepatch: Reduce duplicate codes and fix issue on patch text

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I53WZ9



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

Codes related to patching text in 'arch_klp_patch_func' and
'arch_klp_unpatch_func' are duplicate, we can reduce them.

And There is issue in arm/arm64 that 'offset' between pc and new function
address is out of valid range is NOT considered if MODULE_PLTS
is not enabled (CONFIG_ARM_MODULE_PLTS in arm, CONFIG_ARM_MODULE_PLTS
in arm64). We fix it by always checking that 'offset'.

Fixes: 2fa9f353 livepatch/arm: Support livepatch without ftrace
Fixes: e429c61d livepatch/arm64: Support livepatch without ftrace
Suggested-by: default avatarXu Kuohai <xukuohai@huawei.com>
Signed-off-by: default avatarZheng Yejian <zhengyejian1@huawei.com>
Reviewed-by: default avatarKuohai Xu <xukuohai@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent df0fbb2a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment