Re: [PATCH] x86/mce: Add workaround for SKX/CLX/CPX spurious machine checks
From: Borislav Petkov
Date: Wed Feb 16 2022 - 13:03:04 EST
On Wed, Feb 16, 2022 at 07:50:24AM -0800, Jue Wang wrote:
> My slight reservation is that this suggests all use cases of "REP;
> MOVS*" must take the _ASM_EXTABLE_ form, which is not possible;
> considering "REP; MOVS*" can be exercised from any user space program.
Well, we could try to decode the instructions around rIP when the #MC
is raised and see what caused the MCE and perhaps pick apart which insn
caused it, is it accessing behind the buffer boundaries, etc.
> If there is a way to get all users of "REP; MOVS*" to use
> copy_mc_enhanced_fast_string, this could work. I am not sure this is
> possible.
Yeah, no, this is for the copy to user direction only.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette