Loading arch/x86/kernel/Makefile +0 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ KASAN_SANITIZE_dumpstack.o := n KASAN_SANITIZE_dumpstack_$(BITS).o := n KASAN_SANITIZE_stacktrace.o := n OBJECT_FILES_NON_STANDARD_head_$(BITS).o := y OBJECT_FILES_NON_STANDARD_relocate_kernel_$(BITS).o := y OBJECT_FILES_NON_STANDARD_ftrace_$(BITS).o := y OBJECT_FILES_NON_STANDARD_test_nx.o := y Loading arch/x86/kernel/head_64.S +15 −12 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ L3_START_KERNEL = pud_index(__START_KERNEL_map) .code64 .globl startup_64 startup_64: UNWIND_HINT_EMPTY /* * At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 0, * and someone has loaded an identity mapped page table Loading Loading @@ -88,6 +89,7 @@ startup_64: addq $(early_top_pgt - __START_KERNEL_map), %rax jmp 1f ENTRY(secondary_startup_64) UNWIND_HINT_EMPTY /* * At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 0, * and someone has loaded a mapped page table. Loading Loading @@ -132,6 +134,7 @@ ENTRY(secondary_startup_64) movq $1f, %rax jmp *%rax 1: UNWIND_HINT_EMPTY /* Check if nx is implemented */ movl $0x80000001, %eax Loading Loading @@ -234,7 +237,7 @@ ENTRY(secondary_startup_64) pushq %rax # target address in negative space lretq .Lafter_lret: ENDPROC(secondary_startup_64) END(secondary_startup_64) #include "verify_cpu.S" Loading @@ -246,6 +249,7 @@ ENDPROC(secondary_startup_64) */ ENTRY(start_cpu0) movq initial_stack(%rip), %rsp UNWIND_HINT_EMPTY jmp .Ljump_to_C_code ENDPROC(start_cpu0) #endif Loading @@ -265,26 +269,24 @@ ENDPROC(start_cpu0) .quad init_thread_union + THREAD_SIZE - SIZEOF_PTREGS __FINITDATA bad_address: jmp bad_address __INIT ENTRY(early_idt_handler_array) # 104(%rsp) %rflags # 96(%rsp) %cs # 88(%rsp) %rip # 80(%rsp) error code i = 0 .rept NUM_EXCEPTION_VECTORS .ifeq (EXCEPTION_ERRCODE_MASK >> i) & 1 UNWIND_HINT_IRET_REGS pushq $0 # Dummy error code, to make stack frame uniform .else UNWIND_HINT_IRET_REGS offset=8 .endif pushq $i # 72(%rsp) Vector number jmp early_idt_handler_common UNWIND_HINT_IRET_REGS i = i + 1 .fill early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE - ., 1, 0xcc .endr ENDPROC(early_idt_handler_array) UNWIND_HINT_IRET_REGS offset=16 END(early_idt_handler_array) early_idt_handler_common: /* Loading Loading @@ -312,6 +314,7 @@ early_idt_handler_common: pushq %r13 /* pt_regs->r13 */ pushq %r14 /* pt_regs->r14 */ pushq %r15 /* pt_regs->r15 */ UNWIND_HINT_REGS cmpq $14,%rsi /* Page fault? */ jnz 10f Loading @@ -327,7 +330,7 @@ early_idt_handler_common: 20: decl early_recursion_flag(%rip) jmp restore_regs_and_iret ENDPROC(early_idt_handler_common) END(early_idt_handler_common) __INITDATA Loading arch/x86/kernel/verify_cpu.S +2 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ #include <asm/cpufeatures.h> #include <asm/msr-index.h> verify_cpu: ENTRY(verify_cpu) pushf # Save caller passed flags push $0 # Kill any dangerous flags popf Loading Loading @@ -139,3 +139,4 @@ verify_cpu: popf # Restore caller passed flags xorl %eax, %eax ret ENDPROC(verify_cpu) arch/x86/xen/xen-head.S +8 −3 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ #include <asm/boot.h> #include <asm/asm.h> #include <asm/page_types.h> #include <asm/unwind_hints.h> #include <xen/interface/elfnote.h> #include <xen/interface/features.h> Loading @@ -19,6 +20,7 @@ #ifdef CONFIG_XEN_PV __INIT ENTRY(startup_xen) UNWIND_HINT_EMPTY cld /* Clear .bss */ Loading @@ -33,21 +35,24 @@ ENTRY(startup_xen) mov $init_thread_union+THREAD_SIZE, %_ASM_SP jmp xen_start_kernel END(startup_xen) __FINIT #endif .pushsection .text .balign PAGE_SIZE ENTRY(hypercall_page) .skip PAGE_SIZE .rept (PAGE_SIZE / 32) UNWIND_HINT_EMPTY .skip 32 .endr #define HYPERCALL(n) \ .equ xen_hypercall_##n, hypercall_page + __HYPERVISOR_##n * 32; \ .type xen_hypercall_##n, @function; .size xen_hypercall_##n, 32 #include <asm/xen-hypercalls.h> #undef HYPERCALL END(hypercall_page) .popsection ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux") Loading tools/objtool/check.c +5 −2 Original line number Diff line number Diff line Loading @@ -1752,11 +1752,14 @@ static int validate_branch(struct objtool_file *file, struct instruction *first, if (insn->dead_end) return 0; insn = next_insn; if (!insn) { if (!next_insn) { if (state.cfa.base == CFI_UNDEFINED) return 0; WARN("%s: unexpected end of section", sec->name); return 1; } insn = next_insn; } return 0; Loading Loading
arch/x86/kernel/Makefile +0 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,6 @@ KASAN_SANITIZE_dumpstack.o := n KASAN_SANITIZE_dumpstack_$(BITS).o := n KASAN_SANITIZE_stacktrace.o := n OBJECT_FILES_NON_STANDARD_head_$(BITS).o := y OBJECT_FILES_NON_STANDARD_relocate_kernel_$(BITS).o := y OBJECT_FILES_NON_STANDARD_ftrace_$(BITS).o := y OBJECT_FILES_NON_STANDARD_test_nx.o := y Loading
arch/x86/kernel/head_64.S +15 −12 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ L3_START_KERNEL = pud_index(__START_KERNEL_map) .code64 .globl startup_64 startup_64: UNWIND_HINT_EMPTY /* * At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 0, * and someone has loaded an identity mapped page table Loading Loading @@ -88,6 +89,7 @@ startup_64: addq $(early_top_pgt - __START_KERNEL_map), %rax jmp 1f ENTRY(secondary_startup_64) UNWIND_HINT_EMPTY /* * At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 0, * and someone has loaded a mapped page table. Loading Loading @@ -132,6 +134,7 @@ ENTRY(secondary_startup_64) movq $1f, %rax jmp *%rax 1: UNWIND_HINT_EMPTY /* Check if nx is implemented */ movl $0x80000001, %eax Loading Loading @@ -234,7 +237,7 @@ ENTRY(secondary_startup_64) pushq %rax # target address in negative space lretq .Lafter_lret: ENDPROC(secondary_startup_64) END(secondary_startup_64) #include "verify_cpu.S" Loading @@ -246,6 +249,7 @@ ENDPROC(secondary_startup_64) */ ENTRY(start_cpu0) movq initial_stack(%rip), %rsp UNWIND_HINT_EMPTY jmp .Ljump_to_C_code ENDPROC(start_cpu0) #endif Loading @@ -265,26 +269,24 @@ ENDPROC(start_cpu0) .quad init_thread_union + THREAD_SIZE - SIZEOF_PTREGS __FINITDATA bad_address: jmp bad_address __INIT ENTRY(early_idt_handler_array) # 104(%rsp) %rflags # 96(%rsp) %cs # 88(%rsp) %rip # 80(%rsp) error code i = 0 .rept NUM_EXCEPTION_VECTORS .ifeq (EXCEPTION_ERRCODE_MASK >> i) & 1 UNWIND_HINT_IRET_REGS pushq $0 # Dummy error code, to make stack frame uniform .else UNWIND_HINT_IRET_REGS offset=8 .endif pushq $i # 72(%rsp) Vector number jmp early_idt_handler_common UNWIND_HINT_IRET_REGS i = i + 1 .fill early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE - ., 1, 0xcc .endr ENDPROC(early_idt_handler_array) UNWIND_HINT_IRET_REGS offset=16 END(early_idt_handler_array) early_idt_handler_common: /* Loading Loading @@ -312,6 +314,7 @@ early_idt_handler_common: pushq %r13 /* pt_regs->r13 */ pushq %r14 /* pt_regs->r14 */ pushq %r15 /* pt_regs->r15 */ UNWIND_HINT_REGS cmpq $14,%rsi /* Page fault? */ jnz 10f Loading @@ -327,7 +330,7 @@ early_idt_handler_common: 20: decl early_recursion_flag(%rip) jmp restore_regs_and_iret ENDPROC(early_idt_handler_common) END(early_idt_handler_common) __INITDATA Loading
arch/x86/kernel/verify_cpu.S +2 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ #include <asm/cpufeatures.h> #include <asm/msr-index.h> verify_cpu: ENTRY(verify_cpu) pushf # Save caller passed flags push $0 # Kill any dangerous flags popf Loading Loading @@ -139,3 +139,4 @@ verify_cpu: popf # Restore caller passed flags xorl %eax, %eax ret ENDPROC(verify_cpu)
arch/x86/xen/xen-head.S +8 −3 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ #include <asm/boot.h> #include <asm/asm.h> #include <asm/page_types.h> #include <asm/unwind_hints.h> #include <xen/interface/elfnote.h> #include <xen/interface/features.h> Loading @@ -19,6 +20,7 @@ #ifdef CONFIG_XEN_PV __INIT ENTRY(startup_xen) UNWIND_HINT_EMPTY cld /* Clear .bss */ Loading @@ -33,21 +35,24 @@ ENTRY(startup_xen) mov $init_thread_union+THREAD_SIZE, %_ASM_SP jmp xen_start_kernel END(startup_xen) __FINIT #endif .pushsection .text .balign PAGE_SIZE ENTRY(hypercall_page) .skip PAGE_SIZE .rept (PAGE_SIZE / 32) UNWIND_HINT_EMPTY .skip 32 .endr #define HYPERCALL(n) \ .equ xen_hypercall_##n, hypercall_page + __HYPERVISOR_##n * 32; \ .type xen_hypercall_##n, @function; .size xen_hypercall_##n, 32 #include <asm/xen-hypercalls.h> #undef HYPERCALL END(hypercall_page) .popsection ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux") Loading
tools/objtool/check.c +5 −2 Original line number Diff line number Diff line Loading @@ -1752,11 +1752,14 @@ static int validate_branch(struct objtool_file *file, struct instruction *first, if (insn->dead_end) return 0; insn = next_insn; if (!insn) { if (!next_insn) { if (state.cfa.base == CFI_UNDEFINED) return 0; WARN("%s: unexpected end of section", sec->name); return 1; } insn = next_insn; } return 0; Loading