• A
    x86/mce: Don't clear shared banks on Intel when offlining CPUs · 6e06780a
    Ashok Raj 提交于
    It is not safe to clear global MCi_CTL banks during CPU offline
    or suspend/resume operations. These MSRs are either
    thread-scoped (meaning private to a thread), or core-scoped
    (private to threads in that core only), or with a socket scope:
    visible and controllable from all threads in the socket.
    
    When we offline a single CPU, clearing those MCi_CTL bits will
    stop signaling for all the shared, i.e., socket-wide resources,
    such as LLC, iMC, etc.
    
    In addition, it might be possible to compromise the integrity of
    an Intel Secure Guard eXtentions (SGX) system if the attacker
    has control of the host system and is able to inject errors
    which would be otherwise ignored when MCi_CTL bits are cleared.
    
    Hence on SGX enabled systems, if MCi_CTL is cleared, SGX gets
    disabled.
    Tested-by: NSerge Ayoun <serge.ayoun@intel.com>
    Signed-off-by: NAshok Raj <ashok.raj@intel.com>
    [ Cleanup text. ]
    Signed-off-by: NBorislav Petkov <bp@suse.de>
    Reviewed-by: NTony Luck <tony.luck@intel.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-edac <linux-edac@vger.kernel.org>
    Link: http://lkml.kernel.org/r/1441391390-16985-1-git-send-email-ashok.raj@intel.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
    6e06780a
mce.c 59.7 KB