Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3477910pxp; Tue, 8 Mar 2022 15:29:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7pGE4BkiG+hfHbQuEUqoHm8ln6fdezyroNaiITLZiU7XwrIi8v80FAVuQH/TcDwk4aRx8 X-Received: by 2002:a17:902:b18d:b0:151:7456:4f77 with SMTP id s13-20020a170902b18d00b0015174564f77mr20457114plr.41.1646782150153; Tue, 08 Mar 2022 15:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646782150; cv=none; d=google.com; s=arc-20160816; b=UEeWaAp9wZNVvmrZW0jLOkHs2KwJWStodSPxPNu1g3gsdWnqyIV8bfs9AT6LAktEpM myi8Mz0NdhoqUsf/VBGmujoduvHBxeXGK57EqFtUYAGiIfYezlt0tJdIRZdgXmUpDT1v TxRkML5NhDw1s9hi9t65U+thoAY38y7OeQYDyvD+ih/4GUhcZchXI8+pdTIIw+BAnT+4 FTytaGvB3eNYBbouk3t14JtMrCINFGprBNXCvWtMH/blQE5nckEK/PcU+BJTHsjzdtJI bDfPIv1kAlEhgYVeBXjY4QYQw/Q4C0gwo/UREO2EnnuTJNufYhEUOvVRU6xuAAI9Wp8D iqcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OnB4E2V55eX3VFINFuDFHwNcAhziinbz9b0wRuMwc+w=; b=pdZG4BbkIZkoJ1l6JK4UcmE4oBlZ7d02s8hfGnTZwiNoIFYenew5AsRrdYiLzckz8/ cO6NG8csnzu2B9RGgf8Gcdak4V1jDo/7LujNOZNoyDfJfcFakCANzwpBx6sit/wbhquP c3I06RGcVx9MaTVzl8BjlG/cms3evVKUv4bWGZnsyBSDD/nFPnolC55MwwtgXLKDRNjT EPXL4MRqgCgpgTWUrO1D3aeqUc1UGOW3mBZmtRN1BqPD94o9l4kD48M+EW/h0deQcLbc 6NF20EGoYSQEPXMpnAn5ZCCiE/GYW5ZfVTFaro6Qr/A7p0T7CyA/vXnktSqDZBGGStJY rSCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fF6muMrg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n5-20020a62e505000000b004e12e13947esi193551pff.187.2022.03.08.15.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 15:29:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fF6muMrg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 94D0D996A0; Tue, 8 Mar 2022 15:18:22 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345927AbiCHKnQ (ORCPT + 99 others); Tue, 8 Mar 2022 05:43:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230518AbiCHKnQ (ORCPT ); Tue, 8 Mar 2022 05:43:16 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33256424B7 for ; Tue, 8 Mar 2022 02:42:19 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id u1so27742293wrg.11 for ; Tue, 08 Mar 2022 02:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OnB4E2V55eX3VFINFuDFHwNcAhziinbz9b0wRuMwc+w=; b=fF6muMrgXM8f0RIMY234w716dRJ8RS4wG9Cz5fspMkIRXJU3uPQlgAiCrW+r1NQd6z TOClkWuWJKjg795h5BXTdIVKAY4Ncc4SEY8IIvecvVcoDXGXroeo9zqrXDUiXOGfBB3c TIFJej4H+ZqjxiO+05Ex9MjCUiiJHXdD9popyq6IMVcWa2dK8vesakQqzXQtVugM4c+e S8U76KsfZ7DEMlQsmQFNIEBEHFOWL0xJRKhV/6jpnKuGYZLBdJpt7YBTeI+t815z/3NB 0RCsj02qkiwgo8ivFKwlpILSrCeAnJtKYv5FHtYsZz5G81Cj81VWh7b95kKrHI7Ou2v/ kzHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OnB4E2V55eX3VFINFuDFHwNcAhziinbz9b0wRuMwc+w=; b=2wOmNmv+XVGl1HbQS+kqs4j+H4PoqI0MpfkSdVf/kntTbTwIni064q+5oK1TAAlRUw 8xsEMDBiUg0gqr++zgYTYRh5m3mI+zgp08DDnU6GhOEW3nvZ4XcYtUA/gBCMCH6zSfij KwkjZwYVhrBJy83nhXirIRgXgg61ZmAnmYCuLFFAIcIpEqnU2YzelBkxxiwyXpmS/Ylk Eq/6zNGz5rkotKZtsiiB33kqUHyzL34cCxmhfjiVZo6QhgZCTGi+3bDK5szNAa5NOB7L azVLSp7v9xLoKIZV0qJBTSmrJbc/1g3t+HpLttUlxHpXLc6IvR57mmzOSjkENr4UX7L7 zDmg== X-Gm-Message-State: AOAM53312ZaAEQoR7fTt4GTgBeYdAcYTb27QecEvzjrAnl/Adj5ozDga zYbCSInY1P567nsjENVQbiebNw== X-Received: by 2002:a05:6000:1a8f:b0:1e8:3301:1273 with SMTP id f15-20020a0560001a8f00b001e833011273mr11762921wry.707.1646736137719; Tue, 08 Mar 2022 02:42:17 -0800 (PST) Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id t9-20020a05600c198900b0037bd5fabd10sm2060594wmq.48.2022.03.08.02.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 02:42:17 -0800 (PST) Date: Tue, 8 Mar 2022 10:42:15 +0000 From: Daniel Thompson To: Qian Cai Cc: Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] configs/debug: set CONFIG_DEBUG_INFO=y properly Message-ID: <20220308104215.q4asb6z3vicq2vja@maple.lan> References: <20220301202920.18488-1-quic_qiancai@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220301202920.18488-1-quic_qiancai@quicinc.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 01, 2022 at 03:29:20PM -0500, Qian Cai wrote: > CONFIG_DEBUG_INFO can't be set by user directly, What do you mean by "can't be set by user directly"? DEBUG_INFO is fully controlable via menuconfig. > so set CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y instead. > Otherwise, we end up with no debuginfo in vmlinux which is > a big no-no for kernel debugging. > > Signed-off-by: Qian Cai > --- > kernel/configs/debug.config | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/configs/debug.config b/kernel/configs/debug.config > index e9ffb0cc1eec..07df6d93c4df 100644 > --- a/kernel/configs/debug.config > +++ b/kernel/configs/debug.config > @@ -16,7 +16,7 @@ CONFIG_SYMBOLIC_ERRNAME=y > # > # Compile-time checks and compiler options > # > -CONFIG_DEBUG_INFO=y > +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y Does this change actually work in the kernels it has merged into? DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT existence is predicated on DEBUG_INFO being set. It makes no sense at all to set the former without the later. I tried this with ARCH=arm64 and it is clearly not working and should probably be reverted from v5.17: ~~~ maple$ git describe v5.17-rc7 maple$ make defconfig *** Default configuration is based on 'defconfig' # # No change to .config # maple$ scripts/config --disable DEBUG_INFO && make oldconfig # # configuration written to .config # maple$ grep DEBUG_INFO .config # CONFIG_DEBUG_INFO is not set maple$ make debug.config maple$ grep DEBUG_INFO .config # CONFIG_DEBUG_INFO is not set ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^ maple$ echo CONFIG_DEBUG_INFO=y kernel/configs/debug_info.config CONFIG_DEBUG_INFO=y kernel/configs/debug_info.config maple$ make debug_info.config Using .config as base Merging ./kernel/configs/debug_info.config Value of CONFIG_DEBUG_INFO is redefined by fragment ./kernel/configs/debug_info.config: Previous value: # CONFIG_DEBUG_INFO is not set New value: CONFIG_DEBUG_INFO=y # # merged configuration written to .config (needs make) # # # configuration written to .config # maple$ grep DEBUG_INFO .config CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_COMPRESSED is not set # CONFIG_DEBUG_INFO_SPLIT is not set CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_DWARF5 is not set ~~~ Daniel.