From 6ca5d2aca131b476589554cc6f5255c249671b26 Mon Sep 17 00:00:00 2001 From: Cheng Jian Date: Mon, 28 Jan 2019 10:09:10 +0800 Subject: [PATCH] livepatch/arm64: delete unuse livepatch.pltcount euler inclusion category: feature Bugzilla: 5507 CVE: N/A ---------------------------------------- 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. just delete it. Signed-off-by: Cheng Jian Reviewed-by: Li Bin Signed-off-by: Yang Yingliang --- arch/arm64/kernel/module-plts.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c index d83383330778..8d3500898ff0 100644 --- a/arch/arm64/kernel/module-plts.c +++ b/arch/arm64/kernel/module-plts.c @@ -297,17 +297,6 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, } #ifdef CONFIG_LIVEPATCH - for (i = 0; i < ehdr->e_shnum; i++) { - if (!strcmp(".livepatch.pltcount", - secstrings + sechdrs[i].sh_name)) { - core_plts += sechdrs[i].sh_size; - sechdrs[i].sh_size = 0; - sechdrs[i].sh_type = SHT_NOBITS; - sechdrs[i].sh_flags = 0; - break; - } - } - if (mod->arch.core.plt) mod->arch.have_plts = true; mod->arch.core_plts = NULL; -- GitLab