Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp162813pxm; Wed, 2 Mar 2022 12:32:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDPChd330gHLUu81nvvEFaBweHPTuHG45IgdPIX2IDAMTkexG1TywNVWe5ICdYNK12aD3R X-Received: by 2002:a50:fd97:0:b0:410:c0be:f4c1 with SMTP id o23-20020a50fd97000000b00410c0bef4c1mr30609820edt.313.1646253174842; Wed, 02 Mar 2022 12:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646253174; cv=none; d=google.com; s=arc-20160816; b=NNyC91sCuQFzt6a3mT9Y2jyPM2c6oj0U3l9HpsbnCnzwgTFa7s+jELWKLJx4W+XWB1 N2cRX27aR0SB89Mb1wg/XqNjh0bZK702zNsNSHxWEuWE14gOONR14BV4Zxqt5iQmrUoT w9b1uT8yBzPjr24OHWxBj5lqmAyNNxiiG0zXB6z4F2nTSGk2rSXiJ+hoYcjmqAjjbePo 9cRQ27Rt2y6bwPHyV9a8fWV9daRXfRpTaoNNiuScBJyT+efJTv79h3/L5EVoTfuxtuOi /BceZxOxDj1NBiKiSKyK+yATVLgB4qMljYB9pvl1ImbrpwqyERfzHnXlU3sFr56quXQ1 E0lQ== 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=4lZEInqzBQdxmom04rLGOTBOINe87ZHTNK8A1MHNUYM=; b=tiumxmTD48Iko29qvyNtxIrQaI6Ep4I3m0ikT+0c/N5m1cROIkfuSBBhaBtRezxQq+ GjM4hwin25SHfIr0q8z8YM1JJD9tH81mdhAGdx2cJtMiDPq4+LrzsaT7N33wz27qRq59 +bYgnAusQEdbJtxcDRNLj9wMTncj80MTbYqU7R0ad15ZdjKnyKhunXKw6HTQnTsMJHa2 q6CbeBiUXjuD8jxQ0vI/+utNRBvJdvxzevc35pZxUshh/znxXm4LifTc+LmAvgBNfb7V ah2V9s5AZzJ5F8V+Qjs/wpreH1zav+yghRBkxqqk5yyuoyg+JKIHqDKMZdtc/XgYS5iQ jlzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="zNY/A3Dv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6-20020a056402440600b004129824dd07si28072eda.51.2022.03.02.12.32.27; Wed, 02 Mar 2022 12:32:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="zNY/A3Dv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S240392AbiCBQ1O (ORCPT + 99 others); Wed, 2 Mar 2022 11:27:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241220AbiCBQ1K (ORCPT ); Wed, 2 Mar 2022 11:27:10 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E83FA9E9E6 for ; Wed, 2 Mar 2022 08:26:26 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id ay10so3628615wrb.6 for ; Wed, 02 Mar 2022 08:26:26 -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=4lZEInqzBQdxmom04rLGOTBOINe87ZHTNK8A1MHNUYM=; b=zNY/A3DvXSSHSOLKYTxwjW4mjiSxKTe2DFTa9drWsknJ9Gobo/rAHMhdkBLLnUF8it qObkZaPUtzMcW0vv80UyqbGn/5SqEJm5CWtnqtNf416LbLOH03IHCDcalJaCaNnQqmxa n7JOmOog5D44bHsXOE9UR4UELZJ0fyDRKRw2sg464T2pSOZ/8YSImYpJ3+7w/18AZrm/ QVjeS2JlyxOhcZTWDhqbC0p+x8FcyzIDVLtpp9OSPqij50FzVjYaVMJ8SxAgdZHfT7RG faSL3/PPKB61LMyU9PIhxtaqQqPnmwi8mqwaM9f4L8E7gFTt3Hft0K5TWhEtuzuGZbds unrw== 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=4lZEInqzBQdxmom04rLGOTBOINe87ZHTNK8A1MHNUYM=; b=dvic50vgM3kGDC2TAkQbf2LCK343TQ4Yzc3uusScqWBhjMppZ3O09he1ZTa2KrzzTK buKalzgDLkjGhTmjriYutFoEeUajASx8mT8o01KDMzKPSzJuYHzYWDLCNE6ECbPYIy7I 2yI3oKy0ceAK+Qy0VAItRZ171q1F6yQbH1NbVuIaoH/sjfjiLf2Q9CYuWcECWkdFxS4F VL/eJcS9VNDf1rmsjdlMeKzSK9j3aCdkT9BntVk3wT2evWa6ng1K0HUOe2VR8W8sDFpC b+ZrwTgamAo+dsOGDTF9trUaVgIk2Pun06IBF3DaNL0mMugwaFG1eOHp8Jcyr5EgaKo4 dy4A== X-Gm-Message-State: AOAM5330UsDwhUbJOH9Am/vW7plzuXRgo+2qMl3dkhSqoA19VShCrKq5 TFgOZ7FPcJ9dpL5mKY/WQ4NtKw== X-Received: by 2002:a5d:52d2:0:b0:1ef:e22d:18ba with SMTP id r18-20020a5d52d2000000b001efe22d18bamr10036216wrv.30.1646238385454; Wed, 02 Mar 2022 08:26:25 -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 g22-20020a1c4e16000000b003817614d4adsm6068399wmh.12.2022.03.02.08.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 08:26:24 -0800 (PST) Date: Wed, 2 Mar 2022 16:26:22 +0000 From: Daniel Thompson To: Aaron Tomlin Cc: mcgrof@kernel.org, christophe.leroy@csgroup.eu, pmladek@suse.com, cl@linux.com, mbenes@suse.cz, akpm@linux-foundation.org, jeyu@kernel.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, void@manifault.com, atomlin@atomlin.com, allen.lkml@gmail.com, joe@perches.com, msuchanek@suse.de, oleksandr@natalenko.name, jason.wessel@windriver.com Subject: Re: [PATCH v9 13/14] module: Move kdb_modules list out of core code Message-ID: <20220302162622.z5wxbdmxh2pqh6cb@maple.lan> References: <20220228234322.2073104-1-atomlin@redhat.com> <20220228234322.2073104-14-atomlin@redhat.com> <20220302161917.gx5icfszakoye4uh@maple.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220302161917.gx5icfszakoye4uh@maple.lan> 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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Wed, Mar 02, 2022 at 04:19:17PM +0000, Daniel Thompson wrote: > On Mon, Feb 28, 2022 at 11:43:21PM +0000, Aaron Tomlin wrote: > > No functional change. > > > > This patch migrates kdb_modules list to core kdb code > > since the list of added/or loaded modules is no longer > > private. > > > > Reviewed-by: Christophe Leroy > > Signed-off-by: Aaron Tomlin > > --- > > kernel/debug/kdb/kdb_main.c | 5 +++++ > > kernel/debug/kdb/kdb_private.h | 4 ---- > > kernel/module/main.c | 4 ---- > > 3 files changed, 5 insertions(+), 8 deletions(-) > > > > diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c > > index 0852a537dad4..5369bf45c5d4 100644 > > --- a/kernel/debug/kdb/kdb_main.c > > +++ b/kernel/debug/kdb/kdb_main.c > > @@ -59,6 +59,11 @@ EXPORT_SYMBOL(kdb_grepping_flag); > > int kdb_grep_leading; > > int kdb_grep_trailing; > > > > +#ifdef CONFIG_MODULES > > +extern struct list_head modules; Actually thinking a bit harder and trying `git grep '#include .*[.][.]' kernel/` (which finds some prior art) I wonder if we even want the extern or whether `#include "../../module/internal.h"` would be more robust. Daniel. > > +static struct list_head *kdb_modules = &modules; /* kdb needs the list of modules */ > > If modules is no longer static then why do we kdb_modules at all? > kdb_modules is used exactly once and it can now simply be replaced > with &modules. > > > Daniel.