From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18B27C433EF for ; Wed, 16 Feb 2022 10:29:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229554AbiBPK3j (ORCPT ); Wed, 16 Feb 2022 05:29:39 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbiBPK3R (ORCPT ); Wed, 16 Feb 2022 05:29:17 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7229521920F for ; Wed, 16 Feb 2022 02:28:47 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id D85CA1EC054C; Wed, 16 Feb 2022 11:27:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1645007278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=1iASlCBOHtED7Z2DvFclCOCtXnoNRBqSBjzPZUr+6E0=; b=OSo5jxyYxijPlRROdYxeqJ0U+fS9j9OW7//QfVD9JnWM34azp4YBysQBmRHEk9JPGLfUXj +DgWSbhZpyKQmG+6GZiKy6q0avRK3tsQ0Gkm/drnuEXjaEvDElzPekpmezagYPTREwqPMA 1veONq9EZ+4IkqiN6xDeOByUfER0YOI= Date: Wed, 16 Feb 2022 11:28:01 +0100 From: Borislav Petkov To: "Luck, Tony" Cc: Jue Wang , x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH] x86/mce: Add workaround for SKX/CLX/CPX spurious machine checks Message-ID: References: <20220208150945.266978-1-juew@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 15, 2022 at 02:22:33PM -0800, Luck, Tony wrote: > This early in do_machine check we don't know whether this was from > a over enthusistic REP;MOVS fetch, or a "normal" machine check. > I don't think there is an easy way to tell the difference. That's what I am wondering: whether we can compare the buffers REP; MOVS was accessing and determine whether the access was out of bounds. Something ala _ASM_EXTABLE_ as it is done in arch/x86/lib/copy_mc_64.S, for example, which will land us in fixup_exception(). Now there we'd need to know the range the thing was copying which should be in pt_regs and the address the MCE reported. If latter is not in the former range, we say ignore. There's even some blurb about "recovering from fast-string exceptions" over copy_mc_enhanced_fast_string... Hmmm? > The first check: > > if ((mcgstatus & MCG_STATUS_LMCES) > > is for "is this a local machine check"? So no broadcast sync > needed. But that needs a comment. Yap. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette