x86/asm: Remove __VIRTUAL_MASK_SHIFT==47 assert
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Thu, 30 Mar 2017 08:07:26 +0000 (11:07 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Apr 2017 06:22:33 +0000 (08:22 +0200)
We don't need the assert anymore, as:

  17be0aec74fb ("x86/asm/entry/64: Implement better check for canonical addresses")

made canonical address checks generic wrt. address width.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20170330080731.65421-3-kirill.shutemov@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/entry/entry_64.S

index 044d18ebc43ce96a512abd1e5f36eb8dfaee0636..f07b4efb34d5b0205db483f217c3c7e4d98b84e2 100644 (file)
@@ -265,12 +265,9 @@ return_from_SYSCALL_64:
         *
         * If width of "canonical tail" ever becomes variable, this will need
         * to be updated to remain correct on both old and new CPUs.
+        *
+        * Change top 16 bits to be the sign-extension of 47th bit
         */
-       .ifne __VIRTUAL_MASK_SHIFT - 47
-       .error "virtual address width changed -- SYSRET checks need update"
-       .endif
-
-       /* Change top 16 bits to be the sign-extension of 47th bit */
        shl     $(64 - (__VIRTUAL_MASK_SHIFT+1)), %rcx
        sar     $(64 - (__VIRTUAL_MASK_SHIFT+1)), %rcx