Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp1133244rdb; Wed, 1 Nov 2023 12:13:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBpV0JJFz+DgfRfO9wOq8HEBlicvgS9GgZkx/MlSTrhnkgqkN2L/HT2gJCVfAFoXg8VUK/ X-Received: by 2002:a17:902:ec88:b0:1cc:68c4:8c60 with SMTP id x8-20020a170902ec8800b001cc68c48c60mr5898235plg.18.1698866010005; Wed, 01 Nov 2023 12:13:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698866009; cv=none; d=google.com; s=arc-20160816; b=dlKBeGxtzt2uRlVDqVZiulygGSnwh1ckRAUICuv5WinTRUGwC/EuvXL66HXZ4FkbiA xQi3aEOzmojsOc78BdfbcZoI9qX7gERNm5IxwgEn9XzZ7ehd9n1rhGoL1cI+/6sRxD1L YdRh5wybP+FQ3JQXq3BNlBVDSGCbHxIrdUSEN1JfBaeCvFKSRDsTYHNURmArn7zDrbdM jFzy8+zMMWDQUpFw4bRO6q52FSrj8qixXhqfjhIDQas2MNMzp7sluGkJKe9k3XLv5aKk 8H5m0plraUkimvnyBW5sKdKqn3GCrFi+dlEM4io8OeNJWdkMlxW5ObvB7A2vTx2/pcxn eBCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=aOxi51YH1v/j/EjAwpYLjGYkjIinbzkIxdgV5FAKI4Y=; fh=VKcXtqi34r+hiYwGYkMi7AM+mMddr/8oUoJ1s7shHOI=; b=QyAYW7gsav706RMtGJ2TTm0BegIYNZ46fSZ/y+ypwWiJIIcsD0VUz9pKHD7gGeaUBX 2kC35A28fx6h93dQ1dheYCzRFK7CV1k8lWT0vKDp0OOWfXXO1xZIbYz0bGPcL/MErLYr OYsTh6DeHpQlDmfoF0e2SJTGr6BmUUBkI2SHFz5yYhe5vL2F44c/j/gz95Bd4SuAx2CP N0+BWawR3JxoN5PPQR5EJ+ytvsSKQ6TbR7sL4LxtzSJgGeh2m7gdzUruQOzFQlBQX/pL vMCysWNCTNUFZYObvM5OD89Pqvhoh8kETc7WzMmh9GossishCWSikCm1R63C9Y4PrLmx QEiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=WiEoVg5P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id c12-20020a170902724c00b001ca24970584si3491726pll.572.2023.11.01.12.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 12:13:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=WiEoVg5P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CF84C806E3F1; Wed, 1 Nov 2023 12:13:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344760AbjKATNI (ORCPT + 99 others); Wed, 1 Nov 2023 15:13:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232693AbjKATNG (ORCPT ); Wed, 1 Nov 2023 15:13:06 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D8D9A2; Wed, 1 Nov 2023 12:13:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=aOxi51YH1v/j/EjAwpYLjGYkjIinbzkIxdgV5FAKI4Y=; b=WiEoVg5PNV6trJEHAP57v4vapE HsiW/WaZ1ywph9RexV0ygy2ZNrDMriWecYuLgXXGjhgj5ea8iXbze4mpWGJ8D41YGwCm2AuITpkmA dXf1k2mIT1kA5v98uqJ3rZ0VYbcZFfJTzjrlZCKsim3z0E2GpPRfmfrABWdlLG2y5HR80EX3O1/n/ 0VhCE43Q/f/EotzJFbGu3M1OZX/hiYAQXqB1T41syyxv8F4vOgZpMvjrUm7lnjkULJWdOZhwRlsKO b2L3E61WXB6xLejqKmV28FFWDjsF0fx84eEJCvQZWCJlh/UNFGXs/43jy2bnPjHs6w4Iim08mtZCI ERZ/FrPQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qyGe4-0080C0-0r; Wed, 01 Nov 2023 19:12:52 +0000 Date: Wed, 1 Nov 2023 12:12:52 -0700 From: Luis Chamberlain To: Stephen Brennan Cc: Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-debuggers@vger.kernel.org, Mike Christie , Geert Uytterhoeven , "Christian Brauner (Microsoft)" , Petr Mladek , Marco Elver , Randy Dunlap , Douglas Anderson , Maninder Singh , 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 Message-ID: References: <20231027171756.1241002-1-stephen.s.brennan@oracle.com> <20231027171756.1241002-2-stephen.s.brennan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231027171756.1241002-2-stephen.s.brennan@oracle.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 01 Nov 2023 12:13:19 -0700 (PDT) On Fri, Oct 27, 2023 at 10:17:56AM -0700, 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 Reviewed-by: Luis Chamberlain Although this begs to support something other than old gz in the future. Luis