Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp905681imu; Fri, 7 Dec 2018 10:43:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/VOxd2EuUGUcDVsT2ZxYRDmR74a/5PDXi8whLy8YR5n+oN68bOL04o7pzHwProS0D6qeu67 X-Received: by 2002:a17:902:227:: with SMTP id 36mr3208321plc.140.1544208201987; Fri, 07 Dec 2018 10:43:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544208201; cv=none; d=google.com; s=arc-20160816; b=yTIwP+ROtxUsXkgnJ/q8KneV6FWdiXPkkHu1sckjJAowWSFSatsVOTKzXMgMXEWHXq LHBzYu22120ylkVItvjo9tnXc6JwiPcKSuN3hB4aCSnbatZN9A2FP/NAqK7/OF/ZtoXd Z3Hj8hw2EVSdrMyS3mMx5pfvqt0SokwjUFSY7HWfkK9axGSL4rMsiFbRrDGvGFT+0xgC l4i4izFVZvtf+xgrfY6EgCrmFvWWjP5ejj0xQTAzHFCXHvk/ulOwvOZ+sC/yoN52yV3t fl7ZSuV4K8pITbyfdP3Cd6+0Z9sZqkdl9wiv+ZioIpkB6mJfqBMebwIldJMYVxJn3Ih4 Mqtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=SRCkAV/rwwCb6G1s504cXx97lfWxm12ZTF5AciiY020=; b=GI7Zh0jZ0mhawhRczKJELjBhMuub3TVeRWHCqhd6U1BJ3bnRO5KiThgG5Xu/QPgZ4+ +wEu2CzvcHztlEQcB3sOHMN7SzASFvZcbe+Aa8pStl76q9O6YwLKMEyFuk8Ii6HGWnzV ZlUsMCSMiisprk8+LxWBNpXzfkcoAAhayfhQhNAZzZfTB+TL/wNmjaCUgBXrCkOnwwdl zixmz6LydRBS/zu4Kfxi9UYm8YpdhY4mNZqH4zAiDQ+Lu8oyhs5L89iODyxmqpO6Dv1e La7RdnF1euld96wtWJC4+QtlCGm+EI+4VCYHqKZ5r3aJPUf4wNKqQQ8tDMZRRClY7PrU mqCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Xmck1bS0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12si3257666pls.71.2018.12.07.10.43.06; Fri, 07 Dec 2018 10:43:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Xmck1bS0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbeLGSkp (ORCPT + 99 others); Fri, 7 Dec 2018 13:40:45 -0500 Received: from mail-ua1-f67.google.com ([209.85.222.67]:37381 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726408AbeLGSkm (ORCPT ); Fri, 7 Dec 2018 13:40:42 -0500 Received: by mail-ua1-f67.google.com with SMTP id u19so1748879uae.4 for ; Fri, 07 Dec 2018 10:40:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SRCkAV/rwwCb6G1s504cXx97lfWxm12ZTF5AciiY020=; b=Xmck1bS0DtZaa+WeJixKR5fKXvJ0b/KkgVumJ+cB+BRhf2dA1IB3yHuUry37zHpQs6 zaxAXd4KG8ZJT1/0HnMFp9V5QWu3sIojUVz3n8BmfxYYfJvsAIizcUxSgPQrz5Rov1t2 CbtwE330HXlFJIaGEy1i92cSc9oRewduTt9lw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SRCkAV/rwwCb6G1s504cXx97lfWxm12ZTF5AciiY020=; b=UgxKgpaNv02MsHXZXOG15Djihjlx95+PZA+u/sOsrlmfkByAaTWfYtw4ZdPiehcncS w23p9vdkhfWG/VQ4j2cAcxkeUMfKqrpC300Chnj4nH6nC6ovveX0ORz6pahYPTTU6d8L 9OP9W+RPu0gMTeSeThf8prt/lqnxqcl9+vFk1yAgZuADFbvbKfHfx4ZVpQ9qZmAOaFb1 pTgH/YZSh6CD6ttN/QplFb+wDFtxYTtb4Xk0zLFAELCQx9u11zUMWtRHMLyf6oD2+YA8 cpCWtFj9bKTFsIFcg5nc+QF90UoIKt2beLgc/Gc3FNLXP5uT+E3Fxz2cn7vjgpSPuBJr qZcA== X-Gm-Message-State: AA+aEWZcTli4M0jodhq2xTXfz18YPGosDEcO2fjf0pcHsPAd/z0D1hiS cclZsvEGhaeMnaIhv8g0IwsrEmvBa+I= X-Received: by 2002:ab0:6198:: with SMTP id h24mr1454539uan.97.1544208040595; Fri, 07 Dec 2018 10:40:40 -0800 (PST) Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com. [209.85.217.42]) by smtp.gmail.com with ESMTPSA id y195sm1746685vkd.0.2018.12.07.10.40.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 10:40:38 -0800 (PST) Received: by mail-vs1-f42.google.com with SMTP id h78so3022150vsi.6 for ; Fri, 07 Dec 2018 10:40:38 -0800 (PST) X-Received: by 2002:a67:dd11:: with SMTP id y17mr1406802vsj.111.1544208038051; Fri, 07 Dec 2018 10:40:38 -0800 (PST) MIME-Version: 1.0 References: <20181205033828.6156-1-dianders@chromium.org> <20181207174231.GD11961@arrakis.emea.arm.com> In-Reply-To: <20181207174231.GD11961@arrakis.emea.arm.com> From: Doug Anderson Date: Fri, 7 Dec 2018 10:40:24 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [REPOST PATCH v6 0/4] kgdb: Fix kgdb_roundup_cpus() To: Catalin Marinas Cc: Jason Wessel , Daniel Thompson , mhocko@suse.com, linux-sh@vger.kernel.org, Peter Zijlstra , kgdb-bugreport@lists.sourceforge.net, Will Deacon , LKML , dalias@libc.org, paulus@samba.org, "H. Peter Anvin" , sparclinux@vger.kernel.org, Yoshinori Sato , linux-hexagon@vger.kernel.org, x86@kernel.org, Russell King - ARM Linux , Ingo Molnar , jhogan@kernel.org, linux-snps-arc@lists.infradead.org, ying.huang@intel.com, linux-mips@vger.kernel.org, rppt@linux.vnet.ibm.com, bp@alien8.de, Thomas Gleixner , Linux ARM , christophe.leroy@c-s.fr, Vineet Gupta , Ralf Baechle , rkuo@codeaurora.org, paul.burton@mips.com, Benjamin Herrenschmidt , mpe@ellerman.id.au, Andrew Morton , linuxppc-dev , David Miller Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, Dec 7, 2018 at 9:42 AM Catalin Marinas wrote: > > On Tue, Dec 04, 2018 at 07:38:24PM -0800, Douglas Anderson wrote: > > Douglas Anderson (4): > > kgdb: Remove irq flags from roundup > > kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() > > kgdb: Don't round up a CPU that failed rounding up before > > kdb: Don't back trace on a cpu that didn't round up > > FWIW, trying these on arm64 (ThunderX2) with CONFIG_KGDB_TESTS_ON_BOOT=y > on top of 4.20-rc5 doesn't boot. It looks like they leave interrupts > disabled when they shouldn't and it trips over the BUG at > mm/vmalloc.c:1380 (called via do_fork -> copy_process). > > Now, I don't think these patches make things worse on arm64 since prior > to them the kgdb boot tests on arm64 were stuck in a loop (RUN > singlestep). Thanks for the report! ...actually, I'd never tried CONFIG_KGDB_TESTS before. ...so I tried them now: A) chromeos-4.19 tree on qcom-sdm845 without this series: booted up OK B) chromeos-4.19 tree on qcom-sdm845 with this series: booted up OK C) v4.20-rc5-90-g30002dd008ed on rockchip-rk3399 (kevin) with this series: booted up OK Example output from B) above: localhost ~ # dmesg | grep kgdbts [ 2.139814] KGDB: Registered I/O driver kgdbts [ 2.144582] kgdbts:RUN plant and detach test [ 2.165333] kgdbts:RUN sw breakpoint test [ 2.172990] kgdbts:RUN bad memory access test [ 2.178640] kgdbts:RUN singlestep test 1000 iterations [ 2.187765] kgdbts:RUN singlestep [0/1000] [ 2.559596] kgdbts:RUN singlestep [100/1000] [ 2.931419] kgdbts:RUN singlestep [200/1000] [ 3.303474] kgdbts:RUN singlestep [300/1000] [ 3.675121] kgdbts:RUN singlestep [400/1000] [ 4.046867] kgdbts:RUN singlestep [500/1000] [ 4.418920] kgdbts:RUN singlestep [600/1000] [ 4.790824] kgdbts:RUN singlestep [700/1000] [ 5.162479] kgdbts:RUN singlestep [800/1000] [ 5.534103] kgdbts:RUN singlestep [900/1000] [ 5.902299] kgdbts:RUN do_fork for 100 breakpoints [ 8.463900] KGDB: Unregistered I/O driver kgdbts, debugger disabled ...so I guess I'm a little confused. Either I have a different config than you do or something is special about your machine? NOTE: In general I've never considered "single step" as reliable in kgdb. I mostly use kgdb as "after the fact" crash debugging to analyze local variables / memory / other tasks. If it worked that'd actually be kinda great, but at least when I started using kgdb years ago I learned that it didn't work and stopped trying... -Doug