lkml.org 
[lkml]   [2016]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC, PATCHv1 16/28] x86/asm: remove __VIRTUAL_MASK_SHIFT==47 assert
    Date
    We don't need it anymore. 17be0aec74fb ("x86/asm/entry/64: Implement
    better check for canonical addresses") made canonical address check
    generic wrt. address width.

    Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    ---
    arch/x86/entry/entry_64.S | 7 ++-----
    1 file changed, 2 insertions(+), 5 deletions(-)

    diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
    index 02fff3ebfb87..92a6753f8c85 100644
    --- a/arch/x86/entry/entry_64.S
    +++ b/arch/x86/entry/entry_64.S
    @@ -267,12 +267,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

    --
    2.10.2
    \
     
     \ /
      Last update: 2016-12-08 17:23    [W:4.129 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site