From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Maennich Subject: [PATCH v3 00/11] Symbol Namespaces Date: Wed, 21 Aug 2019 12:49:15 +0100 Message-ID: <20190821114955.12788-1-maennich@google.com> References: <20190813121733.52480-1-maennich@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190813121733.52480-1-maennich-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: kstewart-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, oneukum-IBi9RG/b67k@public.gmane.org, linux-stm32-XDFAJ8BFU24N7RejjzZ/Li2xQDfSxrLKVpNB7YpNyf8@public.gmane.org, linux-aspeed-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, usb-storage-ijkIwGHArpdIPJnuZ7Njw4oP9KaGy4wf@public.gmane.org, Toru Komatsu , Mauro Carvalho Chehab , David Howells , yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org, Will Deacon , patches-yzvPICuk2AA4QjBA90+/kJqQE7yCjDx5@public.gmane.org, Michael Ellerman , hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org, joel-QYYGw3jwrUn5owFQY34kdNi2O/JbrIOy@public.gmane.org, bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org, cocci-/FJkirnvOdkvYVN+rsErww@public.gmane.org, linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Benjamin Fair , linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Fabio Estevam , openbmc-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, lucas.de.marchi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Nancy Yuen , mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org, NXP Linux Team , Johannes List-Id: linux-tegra@vger.kernel.org As of Linux 5.3-rc5, there are 31205 [1] exported symbols in the kernel. That is a growth of roughly 1000 symbols since 4.17 (30206 [2]). There seems to be some consensus amongst kernel devs that the export surface is too large, and hard to reason about. Generally, these symbols fall in one of these categories: 1) Symbols actually meant for drivers 2) Symbols that are only exported because functionality is split over multiple modules, yet they really shouldn't be used by modules outside of their own subsystem 3) Symbols really only meant for in-tree use When module developers try to upstream their code, it regularly turns out that they are using exported symbols that they really shouldn't be using. This problem is even bigger for drivers that are currently out-of-tree, which may be using many symbols that they shouldn't be using, and that break when those symbols are removed or modified. This patch allows subsystem maintainers to partition their exported symbols into separate namespaces, and module authors to import such namespaces only when needed. This allows subsystem maintainers to more easily limit availability of these namespaced symbols to other parts of the kernel. It can also be used to partition the set of exported symbols for documentation purposes; for example, a set of symbols that is really only used for debugging could be in a "SUBSYSTEM_DEBUG" namespace. I continued the work mainly done by Martijn Coenen. Changes in v2: - Rather than adding and evaluating separate sections __knsimport_NS, use modinfo tags to declare the namespaces a module introduces. Adjust modpost and the module loader accordingly. - Also add support for reading multiple modinfo values for the same tag to allow list-like access to modinfo tags. - The macros in export.h have been cleaned up to avoid redundancy in the macro parameters (ns, nspost, nspost2). - The introduction of relative references in the ksymtab entries caused a rework of the macros to accommodate that configuration as well. - Alignment of kernel_symbol in the ksymtab needed to be fixed to allow growing the kernel_symbol struct. - Modpost does now also append the namespace suffix to the symbol entries in Module.symvers. - The configuration option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS allows relaxing the enforcement of properly declared namespace imports at module loading time. - Symbols can be collectively exported into a namespace by defining DEFAULT_SYMBOL_NAMESPACE in the corresponding Makefile. - The requirement for a very recent coccinelle spatch has been lifted by simplifying the script. - nsdeps does now ensures MODULE_IMPORT_NS statements are sorted when patching the module source files. - Some minor bugs have been addressed in nsdeps to allow it to work with modules that have more than one source file. - The RFC for the usb-storage symbols has been simplified by using DEFAULT_SYMBOL_NAMESPACE=USB_STORAGE rather than explicitly exporting each and every symbol into that new namespace. Changes in v3: - Reword the documentation for the MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS option for clarification. - Fix printed required version of spatch in coccinelle script. - Adopt kbuild changes for modpost: .mod files are no longer generated in .tmp_versions. Similarely, generate the .ns_deps files in the tree along with the .mod files. Also, nsdeps now uses modules.order as source for the list modules to consider. - Add an RFC patch to introduce the namespace WATCHDOG_CORE for symbols exported in watchdog_core.c. This patch series was developed against Linus' master (15d90b242290). [1] git grep "^EXPORT_SYMBOL\w*(" v5.3-rc5 | wc -l [2] git grep "^EXPORT_SYMBOL\w*(" v4.17 | wc -l Matthias Maennich (11): module: support reading multiple values per modinfo tag export: explicitly align struct kernel_symbol module: add support for symbol namespaces. modpost: add support for symbol namespaces module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS export: allow definition default namespaces in Makefiles or sources modpost: add support for generating namespace dependencies scripts: Coccinelle script for namespace dependencies. usb-storage: remove single-use define for debugging RFC: usb-storage: export symbols in USB_STORAGE namespace RFC: watchdog: export core symbols in WATCHDOG_CORE namespace .gitignore | 1 + MAINTAINERS | 5 + Makefile | 14 +- arch/m68k/include/asm/export.h | 1 - drivers/hwmon/ftsteutates.c | 1 + drivers/hwmon/sch56xx-common.c | 1 + drivers/rtc/rtc-abx80x.c | 1 + drivers/usb/storage/Makefile | 2 + drivers/usb/storage/alauda.c | 1 + drivers/usb/storage/cypress_atacb.c | 1 + drivers/usb/storage/datafab.c | 1 + drivers/usb/storage/debug.h | 2 - drivers/usb/storage/ene_ub6250.c | 1 + drivers/usb/storage/freecom.c | 1 + drivers/usb/storage/isd200.c | 1 + drivers/usb/storage/jumpshot.c | 1 + drivers/usb/storage/karma.c | 1 + drivers/usb/storage/onetouch.c | 1 + drivers/usb/storage/realtek_cr.c | 1 + drivers/usb/storage/scsiglue.c | 2 +- drivers/usb/storage/sddr09.c | 1 + drivers/usb/storage/sddr55.c | 1 + drivers/usb/storage/shuttle_usbat.c | 1 + drivers/usb/storage/uas.c | 1 + drivers/watchdog/armada_37xx_wdt.c | 1 + drivers/watchdog/asm9260_wdt.c | 1 + drivers/watchdog/aspeed_wdt.c | 1 + drivers/watchdog/at91sam9_wdt.c | 1 + drivers/watchdog/atlas7_wdt.c | 1 + drivers/watchdog/bcm2835_wdt.c | 1 + drivers/watchdog/bcm47xx_wdt.c | 1 + drivers/watchdog/bcm7038_wdt.c | 1 + drivers/watchdog/bcm_kona_wdt.c | 1 + drivers/watchdog/bd70528_wdt.c | 1 + drivers/watchdog/cadence_wdt.c | 1 + drivers/watchdog/da9052_wdt.c | 1 + drivers/watchdog/da9055_wdt.c | 1 + drivers/watchdog/da9062_wdt.c | 1 + drivers/watchdog/da9063_wdt.c | 1 + drivers/watchdog/davinci_wdt.c | 1 + drivers/watchdog/digicolor_wdt.c | 1 + drivers/watchdog/dw_wdt.c | 1 + drivers/watchdog/ebc-c384_wdt.c | 1 + drivers/watchdog/ep93xx_wdt.c | 1 + drivers/watchdog/ftwdt010_wdt.c | 1 + drivers/watchdog/gpio_wdt.c | 1 + drivers/watchdog/hpwdt.c | 1 + drivers/watchdog/i6300esb.c | 1 + drivers/watchdog/iTCO_wdt.c | 1 + drivers/watchdog/ie6xx_wdt.c | 1 + drivers/watchdog/imgpdc_wdt.c | 1 + drivers/watchdog/imx2_wdt.c | 1 + drivers/watchdog/intel-mid_wdt.c | 1 + drivers/watchdog/it87_wdt.c | 1 + drivers/watchdog/kempld_wdt.c | 1 + drivers/watchdog/lpc18xx_wdt.c | 1 + drivers/watchdog/max63xx_wdt.c | 1 + drivers/watchdog/max77620_wdt.c | 1 + drivers/watchdog/mei_wdt.c | 1 + drivers/watchdog/mena21_wdt.c | 1 + drivers/watchdog/menf21bmc_wdt.c | 1 + drivers/watchdog/menz69_wdt.c | 1 + drivers/watchdog/meson_gxbb_wdt.c | 1 + drivers/watchdog/meson_wdt.c | 1 + drivers/watchdog/mlx_wdt.c | 1 + drivers/watchdog/moxart_wdt.c | 1 + drivers/watchdog/mtk_wdt.c | 1 + drivers/watchdog/ni903x_wdt.c | 1 + drivers/watchdog/nic7018_wdt.c | 1 + drivers/watchdog/npcm_wdt.c | 1 + drivers/watchdog/of_xilinx_wdt.c | 1 + drivers/watchdog/omap_wdt.c | 1 + drivers/watchdog/pm8916_wdt.c | 1 + drivers/watchdog/qcom-wdt.c | 1 + drivers/watchdog/rave-sp-wdt.c | 1 + drivers/watchdog/renesas_wdt.c | 1 + drivers/watchdog/retu_wdt.c | 1 + drivers/watchdog/rn5t618_wdt.c | 1 + drivers/watchdog/rza_wdt.c | 1 + drivers/watchdog/s3c2410_wdt.c | 1 + drivers/watchdog/sama5d4_wdt.c | 1 + drivers/watchdog/sirfsoc_wdt.c | 1 + drivers/watchdog/softdog.c | 1 + drivers/watchdog/sp5100_tco.c | 1 + drivers/watchdog/sprd_wdt.c | 1 + drivers/watchdog/st_lpc_wdt.c | 1 + drivers/watchdog/stmp3xxx_rtc_wdt.c | 1 + drivers/watchdog/stpmic1_wdt.c | 1 + drivers/watchdog/sunxi_wdt.c | 1 + drivers/watchdog/tangox_wdt.c | 1 + drivers/watchdog/tegra_wdt.c | 1 + drivers/watchdog/tqmx86_wdt.c | 1 + drivers/watchdog/ts4800_wdt.c | 1 + drivers/watchdog/ts72xx_wdt.c | 1 + drivers/watchdog/twl4030_wdt.c | 1 + drivers/watchdog/uniphier_wdt.c | 1 + drivers/watchdog/via_wdt.c | 1 + drivers/watchdog/w83627hf_wdt.c | 1 + drivers/watchdog/watchdog_core.c | 10 +- drivers/watchdog/wdat_wdt.c | 1 + drivers/watchdog/wm831x_wdt.c | 1 + drivers/watchdog/wm8350_wdt.c | 1 + drivers/watchdog/xen_wdt.c | 1 + drivers/watchdog/ziirave_wdt.c | 1 + include/asm-generic/export.h | 14 +- include/linux/export.h | 92 +++++++++++-- include/linux/module.h | 2 + init/Kconfig | 13 ++ kernel/module.c | 67 +++++++++- scripts/Makefile.modpost | 4 +- scripts/coccinelle/misc/add_namespace.cocci | 23 ++++ scripts/mod/modpost.c | 137 ++++++++++++++++++-- scripts/mod/modpost.h | 9 ++ scripts/nsdeps | 56 ++++++++ 114 files changed, 504 insertions(+), 46 deletions(-) create mode 100644 scripts/coccinelle/misc/add_namespace.cocci create mode 100644 scripts/nsdeps -- 2.23.0.rc1.153.gdeed80330f-goog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <33DBdXQgKB6MPDHQQLFKJRRJOH.FRPRSHQEPFOLVWV.RcODEV.RUJ@flex--maennich.bounces.google.com> Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=flex--maennich.bounces.google.com (client-ip=2607:f8b0:4864:20::e4a; helo=mail-vs1-xe4a.google.com; envelope-from=33dbdxqgkb6mpdhqqlfkjrrjoh.frprshqepfolvwv.rcodev.ruj@flex--maennich.bounces.google.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="aFsPSold"; dkim-atps=neutral Received: from mail-vs1-xe4a.google.com (mail-vs1-xe4a.google.com [IPv6:2607:f8b0:4864:20::e4a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46D5fw1fKGzDqC0 for ; Wed, 21 Aug 2019 21:54:08 +1000 (AEST) Received: by mail-vs1-xe4a.google.com with SMTP id t76so620113vst.16 for ; Wed, 21 Aug 2019 04:54:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=dbeW0AhXXR+v+YpCW2kANc+N3K5c0SZUYgqqbrZZvE4=; b=aFsPSoldM0Bd3aP9qJf30Ez9RAxoobocKtreV6qZLpZt8GkW7vl5cqWuJrbWh976Yb O6PJiYAMkAVxNpXHI4U394FvT0flIvSg+jsiI7gtohdkD4B6wlBMzDmUcAHTPDgXSYn0 XNELYY9SOwcG2+YLsILGLD72LxV62fTC3S2cEs6KtuTBjsa3i6n6N5uxjKvV0MwRSz6V RA6jA3/uX5YE3XaHxektIv6xLOwNvbtx5jCPbkW6UZFn0RUB/19f1mkieVvh9lJfx/uh GTw8bLjusCSmCyuEUFWe99eIkgh0CfPTuSyKXKPwxKWjvT7+jE7jXHWOaEgwgtxCUe1d 8rlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=dbeW0AhXXR+v+YpCW2kANc+N3K5c0SZUYgqqbrZZvE4=; b=CCrFQjmjGBeHCyZLz+rmDB35j+0/KN8+jGUO6xTYk//7JnlAXaxeMUVMsb7cpBVoMw dd3RbeICsXQaqR+TqyL7EgQqw+4aiLq4mE82MR7GmGpjZ3TofJvU2JEzWBTXFDi0WqGi 6BzpHBvqikAFCZkSCUMCRpih/0L2eEEkIwCX9P+IVMJw4iBNkIYZ1vywaYQzziHAYxiF WIhRLu7oBv/RCN3tYT4x8UH6fXRHjI+BGOpghgMV192FgQX8ciJUgQYoA5LMgY2PR3tJ Rflu52tlCINC7v7J+FV2ZLAl+7kSVgaxhPHwSirlRGg7LFZ//GvEr2i2jVwofjYHUiI7 hi/w== X-Gm-Message-State: APjAAAUG524Zvba2PognOpBweqg3uR6VCDZmOsi1XrGRl4JTyXYsnOh0 AcjI2X6uwd9uGBLEG8tf44wkQn1ZUlkJJQ== X-Google-Smtp-Source: APXvYqzEhKafXMjJoeTZyC7zvtkDGEgBz64AYQQy+0Uw+lMBm7os5APWm8dgDVK460ybb2au7ed1CCFcEK0k1Q== X-Received: by 2002:a1f:3887:: with SMTP id f129mr12005868vka.15.1566388444681; Wed, 21 Aug 2019 04:54:04 -0700 (PDT) Date: Wed, 21 Aug 2019 12:49:15 +0100 In-Reply-To: <20190813121733.52480-1-maennich@google.com> Message-Id: <20190821114955.12788-1-maennich@google.com> Mime-Version: 1.0 References: <20190813121733.52480-1-maennich@google.com> X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog Subject: [PATCH v3 00/11] Symbol Namespaces From: Matthias Maennich To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, arnd@arndb.de, geert@linux-m68k.org, gregkh@linuxfoundation.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@android.com, maco@google.com, michal.lkml@markovi.net, mingo@redhat.com, oneukum@suse.com, pombredanne@nexb.com, sam@ravnborg.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, Adrian Reber , Alexey Gladkov , Andrew Jeffery , Andrew Morton , Ard Biesheuvel , bcm-kernel-feedback-list@broadcom.com, Benjamin Fair , cocci@systeme.lip6.fr, Dan Williams , David Howells , "David S. Miller" , Fabio Estevam , Gleb Fotengauer-Malinovskiy , Ingo Molnar , Jani Nikula , Johannes Weiner , Julia Lawall , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-hwmon@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-rtc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-tegra@vger.kernel.org, linux-watchdog@vger.kernel.org, Mauro Carvalho Chehab , Michael Ellerman , Nancy Yuen , Nicolas Ferre , Nicolas Pitre , NXP Linux Team , openbmc@lists.ozlabs.org, patches@opensource.cirrus.com, Patrick Bellasi , Patrick Venture , Pengutronix Kernel Team , Richard Guy Briggs , Tejun Heo , Toru Komatsu , Will Deacon Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Mon, 02 Sep 2019 10:34:52 +1000 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2019 11:54:17 -0000 As of Linux 5.3-rc5, there are 31205 [1] exported symbols in the kernel. That is a growth of roughly 1000 symbols since 4.17 (30206 [2]). There seems to be some consensus amongst kernel devs that the export surface is too large, and hard to reason about. Generally, these symbols fall in one of these categories: 1) Symbols actually meant for drivers 2) Symbols that are only exported because functionality is split over multiple modules, yet they really shouldn't be used by modules outside of their own subsystem 3) Symbols really only meant for in-tree use When module developers try to upstream their code, it regularly turns out that they are using exported symbols that they really shouldn't be using. This problem is even bigger for drivers that are currently out-of-tree, which may be using many symbols that they shouldn't be using, and that break when those symbols are removed or modified. This patch allows subsystem maintainers to partition their exported symbols into separate namespaces, and module authors to import such namespaces only when needed. This allows subsystem maintainers to more easily limit availability of these namespaced symbols to other parts of the kernel. It can also be used to partition the set of exported symbols for documentation purposes; for example, a set of symbols that is really only used for debugging could be in a "SUBSYSTEM_DEBUG" namespace. I continued the work mainly done by Martijn Coenen. Changes in v2: - Rather than adding and evaluating separate sections __knsimport_NS, use modinfo tags to declare the namespaces a module introduces. Adjust modpost and the module loader accordingly. - Also add support for reading multiple modinfo values for the same tag to allow list-like access to modinfo tags. - The macros in export.h have been cleaned up to avoid redundancy in the macro parameters (ns, nspost, nspost2). - The introduction of relative references in the ksymtab entries caused a rework of the macros to accommodate that configuration as well. - Alignment of kernel_symbol in the ksymtab needed to be fixed to allow growing the kernel_symbol struct. - Modpost does now also append the namespace suffix to the symbol entries in Module.symvers. - The configuration option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS allows relaxing the enforcement of properly declared namespace imports at module loading time. - Symbols can be collectively exported into a namespace by defining DEFAULT_SYMBOL_NAMESPACE in the corresponding Makefile. - The requirement for a very recent coccinelle spatch has been lifted by simplifying the script. - nsdeps does now ensures MODULE_IMPORT_NS statements are sorted when patching the module source files. - Some minor bugs have been addressed in nsdeps to allow it to work with modules that have more than one source file. - The RFC for the usb-storage symbols has been simplified by using DEFAULT_SYMBOL_NAMESPACE=USB_STORAGE rather than explicitly exporting each and every symbol into that new namespace. Changes in v3: - Reword the documentation for the MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS option for clarification. - Fix printed required version of spatch in coccinelle script. - Adopt kbuild changes for modpost: .mod files are no longer generated in .tmp_versions. Similarely, generate the .ns_deps files in the tree along with the .mod files. Also, nsdeps now uses modules.order as source for the list modules to consider. - Add an RFC patch to introduce the namespace WATCHDOG_CORE for symbols exported in watchdog_core.c. This patch series was developed against Linus' master (15d90b242290). [1] git grep "^EXPORT_SYMBOL\w*(" v5.3-rc5 | wc -l [2] git grep "^EXPORT_SYMBOL\w*(" v4.17 | wc -l Matthias Maennich (11): module: support reading multiple values per modinfo tag export: explicitly align struct kernel_symbol module: add support for symbol namespaces. modpost: add support for symbol namespaces module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS export: allow definition default namespaces in Makefiles or sources modpost: add support for generating namespace dependencies scripts: Coccinelle script for namespace dependencies. usb-storage: remove single-use define for debugging RFC: usb-storage: export symbols in USB_STORAGE namespace RFC: watchdog: export core symbols in WATCHDOG_CORE namespace .gitignore | 1 + MAINTAINERS | 5 + Makefile | 14 +- arch/m68k/include/asm/export.h | 1 - drivers/hwmon/ftsteutates.c | 1 + drivers/hwmon/sch56xx-common.c | 1 + drivers/rtc/rtc-abx80x.c | 1 + drivers/usb/storage/Makefile | 2 + drivers/usb/storage/alauda.c | 1 + drivers/usb/storage/cypress_atacb.c | 1 + drivers/usb/storage/datafab.c | 1 + drivers/usb/storage/debug.h | 2 - drivers/usb/storage/ene_ub6250.c | 1 + drivers/usb/storage/freecom.c | 1 + drivers/usb/storage/isd200.c | 1 + drivers/usb/storage/jumpshot.c | 1 + drivers/usb/storage/karma.c | 1 + drivers/usb/storage/onetouch.c | 1 + drivers/usb/storage/realtek_cr.c | 1 + drivers/usb/storage/scsiglue.c | 2 +- drivers/usb/storage/sddr09.c | 1 + drivers/usb/storage/sddr55.c | 1 + drivers/usb/storage/shuttle_usbat.c | 1 + drivers/usb/storage/uas.c | 1 + drivers/watchdog/armada_37xx_wdt.c | 1 + drivers/watchdog/asm9260_wdt.c | 1 + drivers/watchdog/aspeed_wdt.c | 1 + drivers/watchdog/at91sam9_wdt.c | 1 + drivers/watchdog/atlas7_wdt.c | 1 + drivers/watchdog/bcm2835_wdt.c | 1 + drivers/watchdog/bcm47xx_wdt.c | 1 + drivers/watchdog/bcm7038_wdt.c | 1 + drivers/watchdog/bcm_kona_wdt.c | 1 + drivers/watchdog/bd70528_wdt.c | 1 + drivers/watchdog/cadence_wdt.c | 1 + drivers/watchdog/da9052_wdt.c | 1 + drivers/watchdog/da9055_wdt.c | 1 + drivers/watchdog/da9062_wdt.c | 1 + drivers/watchdog/da9063_wdt.c | 1 + drivers/watchdog/davinci_wdt.c | 1 + drivers/watchdog/digicolor_wdt.c | 1 + drivers/watchdog/dw_wdt.c | 1 + drivers/watchdog/ebc-c384_wdt.c | 1 + drivers/watchdog/ep93xx_wdt.c | 1 + drivers/watchdog/ftwdt010_wdt.c | 1 + drivers/watchdog/gpio_wdt.c | 1 + drivers/watchdog/hpwdt.c | 1 + drivers/watchdog/i6300esb.c | 1 + drivers/watchdog/iTCO_wdt.c | 1 + drivers/watchdog/ie6xx_wdt.c | 1 + drivers/watchdog/imgpdc_wdt.c | 1 + drivers/watchdog/imx2_wdt.c | 1 + drivers/watchdog/intel-mid_wdt.c | 1 + drivers/watchdog/it87_wdt.c | 1 + drivers/watchdog/kempld_wdt.c | 1 + drivers/watchdog/lpc18xx_wdt.c | 1 + drivers/watchdog/max63xx_wdt.c | 1 + drivers/watchdog/max77620_wdt.c | 1 + drivers/watchdog/mei_wdt.c | 1 + drivers/watchdog/mena21_wdt.c | 1 + drivers/watchdog/menf21bmc_wdt.c | 1 + drivers/watchdog/menz69_wdt.c | 1 + drivers/watchdog/meson_gxbb_wdt.c | 1 + drivers/watchdog/meson_wdt.c | 1 + drivers/watchdog/mlx_wdt.c | 1 + drivers/watchdog/moxart_wdt.c | 1 + drivers/watchdog/mtk_wdt.c | 1 + drivers/watchdog/ni903x_wdt.c | 1 + drivers/watchdog/nic7018_wdt.c | 1 + drivers/watchdog/npcm_wdt.c | 1 + drivers/watchdog/of_xilinx_wdt.c | 1 + drivers/watchdog/omap_wdt.c | 1 + drivers/watchdog/pm8916_wdt.c | 1 + drivers/watchdog/qcom-wdt.c | 1 + drivers/watchdog/rave-sp-wdt.c | 1 + drivers/watchdog/renesas_wdt.c | 1 + drivers/watchdog/retu_wdt.c | 1 + drivers/watchdog/rn5t618_wdt.c | 1 + drivers/watchdog/rza_wdt.c | 1 + drivers/watchdog/s3c2410_wdt.c | 1 + drivers/watchdog/sama5d4_wdt.c | 1 + drivers/watchdog/sirfsoc_wdt.c | 1 + drivers/watchdog/softdog.c | 1 + drivers/watchdog/sp5100_tco.c | 1 + drivers/watchdog/sprd_wdt.c | 1 + drivers/watchdog/st_lpc_wdt.c | 1 + drivers/watchdog/stmp3xxx_rtc_wdt.c | 1 + drivers/watchdog/stpmic1_wdt.c | 1 + drivers/watchdog/sunxi_wdt.c | 1 + drivers/watchdog/tangox_wdt.c | 1 + drivers/watchdog/tegra_wdt.c | 1 + drivers/watchdog/tqmx86_wdt.c | 1 + drivers/watchdog/ts4800_wdt.c | 1 + drivers/watchdog/ts72xx_wdt.c | 1 + drivers/watchdog/twl4030_wdt.c | 1 + drivers/watchdog/uniphier_wdt.c | 1 + drivers/watchdog/via_wdt.c | 1 + drivers/watchdog/w83627hf_wdt.c | 1 + drivers/watchdog/watchdog_core.c | 10 +- drivers/watchdog/wdat_wdt.c | 1 + drivers/watchdog/wm831x_wdt.c | 1 + drivers/watchdog/wm8350_wdt.c | 1 + drivers/watchdog/xen_wdt.c | 1 + drivers/watchdog/ziirave_wdt.c | 1 + include/asm-generic/export.h | 14 +- include/linux/export.h | 92 +++++++++++-- include/linux/module.h | 2 + init/Kconfig | 13 ++ kernel/module.c | 67 +++++++++- scripts/Makefile.modpost | 4 +- scripts/coccinelle/misc/add_namespace.cocci | 23 ++++ scripts/mod/modpost.c | 137 ++++++++++++++++++-- scripts/mod/modpost.h | 9 ++ scripts/nsdeps | 56 ++++++++ 114 files changed, 504 insertions(+), 46 deletions(-) create mode 100644 scripts/coccinelle/misc/add_namespace.cocci create mode 100644 scripts/nsdeps -- 2.23.0.rc1.153.gdeed80330f-goog 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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 CB209C3A59E for ; Wed, 21 Aug 2019 11:54:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9CBBB2339F for ; Wed, 21 Aug 2019 11:54:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mnS37gfh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="aFsPSold" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CBBB2339F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4D8tgqmtgWLe8/YC3k8o7k/b9Q+30VIn4hNA8LRPzw8=; b=mnS37gfhk3cJM6 NQTarzEpNfUKMvRXQ5Z413qyOGEWvxuzafcU8LLATxvopwBurztsORVs3ejAWMaJvCuoIhV2SaAEw yf6Oeu70oi64Fl4l7WK70Tj7bf1poNPWQorSswremSuko7o+BmgSjO7anZB6FEIZrvmkPMfDMSKYE 1JLseS+UcYYYl6NOTVs0qpumEcbINLRuJVkWEkwn8NFOET/4//8ImQ1zDnvxkrsmhCPR/i3uh2Lnq wh+wNgxfGQU+AfJIDiAALw126TnFmnXk97+vkRORhYUys12wKAsnM6JH2du7u+z84YpirqJdcvCJK iz6oLAkZqKWk2CbjjIVQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i0PBw-0006dy-6S; Wed, 21 Aug 2019 11:54:17 +0000 Received: from mail-vs1-xe49.google.com ([2607:f8b0:4864:20::e49]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i0PBn-0006Zd-Bl for linux-amlogic@lists.infradead.org; Wed, 21 Aug 2019 11:54:10 +0000 Received: by mail-vs1-xe49.google.com with SMTP id w2so620381vso.19 for ; Wed, 21 Aug 2019 04:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=dbeW0AhXXR+v+YpCW2kANc+N3K5c0SZUYgqqbrZZvE4=; b=aFsPSoldM0Bd3aP9qJf30Ez9RAxoobocKtreV6qZLpZt8GkW7vl5cqWuJrbWh976Yb O6PJiYAMkAVxNpXHI4U394FvT0flIvSg+jsiI7gtohdkD4B6wlBMzDmUcAHTPDgXSYn0 XNELYY9SOwcG2+YLsILGLD72LxV62fTC3S2cEs6KtuTBjsa3i6n6N5uxjKvV0MwRSz6V RA6jA3/uX5YE3XaHxektIv6xLOwNvbtx5jCPbkW6UZFn0RUB/19f1mkieVvh9lJfx/uh GTw8bLjusCSmCyuEUFWe99eIkgh0CfPTuSyKXKPwxKWjvT7+jE7jXHWOaEgwgtxCUe1d 8rlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=dbeW0AhXXR+v+YpCW2kANc+N3K5c0SZUYgqqbrZZvE4=; b=KO3lLmth5k0LQRzpiUOP9H8x9Dr4KmOx2/A+TEfoESEhNbU5gzHEdRnhmBMr3CHcmt GJo7Fr08dBoXFd4hCvtlrUxNVC6+Y0MajKR9jt83tE+3YSRBchDdyrBYMV+0lUjyGoCn ed5+dJstZGx/SHEpOsDcKGu8dvWTcLWDph4SFvtJrVOtFT4wkPadQJ6UnoyqhiXSHaZI SryFIkP5gkdRFPGwaGi1o7iGjbo4OHFTXDhTa+UccLO567OavVAXpQO1YUigkvoWYPPW PHskBc8lDfVYMsai6WiuG5eDxDm9TemgsW1x+OcMPwbUNz8WVxyteiRWeFW+IJcY/Kp1 5p1Q== X-Gm-Message-State: APjAAAW98dRpuStf08QODTLBHPWn5HoXeVOrjkhyfMy7nwQNDywEA1D4 Z/knF8//gAddFG5AvVeYgrxKFzbN+tYTiw== X-Google-Smtp-Source: APXvYqzEhKafXMjJoeTZyC7zvtkDGEgBz64AYQQy+0Uw+lMBm7os5APWm8dgDVK460ybb2au7ed1CCFcEK0k1Q== X-Received: by 2002:a1f:3887:: with SMTP id f129mr12005868vka.15.1566388444681; Wed, 21 Aug 2019 04:54:04 -0700 (PDT) Date: Wed, 21 Aug 2019 12:49:15 +0100 In-Reply-To: <20190813121733.52480-1-maennich@google.com> Message-Id: <20190821114955.12788-1-maennich@google.com> Mime-Version: 1.0 References: <20190813121733.52480-1-maennich@google.com> X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog Subject: [PATCH v3 00/11] Symbol Namespaces From: Matthias Maennich To: linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190821_045407_563023_2C71F795 X-CRM114-Status: GOOD ( 20.00 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kstewart@linuxfoundation.org, oneukum@suse.com, linux-stm32@st-md-mailman.stormreply.com, linux-aspeed@lists.ozlabs.org, usb-storage@lists.one-eyed-alien.net, Toru Komatsu , Mauro Carvalho Chehab , David Howells , yamada.masahiro@socionext.com, Will Deacon , patches@opensource.cirrus.com, Michael Ellerman , hpa@zytor.com, joel@joelfernandes.org, bcm-kernel-feedback-list@broadcom.com, sam@ravnborg.org, cocci@systeme.lip6.fr, linux-arch@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Benjamin Fair , linux-scsi@vger.kernel.org, Fabio Estevam , openbmc@lists.ozlabs.org, x86@kernel.org, lucas.de.marchi@gmail.com, Nancy Yuen , mingo@redhat.com, geert@linux-m68k.org, NXP Linux Team , Johannes Weiner , Patrick Venture , stern@rowland.harvard.edu, kernel-team@android.com, Dan Williams , Ingo Molnar , linux-rtc@vger.kernel.org, Gleb Fotengauer-Malinovskiy , sspatil@google.com, linux-watchdog@vger.kernel.org, arnd@arndb.de, linux-kbuild@vger.kernel.org, Jani Nikula , linux-arm-msm@vger.kernel.org, jeyu@kernel.org, maennich@google.com, Julia Lawall , linux-m68k@lists.linux-m68k.org, linux-mediatek@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, tglx@linutronix.de, maco@android.com, linux-arm-kernel@lists.infradead.org, Adrian Reber , linux-hwmon@vger.kernel.org, michal.lkml@markovi.net, Ard Biesheuvel , Andrew Jeffery , gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, Alexey Gladkov , Nicolas Ferre , Nicolas Pitre , Patrick Bellasi , Richard Guy Briggs , maco@google.com, Pengutronix Kernel Team , pombredanne@nexb.com, Tejun Heo , Andrew Morton , "David S. Miller" , linux-modules@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org As of Linux 5.3-rc5, there are 31205 [1] exported symbols in the kernel. That is a growth of roughly 1000 symbols since 4.17 (30206 [2]). There seems to be some consensus amongst kernel devs that the export surface is too large, and hard to reason about. Generally, these symbols fall in one of these categories: 1) Symbols actually meant for drivers 2) Symbols that are only exported because functionality is split over multiple modules, yet they really shouldn't be used by modules outside of their own subsystem 3) Symbols really only meant for in-tree use When module developers try to upstream their code, it regularly turns out that they are using exported symbols that they really shouldn't be using. This problem is even bigger for drivers that are currently out-of-tree, which may be using many symbols that they shouldn't be using, and that break when those symbols are removed or modified. This patch allows subsystem maintainers to partition their exported symbols into separate namespaces, and module authors to import such namespaces only when needed. This allows subsystem maintainers to more easily limit availability of these namespaced symbols to other parts of the kernel. It can also be used to partition the set of exported symbols for documentation purposes; for example, a set of symbols that is really only used for debugging could be in a "SUBSYSTEM_DEBUG" namespace. I continued the work mainly done by Martijn Coenen. Changes in v2: - Rather than adding and evaluating separate sections __knsimport_NS, use modinfo tags to declare the namespaces a module introduces. Adjust modpost and the module loader accordingly. - Also add support for reading multiple modinfo values for the same tag to allow list-like access to modinfo tags. - The macros in export.h have been cleaned up to avoid redundancy in the macro parameters (ns, nspost, nspost2). - The introduction of relative references in the ksymtab entries caused a rework of the macros to accommodate that configuration as well. - Alignment of kernel_symbol in the ksymtab needed to be fixed to allow growing the kernel_symbol struct. - Modpost does now also append the namespace suffix to the symbol entries in Module.symvers. - The configuration option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS allows relaxing the enforcement of properly declared namespace imports at module loading time. - Symbols can be collectively exported into a namespace by defining DEFAULT_SYMBOL_NAMESPACE in the corresponding Makefile. - The requirement for a very recent coccinelle spatch has been lifted by simplifying the script. - nsdeps does now ensures MODULE_IMPORT_NS statements are sorted when patching the module source files. - Some minor bugs have been addressed in nsdeps to allow it to work with modules that have more than one source file. - The RFC for the usb-storage symbols has been simplified by using DEFAULT_SYMBOL_NAMESPACE=USB_STORAGE rather than explicitly exporting each and every symbol into that new namespace. Changes in v3: - Reword the documentation for the MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS option for clarification. - Fix printed required version of spatch in coccinelle script. - Adopt kbuild changes for modpost: .mod files are no longer generated in .tmp_versions. Similarely, generate the .ns_deps files in the tree along with the .mod files. Also, nsdeps now uses modules.order as source for the list modules to consider. - Add an RFC patch to introduce the namespace WATCHDOG_CORE for symbols exported in watchdog_core.c. This patch series was developed against Linus' master (15d90b242290). [1] git grep "^EXPORT_SYMBOL\w*(" v5.3-rc5 | wc -l [2] git grep "^EXPORT_SYMBOL\w*(" v4.17 | wc -l Matthias Maennich (11): module: support reading multiple values per modinfo tag export: explicitly align struct kernel_symbol module: add support for symbol namespaces. modpost: add support for symbol namespaces module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS export: allow definition default namespaces in Makefiles or sources modpost: add support for generating namespace dependencies scripts: Coccinelle script for namespace dependencies. usb-storage: remove single-use define for debugging RFC: usb-storage: export symbols in USB_STORAGE namespace RFC: watchdog: export core symbols in WATCHDOG_CORE namespace .gitignore | 1 + MAINTAINERS | 5 + Makefile | 14 +- arch/m68k/include/asm/export.h | 1 - drivers/hwmon/ftsteutates.c | 1 + drivers/hwmon/sch56xx-common.c | 1 + drivers/rtc/rtc-abx80x.c | 1 + drivers/usb/storage/Makefile | 2 + drivers/usb/storage/alauda.c | 1 + drivers/usb/storage/cypress_atacb.c | 1 + drivers/usb/storage/datafab.c | 1 + drivers/usb/storage/debug.h | 2 - drivers/usb/storage/ene_ub6250.c | 1 + drivers/usb/storage/freecom.c | 1 + drivers/usb/storage/isd200.c | 1 + drivers/usb/storage/jumpshot.c | 1 + drivers/usb/storage/karma.c | 1 + drivers/usb/storage/onetouch.c | 1 + drivers/usb/storage/realtek_cr.c | 1 + drivers/usb/storage/scsiglue.c | 2 +- drivers/usb/storage/sddr09.c | 1 + drivers/usb/storage/sddr55.c | 1 + drivers/usb/storage/shuttle_usbat.c | 1 + drivers/usb/storage/uas.c | 1 + drivers/watchdog/armada_37xx_wdt.c | 1 + drivers/watchdog/asm9260_wdt.c | 1 + drivers/watchdog/aspeed_wdt.c | 1 + drivers/watchdog/at91sam9_wdt.c | 1 + drivers/watchdog/atlas7_wdt.c | 1 + drivers/watchdog/bcm2835_wdt.c | 1 + drivers/watchdog/bcm47xx_wdt.c | 1 + drivers/watchdog/bcm7038_wdt.c | 1 + drivers/watchdog/bcm_kona_wdt.c | 1 + drivers/watchdog/bd70528_wdt.c | 1 + drivers/watchdog/cadence_wdt.c | 1 + drivers/watchdog/da9052_wdt.c | 1 + drivers/watchdog/da9055_wdt.c | 1 + drivers/watchdog/da9062_wdt.c | 1 + drivers/watchdog/da9063_wdt.c | 1 + drivers/watchdog/davinci_wdt.c | 1 + drivers/watchdog/digicolor_wdt.c | 1 + drivers/watchdog/dw_wdt.c | 1 + drivers/watchdog/ebc-c384_wdt.c | 1 + drivers/watchdog/ep93xx_wdt.c | 1 + drivers/watchdog/ftwdt010_wdt.c | 1 + drivers/watchdog/gpio_wdt.c | 1 + drivers/watchdog/hpwdt.c | 1 + drivers/watchdog/i6300esb.c | 1 + drivers/watchdog/iTCO_wdt.c | 1 + drivers/watchdog/ie6xx_wdt.c | 1 + drivers/watchdog/imgpdc_wdt.c | 1 + drivers/watchdog/imx2_wdt.c | 1 + drivers/watchdog/intel-mid_wdt.c | 1 + drivers/watchdog/it87_wdt.c | 1 + drivers/watchdog/kempld_wdt.c | 1 + drivers/watchdog/lpc18xx_wdt.c | 1 + drivers/watchdog/max63xx_wdt.c | 1 + drivers/watchdog/max77620_wdt.c | 1 + drivers/watchdog/mei_wdt.c | 1 + drivers/watchdog/mena21_wdt.c | 1 + drivers/watchdog/menf21bmc_wdt.c | 1 + drivers/watchdog/menz69_wdt.c | 1 + drivers/watchdog/meson_gxbb_wdt.c | 1 + drivers/watchdog/meson_wdt.c | 1 + drivers/watchdog/mlx_wdt.c | 1 + drivers/watchdog/moxart_wdt.c | 1 + drivers/watchdog/mtk_wdt.c | 1 + drivers/watchdog/ni903x_wdt.c | 1 + drivers/watchdog/nic7018_wdt.c | 1 + drivers/watchdog/npcm_wdt.c | 1 + drivers/watchdog/of_xilinx_wdt.c | 1 + drivers/watchdog/omap_wdt.c | 1 + drivers/watchdog/pm8916_wdt.c | 1 + drivers/watchdog/qcom-wdt.c | 1 + drivers/watchdog/rave-sp-wdt.c | 1 + drivers/watchdog/renesas_wdt.c | 1 + drivers/watchdog/retu_wdt.c | 1 + drivers/watchdog/rn5t618_wdt.c | 1 + drivers/watchdog/rza_wdt.c | 1 + drivers/watchdog/s3c2410_wdt.c | 1 + drivers/watchdog/sama5d4_wdt.c | 1 + drivers/watchdog/sirfsoc_wdt.c | 1 + drivers/watchdog/softdog.c | 1 + drivers/watchdog/sp5100_tco.c | 1 + drivers/watchdog/sprd_wdt.c | 1 + drivers/watchdog/st_lpc_wdt.c | 1 + drivers/watchdog/stmp3xxx_rtc_wdt.c | 1 + drivers/watchdog/stpmic1_wdt.c | 1 + drivers/watchdog/sunxi_wdt.c | 1 + drivers/watchdog/tangox_wdt.c | 1 + drivers/watchdog/tegra_wdt.c | 1 + drivers/watchdog/tqmx86_wdt.c | 1 + drivers/watchdog/ts4800_wdt.c | 1 + drivers/watchdog/ts72xx_wdt.c | 1 + drivers/watchdog/twl4030_wdt.c | 1 + drivers/watchdog/uniphier_wdt.c | 1 + drivers/watchdog/via_wdt.c | 1 + drivers/watchdog/w83627hf_wdt.c | 1 + drivers/watchdog/watchdog_core.c | 10 +- drivers/watchdog/wdat_wdt.c | 1 + drivers/watchdog/wm831x_wdt.c | 1 + drivers/watchdog/wm8350_wdt.c | 1 + drivers/watchdog/xen_wdt.c | 1 + drivers/watchdog/ziirave_wdt.c | 1 + include/asm-generic/export.h | 14 +- include/linux/export.h | 92 +++++++++++-- include/linux/module.h | 2 + init/Kconfig | 13 ++ kernel/module.c | 67 +++++++++- scripts/Makefile.modpost | 4 +- scripts/coccinelle/misc/add_namespace.cocci | 23 ++++ scripts/mod/modpost.c | 137 ++++++++++++++++++-- scripts/mod/modpost.h | 9 ++ scripts/nsdeps | 56 ++++++++ 114 files changed, 504 insertions(+), 46 deletions(-) create mode 100644 scripts/coccinelle/misc/add_namespace.cocci create mode 100644 scripts/nsdeps -- 2.23.0.rc1.153.gdeed80330f-goog _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic