1. 20 May, 2022 1 commit
    • Peter Zijlstra's avatar
      x86/entry: Fixup objtool/ibt validation · ce656528
      Peter Zijlstra authored
      Commit
      
        47f33de4 ("x86/sev: Mark the code returning to user space as syscall gap")
      
      added a bunch of text references without annotating them, resulting in a
      spree of objtool complaints:
      
        vmlinux.o: warning: objtool: vc_switch_off_ist+0x77: relocation to !ENDBR: entry_SYSCALL_64+0x15c
        vmlinux.o: warning: objtool: vc_switch_off_ist+0x8f: relocation to !ENDBR: entry_SYSCALL_compat+0xa5
        vmlinux.o: warning: objtool: vc_switch_off_ist+0x97: relocation to !ENDBR: .entry.text+0x21ea
        vmlinux.o: warning: objtool: vc_switch_off_ist+0xef: relocation to !ENDBR: .entry.text+0x162
        vmlinux.o: warning: objtool: __sev_es_ist_enter+0x60: relocation to !ENDBR: entry_SYSCALL_64+0x15c
        vmlinux.o: warning: objtool: __sev_es_ist_enter+0x6c: relocation to !ENDBR: .entry.text+0x162
        vmlinux.o: warning: objtool: __sev_es_ist_enter+0x8a: relocation to !ENDBR: entry_SYSCALL_compat+0xa5
        vmlinux.o: warning: objtool: __sev_es_ist_enter+0xc1: relocation to !ENDBR: .entry.text+0x21ea
      
      Since these text references are used to compare against IP, and are not
      an indirect call target, they don't need ENDBR so annotate them away.
      
      Fixes: 47f33de4 ("x86/sev: Mark the code returning to user space as syscall gap")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Link: https://lore.kernel.org/r/20220520082604.GQ2578@worktop.programming.kicks-ass.net
      ce656528
  2. 19 May, 2022 1 commit
  3. 18 May, 2022 1 commit
    • Lai Jiangshan's avatar
      x86/sev: Annotate stack change in the #VC handler · c42b1451
      Lai Jiangshan authored
      In idtentry_vc(), vc_switch_off_ist() determines a safe stack to
      switch to, off of the IST stack. Annotate the new stack switch with
      ENCODE_FRAME_POINTER in case UNWINDER_FRAME_POINTER is used.
      
      A stack walk before looks like this:
      
        CPU: 0 PID: 0 Comm: swapper Not tainted 5.18.0-rc7+ #2
        Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
        Call Trace:
         <TASK>
         dump_stack_lvl
         dump_stack
         kernel_exc_vmm_communication
         asm_exc_vmm_communication
         ? native_read_msr
         ? __x2apic_disable.part.0
         ? x2apic_setup
         ? cpu_init
         ? trap_init
         ? start_kernel
         ? x86_64_start_reservations
         ? x86_64_start_kernel
         ? secondary_startup_64_no_verify
         </TASK>
      
      and with the fix, the stack dump is exact:
      
        CPU: 0 PID: 0 Comm: swapper Not tainted 5.18.0-rc7+ #3
        Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
        Call Trace:
         <TASK>
         dump_stack_lvl
         dump_stack
         kernel_exc_vmm_communication
         asm_exc_vmm_communication
        RIP: 0010:native_read_msr
        Code: ...
        < snipped regs >
         ? __x2apic_disable.part.0
         x2apic_setup
         cpu_init
         trap_init
         start_kernel
         x86_64_start_reservations
         x86_64_start_kernel
         secondary_startup_64_no_verify
         </TASK>
      
        [ bp: Test in a SEV-ES guest and rewrite the commit message to
          explain what exactly this does. ]
      
      Fixes: a13644f3 ("x86/entry/64: Add entry code for #VC handler")
      Signed-off-by: default avatarLai Jiangshan <jiangshan.ljs@antgroup.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Link: https://lore.kernel.org/r/20220316041612.71357-1-jiangshanlai@gmail.com
      c42b1451
  4. 17 May, 2022 1 commit
  5. 02 May, 2022 1 commit
  6. 27 Apr, 2022 3 commits
  7. 21 Apr, 2022 1 commit
  8. 20 Apr, 2022 1 commit
  9. 17 Apr, 2022 1 commit
  10. 14 Apr, 2022 1 commit
  11. 11 Apr, 2022 1 commit
  12. 08 Apr, 2022 1 commit
  13. 07 Apr, 2022 18 commits
  14. 06 Apr, 2022 8 commits