• Borislav Petkov's avatar
    x86/fpu: Add an XSTATE_OP() macro · b74a0cf1
    Borislav Petkov authored
    Add an XSTATE_OP() macro which contains the XSAVE* fault handling
    and replace all non-alternatives users of xstate_fault() with
    it.
    
    This fixes also the buglet in copy_xregs_to_user() and
    copy_user_to_xregs() where the inline asm didn't have @xstate as
    memory reference and thus potentially causing unwanted
    reordering of accesses to the extended state.
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/1447932326-4371-2-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    b74a0cf1
internal.h 17.4 KB