]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
final CFI hacks kexec-debug-cfi
authorDavid Woodhouse <dwmw@amazon.co.uk>
Tue, 18 Mar 2025 21:04:38 +0000 (21:04 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Tue, 18 Mar 2025 21:04:38 +0000 (21:04 +0000)
arch/x86/kernel/machine_kexec_64.c
tools/objtool/elf.c

index e1f5fc858aee25254d548b5421cc27b8ec9bf8ad..c24b84a03005ace12c5faa5f736a1a53a9f6e8af 100644 (file)
@@ -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,
index 6f64d611faea96f565705f2d06151ce59694990c..cd9321b99fcd5e2be48f99284e51cdc90edde5a3 100644 (file)
@@ -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) {