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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE832C433E0 for ; Tue, 2 Feb 2021 11:01:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0D6A864DDB for ; Tue, 2 Feb 2021 11:01:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D6A864DDB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6A0EE6B006C; Tue, 2 Feb 2021 06:01:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 650B76B006E; Tue, 2 Feb 2021 06:01:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 567B26B0071; Tue, 2 Feb 2021 06:01:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0039.hostedemail.com [216.40.44.39]) by kanga.kvack.org (Postfix) with ESMTP id 40F286B006C for ; Tue, 2 Feb 2021 06:01:33 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E277D362E for ; Tue, 2 Feb 2021 11:01:32 +0000 (UTC) X-FDA: 77773036824.13.trees83_2414021275ca Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id A7ECF18140B67 for ; Tue, 2 Feb 2021 11:01:32 +0000 (UTC) X-HE-Tag: trees83_2414021275ca X-Filterd-Recvd-Size: 3909 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Tue, 2 Feb 2021 11:01:31 +0000 (UTC) Received: from zn.tnic (p200300ec2f0e1f00bc090c6ff424f9e7.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:1f00:bc09:c6f:f424:f9e7]) (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 150701EC04C2; Tue, 2 Feb 2021 12:01:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1612263690; 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=9gCNYvkuN/kvIgv8aLGPw+TzBmvD3HmEHDLnSe+f7Yw=; b=gYxiZ/z/RYAxYW5HBh7279NrZqyUrTWmKlgcQjEKiMfn496skmrFLs3C4TIe8uAzzNtKfu AtLoHp/7vfDOFEyAPrgTHQdUsSBcwmLxBFEFF3cdiJZLkgFQRvPWCpQcH56SaxWnzihtDU RwtFe8FnvWSI82sLa2TOIFj9vw4ZQFQ= Date: Tue, 2 Feb 2021 12:01:26 +0100 From: Borislav Petkov To: "Luck, Tony" Cc: x86@kernel.org, Andrew Morton , Peter Zijlstra , Darren Hart , Andy Lutomirski , linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v5] x86/mce: Avoid infinite loop for copy from user recovery Message-ID: <20210202110126.GB18075@zn.tnic> References: <20210115232346.GA7967@agluck-desk2.amr.corp.intel.com> <20210119105632.GF27433@zn.tnic> <20210119235759.GA9970@agluck-desk2.amr.corp.intel.com> <20210120121812.GF825@zn.tnic> <20210121210959.GA10304@agluck-desk2.amr.corp.intel.com> <20210125225509.GA7149@agluck-desk2.amr.corp.intel.com> <20210126110314.GC6514@zn.tnic> <20210126223605.GA14355@agluck-desk2.amr.corp.intel.com> <20210128175735.GB2120@zn.tnic> <20210201185812.GA54867@agluck-desk2.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210201185812.GA54867@agluck-desk2.amr.corp.intel.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.010247, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Feb 01, 2021 at 10:58:12AM -0800, Luck, Tony wrote: > On Thu, Jan 28, 2021 at 06:57:35PM +0100, Borislav Petkov wrote: > > Crazy idea: if you still can reproduce on -rc3, you could bisect: i.e., > > if you apply the patch on -rc3 and it explodes and if you apply the same > > patch on -rc5 and it works, then that could be a start... Yeah, don't > > have a better idea here. :-\ > > I tried reporoducing (applied the original patch I posted back to -rc3) and > the same issue stubbornly refused to show up again. > > But I did hit something with the same signature (overflow bit set in > bank 1) while running my futex test (which has two processes mapping > the poison page). This time I *do* understand what happened. The test > failed when the two processes were running on the two hyperhtreads of > the same core. Seeing overflow in this case is understandable because > bank 1 MSRs on my test machine are shared between the HT threads. When > I run the test again using taskset(1) to only allowing running on > thread 0 of each core, it keeps going for hunderds of iterations. > > I'm not sure I can stitch together how this overflow also happened for > my single process test. Maybe a migration from one HT thread to the > other at an awkward moment? Sounds plausible. And the much more important question is, what is the code supposed to do when that overflow *actually* happens in real life? Because IINM, an overflow condition on the same page would mean killing the task to contain the error and not killing the machine... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette