Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp394241pxb; Tue, 9 Feb 2021 03:13:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwX6zBUmsCvF22tsk2UYbTKj2L/cVal0Qe44O4VxaFbBBNCFmHs8V5SuiogKHn8yU8YvY8q X-Received: by 2002:a17:907:2172:: with SMTP id rl18mr13694021ejb.125.1612869194734; Tue, 09 Feb 2021 03:13:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612869194; cv=none; d=google.com; s=arc-20160816; b=ekQ4XJDm2FZbW0U6NZBJK2j4TZCLe8PcQk943Isdo8QYuTutxc6TqxtiRIdS3SzSZx x+AZEon165mRJZTHy7cZl1FAXGb4lZMTT3wVzwHTg2uxjkUssnPgycBG1Wyd+6/yqono zIR38W5r76cRX+R6hKHOal7SIZOSYOJOVMcliz1XxfZxdYV38uDA0GorbRXs6SS0Pnsw wUmeXBuoXL54nNvJBWkHG1QQqdPjzhHdbYzdKBq8yCcNyLrI1bidwRbz5ybe6AJE1FNM XsXjhfDxVzB6eJl56S0RwrY8bGSpN7egi9n6uGA1lB6S2I/wSap0Gq9vrvz+Y6ZpVx6I 5jew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=l5EJybRjlcUj0cKcnS64rOqPsdV5T718ti2rqezNgtA=; b=S+4MnLdhKK4Ovrd58yf63EUO5TMDXwvr/hNcZabSxBX5iHEPddok22Bj3ZXxzFLt0S yavfLtACNvEc9cr7dx0PbyA7z34c5eTJlGRgt4bxsT2dO2brjvmMr6tPs75hWNPiC/SI CiZt+VEhYwLLNj/V+VvV5V9/02N+I1a5NMSCAqaeiedLMB/9DwiewYufZSGZmeNco7Mk 4Nt79HBMuW+nbMIKBP2NKRpi6BqnJUMOq6+vy7ssOjWLqV3NWXwUwPk8E0Jqiu4xXgJL A0aXKuUXkdNShYoa6KVOSr0dZ9n3ZTyjIDVHjvXD/Mp/nEn/rf2TNIZox2kONYZtIZXv 8p6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="u/ku/44G"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si12605886ejr.344.2021.02.09.03.12.51; Tue, 09 Feb 2021 03:13:14 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b="u/ku/44G"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232250AbhBILKF (ORCPT + 99 others); Tue, 9 Feb 2021 06:10:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232409AbhBILHx (ORCPT ); Tue, 9 Feb 2021 06:07:53 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4808AC061788 for ; Tue, 9 Feb 2021 03:07:13 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id f23so10598551lfk.9 for ; Tue, 09 Feb 2021 03:07:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l5EJybRjlcUj0cKcnS64rOqPsdV5T718ti2rqezNgtA=; b=u/ku/44GHyiITEMkHko1k4WquzgkS67Nq7Pn4nB9PJ4DPAEi8KD8vihae7WnnVKvcI 7Dmhv9NgmeHwkTw1hidSSR7J2+LndGjZPYUWGncD0s/ajPERZSYQF5O3dtGyK4DysZ9K SZc1E4vufJvvt3exrLO7cR8i/drfxzGPWbgkYLfsTSXqAUEfowwVLRAxKQH3GE5IJetg XB6ZNqyx1Zlgkn9gvejccWj0crMW/Ut6jdqwdlQHIPNfWI52WTFbGefR+hKFCsZ+oLOJ 9grlEexIFK54ZNauc1NaP86Q4eC00qGGutsP/XCzciZFFiTDVRYXXmKtdd1jslC0rjJN PRbQ== 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=l5EJybRjlcUj0cKcnS64rOqPsdV5T718ti2rqezNgtA=; b=S8RhCD+grw9U5St73M6Plo86THCoo9yILPsOxU1NEa7wdK9l+g99malcU6/Xmh7iKm nDD+gMKaPCA/9QGsmOm6xBYaMSl41LWW+zI2yy/mIpJkHs+dFKtgtNBqdIhdo5xHvqar mwssXzEW8fpttRlgau+VJPvZDbZAi4+l8iFHbUk4R4vrLNHXMT+9iRLPWpNehRk0vH5j 9zjrbW0L9C5q7Xxb/rxX3c2GiDPOSaMbSujsBwY4MLUvKwuVwkDAuByg7SVxzxNIVc3f 7fPasSR5M/QUSbX5ye+7+CT6xicBdWr4Evqw4WS4vSNOtasxLCFvl61ruHGhIYGIe7kP gSXg== X-Gm-Message-State: AOAM531zfMDsuC6zjK5IcnUxY4/iHxnWpJIQ64CPT8SuyH9J5/tqoRrk yu64tz5prUFkFqEdkog/6WOblK+xL4D3RYsQ89hDOg== X-Received: by 2002:a19:6410:: with SMTP id y16mr13216081lfb.113.1612868831761; Tue, 09 Feb 2021 03:07:11 -0800 (PST) MIME-Version: 1.0 References: <1611915427-3196-1-git-send-email-sumit.garg@linaro.org> <20210208094303.csu2kkyi25d7a25y@maple.lan> <20210208134802.tr7jzk27ja5chwgf@maple.lan> In-Reply-To: <20210208134802.tr7jzk27ja5chwgf@maple.lan> From: Sumit Garg Date: Tue, 9 Feb 2021 16:37:00 +0530 Message-ID: Subject: Re: [PATCH v3] kdb: Simplify kdb commands registration To: Daniel Thompson Cc: kgdb-bugreport@lists.sourceforge.net, Jason Wessel , Douglas Anderson , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Feb 2021 at 19:18, Daniel Thompson wrote: > > On Mon, Feb 08, 2021 at 03:18:19PM +0530, Sumit Garg wrote: > > On Mon, 8 Feb 2021 at 15:13, Daniel Thompson wrote: > > > > > > On Fri, Jan 29, 2021 at 03:47:07PM +0530, Sumit Garg wrote: > > > > @@ -1011,25 +1005,17 @@ int kdb_parse(const char *cmdstr) > > > > ++argv[0]; > > > > } > > > > > > > > - for_each_kdbcmd(tp, i) { > > > > - if (tp->cmd_name) { > > > > - /* > > > > - * If this command is allowed to be abbreviated, > > > > - * check to see if this is it. > > > > - */ > > > > - > > > > - if (tp->cmd_minlen > > > > - && (strlen(argv[0]) <= tp->cmd_minlen)) { > > > > - if (strncmp(argv[0], > > > > - tp->cmd_name, > > > > - tp->cmd_minlen) == 0) { > > > > - break; > > > > - } > > > > - } > > > > - > > > > - if (strcmp(argv[0], tp->cmd_name) == 0) > > > > + list_for_each_entry(tp, &kdb_cmds_head, list_node) { > > > > + /* > > > > + * If this command is allowed to be abbreviated, > > > > + * check to see if this is it. > > > > + */ > > > > + if (tp->cmd_minlen && (strlen(argv[0]) <= tp->cmd_minlen) && > > > > + (strncmp(argv[0], tp->cmd_name, tp->cmd_minlen) == 0)) > > > > break; > > > > > > Looks like you forgot to unindent this line. > > > > > > I will fix it up but... checkpatch would have found this. > > > > > > > Ah, I missed to run checkpatch on v3. Thanks for fixing this up. > > Unfortunately, it's not just checkpatch. This patch also causes a > large number of test suite regressions. In particular it looks like > kgdbwait does not work with this patch applied. > > The problem occurs on multiple architectures all with > close-to-defconfig kernels. However to share one specific > failure, x86_64_defconfig plus the following is not bootable: > > ../scripts/config --enable DEBUG_INFO --enable DEBUG_FS \ > --enable KALLSYMS_ALL --enable MAGIC_SYSRQ --enable KGDB \ > --enable KGDB_TESTS --enable KGDB_KDB --enable KDB_KEYBOARD \ > --enable LKDTM > > Try: > > qemu-system-x86_64 \ > -enable-kvm -m 1G -smp 2 -nographic > -kernel arch/x86/boot/bzImage \ > -append "console=ttyS0,115200 kgdboc=ttyS0 kgdbwait" > Thanks Daniel for this report. I am able to reproduce it with "kgdbwait" and will investigate it. -Sumit > > Daniel.