• C
    livepatch/arm64: support livepatch emit plt call · 716653dd
    Cheng Jian 提交于
    euler inclusion
    category: feature
    Bugzilla: 5507
    CVE: N/A
    
    ----------------------------------------
    
    The livepatch without ftrace mode uses the direct jump method to
    implement the livepatch. When KASLR is enabled, the address of the
    symbol which need relocate in the module may exceeds the range of
    short jump. In the module, this is implemented by the PLT sections.
    
    In previous versions, kpatch-build front-tools
    create an section named livepatch.pltcount to store the number of
    the relocations in the size field, we append enough space in .plt
    section for the long jump plts by module_frob_arch_sections. Now,
    This's no longer needed.
    
    The .klp.rela.objname.secname section store all symbols that required
    relocate by livepatch. For commit 425595a7 ("livepatch: reuse
    module loader code to write relocations") merged, load_module can
    create enough plt entries for livepatch by module_frob_arch_sections.
    we will fix it soon.
    Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
    Reviewed-by: NLi Bin <huawei.libin@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    716653dd
module.c 112.0 KB