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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 8E973C4363A for ; Thu, 22 Oct 2020 09:03:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1546422249 for ; Thu, 22 Oct 2020 09:03:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1546422249 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BD226F575; Thu, 22 Oct 2020 09:03:45 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id A6BB76F575 for ; Thu, 22 Oct 2020 09:03:44 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6501AB212 for ; Thu, 22 Oct 2020 09:03:43 +0000 (UTC) Date: Thu, 22 Oct 2020 11:03:43 +0200 Message-ID: From: Takashi Iwai To: amd-gfx@lists.freedesktop.org Subject: kgdb_breakpoint() usage leads to kernel panic User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" Hi, we recently stumbled on a kernel crash in amdgpu [*], and the kernel messages indicated that it's from kgdb_breakpoint() call in ASSERT_CRITICAL() macro. Since CONFIG_KGDB=y is set on the openSUSE distro kernels, the breakpoint is enabled even though CONFIG_DEBUG_KERNEL_DC=n, and this leads to a kernel panic because of INT3. Unfortunately there is no dynamical control to disable it. I guess the kernel panic isn't intended for end-users, right? If so, shouldn't we cover kgdb_breakpoint() in ASSERT_CRITICAL() also with CONFIG_DEBUG_KERNEL_DC? Also, taking a quick glance at the code, I noticed a few things: - What's the difference of ASSERT() and ASSERT_CRITICAL()? Why ASSERT() uses WARN_ON() and WARN_ON_ONCE() conditionally? - I couldn't see CONFIG_HAVE_KGDB anywhere else. Is this superfluous? - CONFIG_DEBUG_KERNEL_DC can have "depends on KGDB" in Kconfig. Then the ifdefs can be much simplified. [*] https://bugzilla.suse.com/show_bug.cgi?id=1177973 thanks, Takashi _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx