Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1348008rdh; Fri, 27 Oct 2023 11:21:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZ7V8IhfOstgoRR4DLw5LzThBWBcGG9KCHM+BtRG5xzLPk6updDRnr4vHrjBekhx9jKg4R X-Received: by 2002:a25:7652:0:b0:d9c:c79:ca1c with SMTP id r79-20020a257652000000b00d9c0c79ca1cmr3907950ybc.55.1698430896448; Fri, 27 Oct 2023 11:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698430896; cv=none; d=google.com; s=arc-20160816; b=wyJ4ul5cMmtP+e0rISrUF8lkTobgTD8MwlkaltDY3+XrudXC0mfayLUaBxAIgy5qnf z1aFeur77Rl7KYP92ffw2VfcorMCsR3DIZ6EmIRL6Ks5vaPYc+krDyuKMieaT3UbgLE6 DhkNgPwTLJyCYCKt/V9jMbYcmcGyJB89KCdX9rym2vbOJyOSlhdoIwzIROyubr16wd05 sFhld7bmkTmQ9amklwqW7F41GkFuds1tGlhrLbAW96AaM/Hig2Jm2DDcNQBcAk33p0z0 icJVhY3pdekr99OPd73ESzEFTk/NT1ygEjd6Gl6IxfkLsPTkKtd/ipWUw54LQ9e+/XzE cuzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=kqKh9AT18iwbdinBisTYEW8NEyJ9dHdSrh4I4KDbbCg=; fh=H4DVg0vNn+Mt+b0Z50ox6Izxhh4Kk0pCY4qCpOAJlHE=; b=deljRIsGHFL6C+VN2AE2PuMh9yRZ9TAy8ag8SHDbMLkn5VAACtRkl88L5LmZGVZ89H H0yhZA8jQBYHdROQVrfL4Q9A7X8c1p+eIzw/JdB+fz1p1hyH/6cTbgzFQP1qHH69M7Je JiUaMtm1ft427sfLxprf5JHnfHI0w55dVbV+LNlLo9MGkfZALN40s/7yFqMQf9o6KQer oxxOiNCkaB4Bp4yheldt8CeZSotMdumX7rRVVLbs+Tptk9QDBztoCzI5lb0ACRPxb8yd rNh2QRV7FlggPHhCLGy5eP0GRfDZAcGRQVZlISCtjsSU5M8D1704maHu0vZ60KWHHBOy GDDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=OlQzfTga; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Uu2eWeEt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id v18-20020a252f12000000b00d867d4cf07fsi3572686ybv.415.2023.10.27.11.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 11:21:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=OlQzfTga; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Uu2eWeEt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E27CF83792DA; Fri, 27 Oct 2023 11:21:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346223AbjJ0SV3 (ORCPT + 99 others); Fri, 27 Oct 2023 14:21:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231594AbjJ0SV1 (ORCPT ); Fri, 27 Oct 2023 14:21:27 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C8D118A; Fri, 27 Oct 2023 11:21:25 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id BCAB23200991; Fri, 27 Oct 2023 14:21:20 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Fri, 27 Oct 2023 14:21:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1698430880; x=1698517280; bh=kq Kh9AT18iwbdinBisTYEW8NEyJ9dHdSrh4I4KDbbCg=; b=OlQzfTgaBznW8G1AAC 678uEBo1wcRy8QXbXPJrmd2Bhdt086OqcMMcQh7Py2+CiD9PZ2x7bF3WaGkCbEIF WX9kgWEShCOZSVOa7qeviHy3ycPdqga1yKkZheSo4xCh8URzm/n+UAWOMM640tYc WhDDkyapXXQs1o+vZG8t9LhcqwcdZeR6Ij5EDztNNfVh6ebw4F5rr4C2W4Wt1egH q+gSPHEzv4vHleEWvipbqLZmAFE3Q58Lsrk4P+SU4wGbtcoDnADuRpAtgnfsp4bb K0qoDbF28lQgjKplzbhM8ZFwirt7EYPjZtDWnmogBqFuErYYWFDu/i2xxO+b7ojR +ahw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1698430880; x=1698517280; bh=kqKh9AT18iwbd inBisTYEW8NEyJ9dHdSrh4I4KDbbCg=; b=Uu2eWeEtm12OFZkAgZtZwC05t0MFc D4hICCKxVhWGjGW6e8pov8z58/t34xXpNouDi4XeCQRJLSGTvMz07KKew7jrEnyY tWmAPX39D9l6nAAViIgihrgR99El5I5VMf3SPcl5oq2V5Vp+zrXXQMlR40WYzoye dx2BmoblD3x2hGiXobyQJwGP+i6UBfyDhWA7L7ppmWbjkihv9ygcRYMUs9kJhxNO a2UpdlTWiFNk6H6O9v8g1mVZzoeRSHOlrDQ5/P9pNWV6KeogheSlD8oxoky8DiLT MLtaB+n39kwt2h6KlnIjIdEXP6NFxIP/DKokj4HrTx55qtGchO5Fq1y7Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrleeggdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 2ABF6B60089; Fri, 27 Oct 2023 14:21:18 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1048-g9229b632c5-fm-20231019.001-g9229b632 MIME-Version: 1.0 Message-Id: In-Reply-To: <20231027171756.1241002-2-stephen.s.brennan@oracle.com> References: <20231027171756.1241002-1-stephen.s.brennan@oracle.com> <20231027171756.1241002-2-stephen.s.brennan@oracle.com> Date: Fri, 27 Oct 2023 20:20:56 +0200 From: "Arnd Bergmann" To: "Stephen Brennan" Cc: Linux-Arch , linux-kernel@vger.kernel.org, linux-debuggers@vger.kernel.org, "Mike Christie" , "Geert Uytterhoeven" , "Christian Brauner" , "Petr Mladek" , "Marco Elver" , "Randy Dunlap" , "Doug Anderson" , "Maninder Singh" , "Luis Chamberlain" , "Nick Desaulniers" , "Zhen Lei" , "Kees Cook" , "Zhaoyang Huang" , "Andrew Morton" , "Sami Tolvanen" Subject: Re: [PATCH v3 1/1] kernel/config: Introduce CONFIG_DEBUG_INFO_IKCONFIG Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 27 Oct 2023 11:21:35 -0700 (PDT) On Fri, Oct 27, 2023, at 19:17, Stephen Brennan wrote: > The option CONFIG_IKCONFIG allows the gzip compressed kernel > configuration to be included into vmlinux or a module. In these cases, > debuggers can access the config data and use it to adjust their behavior > according to the configuration. However, distributions rarely enable > this, likely because it uses a fair bit of kernel memory which cannot be > swapped out. > > This means that in practice, the kernel configuration is rarely > available to debuggers. > > So, introduce an alternative, CONFIG_DEBUG_INFO_IKCONFIG. This strategy, > which is only available if IKCONFIG is not already built-in, adds a > section ".debug_linux_ikconfig", to the vmlinux ELF. It will be stripped > out of the final images, but will remain in the debuginfo files. So > debuggers which rely on vmlinux debuginfo can have access to the kernel > configuration, without incurring a cost to the kernel at runtime. > > The configuration is enabled whenever DEBUG_INFO=y and IKCONFIG!=y. The > added section is not large compared to debug info sizes. It won't affect > the runtime kernel at all, and this default will ensure that > distributions intending to create useful debuginfo will get this new > addition for kernel debuggers. > > Signed-off-by: Stephen Brennan > --- > include/asm-generic/vmlinux.lds.h | 3 ++- > kernel/Makefile | 2 ++ > kernel/configs-debug.S | 18 ++++++++++++++++++ > lib/Kconfig.debug | 15 +++++++++++++++ > 4 files changed, 37 insertions(+), 1 deletion(-) > create mode 100644 kernel/configs-debug.S For asm-generic: Acked-by: Arnd Bergmann