Merge branch 'linus' into x86/pti to pick up upstream changes
authorIngo Molnar <mingo@kernel.org>
Mon, 9 Apr 2018 16:24:58 +0000 (18:24 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 9 Apr 2018 16:24:58 +0000 (18:24 +0200)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
1  2 
arch/x86/entry/entry_64.S

@@@ -55,7 -55,7 +55,7 @@@ END(native_usergs_sysret64
  
  .macro TRACE_IRQS_FLAGS flags:req
  #ifdef CONFIG_TRACE_IRQFLAGS
-       bt      $9, \flags              /* interrupts off? */
+       btl     $9, \flags              /* interrupts off? */
        jnc     1f
        TRACE_IRQS_ON
  1:
@@@ -260,8 -260,13 +260,13 @@@ GLOBAL(entry_SYSCALL_64_after_hwframe
         * Change top bits to match most significant bit (47th or 56th bit
         * depending on paging mode) in the address.
         */
+ #ifdef CONFIG_X86_5LEVEL
+       ALTERNATIVE "shl $(64 - 48), %rcx; sar $(64 - 48), %rcx", \
+               "shl $(64 - 57), %rcx; sar $(64 - 57), %rcx", X86_FEATURE_LA57
+ #else
        shl     $(64 - (__VIRTUAL_MASK_SHIFT+1)), %rcx
        sar     $(64 - (__VIRTUAL_MASK_SHIFT+1)), %rcx
+ #endif
  
        /* If this changed %rcx, it was not canonical */
        cmpq    %rcx, %r11
@@@ -908,7 -913,7 +913,7 @@@ ENTRY(\sym
        pushq   $-1                             /* ORIG_RAX: no syscall to restart */
        .endif
  
 -      .if \paranoid < 2
 +      .if \paranoid == 1
        testb   $3, CS-ORIG_RAX(%rsp)           /* If coming from userspace, switch stacks */
        jnz     .Lfrom_usermode_switch_stack_\@
        .endif
        jmp     error_exit
        .endif
  
 -      .if \paranoid < 2
 +      .if \paranoid == 1
        /*
         * Entry from userspace.  Switch stacks and treat it
         * as a normal entry.  This means that paranoid handlers