From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 474A5C32753 for ; Tue, 13 Aug 2019 18:21:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 20B4620843 for ; Tue, 13 Aug 2019 18:21:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565720519; bh=Dl34f7AwP7olgqWclvkI5Nt8ce/2dgPR8Fqz5ci/QjM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=mBdE+4ASsesiKOPMOgwNHA+O/rcc9vH0PQh/s03/jiaTCxj4af70g68B9bvODDb49 hMvgkdD3mk6uqUlORlrBOHjXc5MWSj8dy4+6wlwz05lSLJuWksKGlkIWlSeABKzik3 fbNuugkTFp0VRMahIb2bMHbJ/OJOUyBK98E9oQhQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728592AbfHMSVz (ORCPT ); Tue, 13 Aug 2019 14:21:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:33146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728284AbfHMSVz (ORCPT ); Tue, 13 Aug 2019 14:21:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 18D1620578; Tue, 13 Aug 2019 18:21:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565720513; bh=Dl34f7AwP7olgqWclvkI5Nt8ce/2dgPR8Fqz5ci/QjM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MgmMjKHQ5IxNR5ueegGGB4JR79SBhElL0fzwmVq83V92rDggRVL6Krswzw6GlYtgW Y8ChjTRBhadSgEAdb2Pz8sDDyz1AfLe04PIF/F3ccWIhoCdQlbHwrI3fswdXPPMSom 1XmlYPAW73VsWZ8kEw7P5FfFyuTeAfuSu5/MYRio= Date: Tue, 13 Aug 2019 20:21:51 +0200 From: Greg KH To: Matthias Maennich Cc: linux-kernel@vger.kernel.org, maco@android.com, kernel-team@android.com, arnd@arndb.de, geert@linux-m68k.org, hpa@zytor.com, jeyu@kernel.org, joel@joelfernandes.org, kstewart@linuxfoundation.org, linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-modules@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, lucas.de.marchi@gmail.com, maco@google.com, michal.lkml@markovi.net, mingo@redhat.com, oneukum@suse.com, pombredanne@nexb.com, sam@ravnborg.org, sboyd@codeaurora.org, sspatil@google.com, stern@rowland.harvard.edu, tglx@linutronix.de, usb-storage@lists.one-eyed-alien.net, x86@kernel.org, yamada.masahiro@socionext.com Subject: Re: [PATCH v2 07/10] modpost: add support for generating namespace dependencies Message-ID: <20190813182151.GF2378@kroah.com> References: <20180716122125.175792-1-maco@android.com> <20190813121733.52480-1-maennich@google.com> <20190813121733.52480-8-maennich@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190813121733.52480-8-maennich@google.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: owner-linux-modules@vger.kernel.org Precedence: bulk List-ID: On Tue, Aug 13, 2019 at 01:17:04PM +0100, Matthias Maennich wrote: > This patch adds an option to modpost to generate a .ns_deps file > per module, containing the namespace dependencies for that module. > > E.g. if the linked module my-module.ko would depend on the symbol > myfunc.MY_NS in the namespace MY_NS, the my-module.ns_deps file created > by modpost would contain the entry MY_NS to express the namespace > dependency of my-module imposed by using the symbol myfunc. > > These files can subsequently be used by static analysis tools (like > coccinelle scripts) to address issues with missing namespace imports. A > later patch of this series will introduce such a script 'nsdeps' and a > corresponding make target to automatically add missing > MODULE_IMPORT_NS() definitions to the module's sources. For that it uses > the information provided in the generated .ns_deps files. > > Co-developed-by: Martijn Coenen > Signed-off-by: Martijn Coenen > Signed-off-by: Matthias Maennich > --- > scripts/mod/modpost.c | 61 +++++++++++++++++++++++++++++++++++++++---- > scripts/mod/modpost.h | 2 ++ > 2 files changed, 58 insertions(+), 5 deletions(-) Reviewed-by: Greg Kroah-Hartman