Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp27713ybz; Tue, 21 Apr 2020 14:28:41 -0700 (PDT) X-Google-Smtp-Source: APiQypJHveRcI0oFml4YqTbnOMS8aRjb6iOR3wcbMF9Cy8rk1K1/L4teF1VsCD1i1t9y9lwspymY X-Received: by 2002:a17:906:298f:: with SMTP id x15mr23326937eje.380.1587504521767; Tue, 21 Apr 2020 14:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587504521; cv=none; d=google.com; s=arc-20160816; b=ynIyzvwYCeJ/5wS0qT/xgxBLoo6x13AJ89J/ex1tUocAc+pf9OjjSptKRIAy1LuGZq BfP8RzLKKm4hBvcnzjD/0jjXGrv9LEUVJ/HPJZnr9RShjYgn2JUxlbItWi8mh/OnKgyJ Fsw8pkJpdIZY5AoxodXQxCHE/aBAaoJRI3XLlnvLzefqw7NB5/ok3GeNztUiHIjjFgq9 1zHROmuwqLxK0j+DASHG7NbavTwFXcDFzPqNsGQxTYLDydRWNP0HhpRPva+2/3iacB2e qGdXMq9NyRPBOnetwz2vo3D40LHy/JbNxfxWI4uQk5kueeqXORSrFnCdKcYQcgGUj0fl 8GwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LyNj4SiL/2kh6dALWu6QVaROE8w7N0gkcmTuKp8uqPc=; b=YJgqmSNEccApxJz0G06QG6TxuZ/4DxmyyMRhC/HojY97OyS5ZvvatEclz9DbWSQzp+ WyjYQ+P9q6RU7P18wsjrqYhBXmGE5qP75UMGKeSjm+73RzNH62CruDTA+rn7uSVcXiSB CW8A2yiQNGM/QaZyfZ+U1U4WCKLR1/lkVEBkpCDWF+x+hFtvNS3wPaJ0nWixCwhBHMzT IItZwHVVQU8Rn9z/OEUaHkz1z3Dd49BQdgyy67Ij5gd2qCZsVc/D39q3luqKmNqrxpgA 9/YUpZSKYcZk2D5aSd5JTBAS6VvNUifCGQywMNFiASvyH/EsMXCcpMiJXk/AGdkDfsge I4zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="A0w/fOVb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si2354824ejr.291.2020.04.21.14.28.15; Tue, 21 Apr 2020 14:28:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="A0w/fOVb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726337AbgDUVX7 (ORCPT + 99 others); Tue, 21 Apr 2020 17:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726055AbgDUVX7 (ORCPT ); Tue, 21 Apr 2020 17:23:59 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 597EBC0610D5 for ; Tue, 21 Apr 2020 14:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=LyNj4SiL/2kh6dALWu6QVaROE8w7N0gkcmTuKp8uqPc=; b=A0w/fOVbmXTqlRPw0gYzdH3btq YIuDXFJUyL+lLIsnyIYBiKnPBjoqscUWLkkBNANMU5SCWlzC/Oe9zqpQXbg4ERaDu8wwJw9o1rHbQ GvsHK9jBtBCQWvPfO2WAp6myl42kUdLpkhDdzYYRXhcmU6WQUO2TBsIVID7JgpT0zkZRe1qwHKiGR qK9lhDzp4+Lb16ZriVYxXN4dOMLAKuPUfo7FOE6NFVGc0mrxqcEX3Drk2UadMoZMQHQUzyYYWItQm gYbwAqLwDiMPGYNUiVYyefxoDewFld7Pi9rAcHcos1xpotK+rISVqWPfT3bjQ8CtGVyRi/ifZXOgx Ehwb2ygA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jR0Mw-0003TB-9i; Tue, 21 Apr 2020 21:23:50 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id A2AA4983ABB; Tue, 21 Apr 2020 23:23:47 +0200 (CEST) Date: Tue, 21 Apr 2020 23:23:47 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Harald Arnesen , Ingo Molnar , "Rafael J. Wysocki" , Linux Kernel Mailing List , Giovanni Gherdovich Subject: Re: [BISECTED]: Kernel panic (was: Linux 5.7-rc2) Message-ID: <20200421212347.GV2483@worktop.programming.kicks-ass.net> References: <428bac87-b6dd-0867-c8f8-622cd606de3e@skogtun.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 21, 2020 at 12:03:10PM -0700, Linus Torvalds wrote: > On Mon, Apr 20, 2020 at 1:52 AM Harald Arnesen wrote: > > > > Neither rc1 nor rc2 will boot on my laptop. The attached picture is all > > I have been able to capture. > > I know you saw the reply about this probably being fixed by > > https://lore.kernel.org/lkml/20200416054745.740-1-ggherdovich@suse.cz/ > > but it would be lovely if you could actually verify that that series > of four patches does indeed fix it for you. (not seeing the original report in the archives or my list copy) I'm assuming it's some sort of dodgy virt setup, actual real proper hardware should never get here like that. > Your oops is on that divide instruction: > > freq_scale = div64_u64(acnt, mcnt); > > and while we had a check for mcnt not being zero earlier, we did > > mcnt *= arch_max_freq_ratio; > > after that check. I could see it becoming zero either due to an > overflow, or due to arch_max_freq_ratio being 0. Right, so that's not supposed to happen, as you say, we should not enable this code if the ratio is 0, and we should not overflow mcnt due to reading that reg once per tick. But yeha, virt, anything can happen :/ > I think the first commit in that series is supposed to fix that > arch_max_freq_ratio being 0 case, but it still feels like the code > that does the divide is checking for zero in the wrong place... Yeah, we can certainly modify that. As is, real actual hardware should never even hit that case either. So we might as well move that check and then also make it disable all this frequency scaling stuff if we ever do hit it.