Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp704267pxb; Wed, 16 Feb 2022 02:30:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyA9y1Cov5kWkGHMqahrs/hKthd5UwjxFZj5iaQ+AvwCR0/p9d768kwd3xlVmUdtRHvqjwo X-Received: by 2002:a63:8649:0:b0:34c:3be:ba14 with SMTP id x70-20020a638649000000b0034c03beba14mr1712525pgd.139.1645007417118; Wed, 16 Feb 2022 02:30:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645007417; cv=none; d=google.com; s=arc-20160816; b=QHOaYG00ZS1RI6meT37VQFRDvrB2HCMy00RihJ8L1JC39c93ElKCqxudSRZcNc5+Fi ptpzcFfJzOMqt4r+dt4kJcNH+viTKHpWvJu9Ryj4wyHS7GcgQO2RbJ58bYGkYZZyMOZn vKQJvsoNck03OpZLlQ2++ZkfX+/M/5yzFuLrnTo+T7vzGQrex7jT8OknEync6DNUSTav Ld0Z4fPhhj9Dq8s2i4CUl+pXNquMXjeOJ+mdgmuUew+DjaW1TGLOcMCSdd03wuw+xXUI 9QIAm4fC4/l+KPSctiNw9hFA1TIr+kYVB81Zp9T+9++25rhvOJu2b65UvWMXVTUrH0T3 hA1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1iASlCBOHtED7Z2DvFclCOCtXnoNRBqSBjzPZUr+6E0=; b=bgxNtYqE3rlv7uvZl1q1O6NlmIBj78CZQmDcNkR1TIW8A+SUh9ANsgxCa22fFvbvFm gvhedgYHyAEq68shV6476A6tpxc4Z/ejBt79Eza0NcBErs99rwlXIlSIT4dF/UyB/hcR daoeka6HokpCIRq7vQHDJyZXFJZnkRFUwgUuqYz584J6FeRikKUG0llk80UYzkCGSXhI R4jxf8DtLVoBu9hZQhr3VV0kHdugP1L0lxc9uPmJGAQ/oBSOkMtgCn3HP18gkOaeJdq1 koc/QP8Jzug0CmEPPw5UDMZCa5cySF7nCbndVhUgzT4mi08J0Q665mJU/6wbByn3to0p w2nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=OSo5jxyY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw13si10485877pjb.82.2022.02.16.02.30.02; Wed, 16 Feb 2022 02:30:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=OSo5jxyY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231144AbiBPK3i (ORCPT + 99 others); Wed, 16 Feb 2022 05:29:38 -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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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