From: David Woodhouse <dwmw@amazon.co.uk> Date: Tue, 18 Mar 2025 21:04:38 +0000 (+0000) Subject: final CFI hacks X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fkexec-debug-cfi;p=users%2Fdwmw2%2Flinux.git final CFI hacks --- diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index e1f5fc858aee2..c24b84a03005a 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c @@ -453,9 +453,11 @@ void machine_kexec(struct kimage *image) * Take advantage of this here by force loading the segments, * before the GDT is zapped with an invalid value. */ - load_segments(); + // load_segments(); /* now call it */ + printk("About to call relocate_kernel at %lx, CFI info %x\n", + (unsigned long)relocate_kernel_ptr, *(unsigned int *) (((void *)relocate_kernel_ptr) - 0xf)); image->start = relocate_kernel_ptr((unsigned long)image->head, virt_to_phys(control_page), image->start, diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index 6f64d611faea9..cd9321b99fcd5 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -898,7 +898,7 @@ struct reloc *elf_init_reloc_text_sym(struct elf *elf, struct section *sec, if (!(insn_sec->sh.sh_flags & SHF_EXECINSTR)) { WARN("bad call to %s() for data symbol %s", __func__, sym->name); - return NULL; + //return NULL; } if (!sym) {