[PATCH] staging: ION: remove some references to CONFIG_ION

2021-01-06 Thread Matthias Maennich
tree") Cc: Greg Kroah-Hartman Cc: Hridya Valsaraju Cc: Rob Herring Cc: linux-me...@vger.kernel.org Cc: de...@driverdev.osuosl.org Signed-off-by: Matthias Maennich --- .../media/atomisp/pci/atomisp_subdev.c| 20 --- kernel/configs/android-recommended.config |

[PATCH] scripts: merge_config: add strict mode to fail upon any redefinition

2020-12-02 Thread Matthias Maennich
, but the script terminates with rc=1. If -y is set to define "builtin having precedence over modules", fragments are still allowed to set =m (while the base config has =y). Strict mode will tolerate that as demotions from =y to =m are ignored when setting -y. Cc: Masahiro Yamada Signed-off-by

Re: [PATCH] modpost: Make static exports fatal

2020-11-25 Thread Matthias Maennich
the warn() message to fatal() to make sure this never happens again. Signed-off-by: Quentin Perret Reviewed-by: Matthias Maennich Cheers, Matthias --- scripts/mod/modpost.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c

Re: [PATCH] ehci-hcd: Move include to keep CRC stable

2020-09-17 Thread Matthias Maennich
he include done in ehci-hub.c early in ehci-hcd.c, hence making sure the struct definitions are visible to the entire file. This improves CRC stability of the ehci-hcd exports even when symbol trimming is enabled. Signed-off-by: Quentin Perret Reviewed-by: Matthias Maennich Cheers, Matthias -

Re: [PATCH] scripts: add dummy report mode to add_namespace.cocci

2020-06-22 Thread Matthias Maennich
On Thu, Jun 04, 2020 at 02:39:18PM -0600, Shuah Khan wrote: On 6/4/20 1:31 PM, Julia Lawall wrote: On Thu, 4 Jun 2020, Matthias Maennich wrote: When running `make coccicheck` in report mode using the add_namespace.cocci file, it will fail for files that contain MODULE_LICENSE. Those match

[PATCH] scripts: add dummy report mode to add_namespace.cocci

2020-06-04 Thread Matthias Maennich
pts/nsdeps accordingly to set the nsdeps rule when run trough `make nsdeps`. Suggested-by: Julia Lawall Fixes: c7c4e29fb5a4 ("scripts: add_namespace: Fix coccicheck failed") Cc: YueHaibing Cc: j...@kernel.org Cc: co...@systeme.lip6.fr Cc: sta...@vger.kernel.org Signed-off-by: Matthias Ma

Re: Module loading problem since 5.3

2019-10-23 Thread Matthias Maennich
On Fri, Oct 18, 2019 at 12:18:48PM +, Luis Chamberlain wrote: On Wed, Oct 16, 2019 at 02:37:10PM +0100, Matthias Maennich wrote: On Wed, Oct 16, 2019 at 12:50:30PM +, Luis Chamberlain wrote: > On Mon, Oct 14, 2019 at 03:44:40PM +0100, Matthias Maennich wrote: > > Hi Luis! >

Re: [PATCH v3] scripts/nsdeps: use alternative sed delimiter

2019-10-23 Thread Matthias Maennich
-- 2.16.4 Reviewed-by: Masahiro Yamada Tested-by: Matthias Maennich Cheers, Matthias

Re: [PATCH v2] scripts/nsdeps: use alternative sed delimiter

2019-10-21 Thread Matthias Maennich
out of tree build and got outsmarted by ${srctree} being '..' for O=subdir/. Reviewed-by: Matthias Maennich Tested-by: Matthias Maennich Cheers, Matthias This is an alternative to my first patch here: http://lore.kernel.org/r/20191021145137.31672-1-j...@kernel.org Matthias suggested u

[PATCH v2 3/4] symbol namespaces: revert to previous __ksymtab name scheme

2019-10-18 Thread Matthias Maennich
accordingly. Reported-by: Stefan Wahren Suggested-by: Masahiro Yamada Fixes: 8651ec01daed ("module: add support for symbol namespaces.") Acked-by: Will Deacon Reviewed-by: Greg Kroah-Hartman Reviewed-by: Masahiro Yamada Signed-off-by: Matthias Maennich --- include/linux/exp

[PATCH v2 1/4] modpost: delegate updating namespaces to separate function

2019-10-18 Thread Matthias Maennich
was considered 'no namespace' as well and this lead to confusion. Acked-by: Will Deacon Reviewed-by: Greg Kroah-Hartman Reviewed-by: Masahiro Yamada Signed-off-by: Matthias Maennich --- scripts/mod/modpost.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git

[PATCH v2 2/4] modpost: make updating the symbol namespace explicit

2019-10-18 Thread Matthias Maennich
-by: Greg Kroah-Hartman Reviewed-by: Masahiro Yamada Signed-off-by: Matthias Maennich --- scripts/mod/modpost.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index dbfa3997136b..95b1eac656aa 100644 --- a/scripts/mod

[PATCH v2 0/4] export/modpost: avoid renaming __ksymtab entries for symbol namespaces

2019-10-18 Thread Matthias Maennich
...@vger.kernel.org Masahiro Yamada (1): export: avoid code duplication in include/linux/export.h Matthias Maennich (3): modpost: delegate updating namespaces to separate function modpost: make updating the symbol namespace explicit symbol namespaces: revert to previous __ksymtab name scheme include

[PATCH v2 4/4] export: avoid code duplication in include/linux/export.h

2019-10-18 Thread Matthias Maennich
fixes for the namespace feature] Signed-off-by: Matthias Maennich --- include/linux/export.h | 91 +- kernel/module.c| 2 +- 2 files changed, 29 insertions(+), 64 deletions(-) diff --git a/include/linux/export.h b/include/linux/export.h index 941d075f03

Re: Module loading problem since 5.3

2019-10-16 Thread Matthias Maennich
On Wed, Oct 16, 2019 at 12:50:30PM +, Luis Chamberlain wrote: On Mon, Oct 14, 2019 at 03:44:40PM +0100, Matthias Maennich wrote: Hi Luis! On Mon, Oct 14, 2019 at 08:52:35AM +, Luis Chamberlain wrote: > On Fri, Oct 11, 2019 at 09:26:05PM +0200, Heiner Kallweit wrote: > > On 1

Re: Module loading problem since 5.3

2019-10-14 Thread Matthias Maennich
Hi Luis! On Mon, Oct 14, 2019 at 08:52:35AM +, Luis Chamberlain wrote: On Fri, Oct 11, 2019 at 09:26:05PM +0200, Heiner Kallweit wrote: On 10.10.2019 19:15, Luis Chamberlain wrote: > > > On Thu, Oct 10, 2019, 6:50 PM Heiner Kallweit mailto:hkallwe...@gmail.com>> wrote: > >    

Re: [PATCH 4/4] export: avoid code duplication in include/linux/export.h

2019-10-11 Thread Matthias Maennich
On Fri, Oct 11, 2019 at 05:31:27PM +0200, Greg Kroah-Hartman wrote: On Thu, Oct 10, 2019 at 04:14:43PM +0100, Matthias Maennich wrote: Now that the namespace value is not part of the __ksymtab entry name anymore, we can simplify the implementation of EXPORT_SYMBOL*. By allowing the empty string

[PATCH 4/4] export: avoid code duplication in include/linux/export.h

2019-10-10 Thread Matthias Maennich
cal kernel configuration has 10K exported symbols, so it increases 10KB in rough estimation." Suggested-by: Masahiro Yamada Signed-off-by: Matthias Maennich --- include/linux/export.h | 92 +- kernel/module.c| 2 +- 2 files changed, 29 ins

[PATCH 2/4] modpost: make updating the symbol namespace explict

2019-10-10 Thread Matthias Maennich
Setting the symbol namespace of a symbol within sym_add_exported feels displaced and lead to issues in the current implementation of symbol namespaces. This patch makes updating the namespace an explicit call to decouple it from adding a symbol to the export list. Signed-off-by: Matthias Maennich

[PATCH 1/4] modpost: delegate updating namespaces to separate function

2019-10-10 Thread Matthias Maennich
was considered 'no namespace' as well and this lead to confusion. Signed-off-by: Matthias Maennich --- scripts/mod/modpost.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 4d2cdb4d71e3..9f5dcdff4d2f 100644

[PATCH 3/4] symbol namespaces: revert to previous __ksymtab name scheme

2019-10-10 Thread Matthias Maennich
accordingly. Suggested-by: Jessica Yu Fixes: 8651ec01daed ("module: add support for symbol namespaces.") Signed-off-by: Matthias Maennich --- include/linux/export.h | 13 + scripts/mod/modpost.c | 33 ++--- scripts/mod/modpost.h | 1 + 3 files c

[PATCH 0/4] export/modpost: avoid renaming __ksymtab entries for symbol namespaces

2019-10-10 Thread Matthias Maennich
Cc: Martijn Coenen Cc: Lucas De Marchi Cc: Shaun Ruffell Cc: Greg Kroah-Hartman Cc: Will Deacon Cc: linux-kbu...@vger.kernel.org Cc: linux-modu...@vger.kernel.org Matthias Maennich (4): modpost: delegate updating namespaces to separate function modpost: make updating the symbol namespace

Re: [PATCH] depmod: create and use System.map.no_namespaces

2019-10-07 Thread Matthias Maennich
Hi! On Sat, Oct 05, 2019 at 04:53:56PM +0900, Masahiro Yamada wrote: On Sat, Oct 5, 2019 at 3:25 AM Lucas De Marchi wrote: On Fri, Oct 4, 2019 at 2:57 AM Matthias Maennich wrote: > > depmod in its current version is not aware of symbol namespace in > ksymtab entries i

Re: nsdeps not working on modules in 5.4-rc1

2019-10-04 Thread Matthias Maennich
ct 3, 2019 at 10:24 AM Masahiro Yamada > > > wrote: > > > > > > > > Hi Steve, > > > > > > > > On Fri, Oct 4, 2019 at 12:15 AM Steve French wrote: > > > > > > > > > > On Thu, Oct 3, 2019 at 5:43 AM Matthia

[PATCH] depmod: create and use System.map.no_namespaces

2019-10-04 Thread Matthias Maennich
ren Fixes: 8651ec01daed ("module: add support for symbol namespaces.") Cc: Masahiro Yamada Cc: Lucas De Marchi Cc: Jessica Yu Cc: Martijn Coenen Cc: Greg Kroah-Hartman Cc: linux-modu...@vger.kernel.org Signed-off-by: Matthias Maennich --- Please note this depends on the new ksymtab e

Re: nsdeps not working on modules in 5.4-rc1

2019-10-03 Thread Matthias Maennich
Hi Steve! On Wed, Oct 02, 2019 at 06:54:26PM -0500, Steve French wrote: And running the build differently, from the root of the git tree (5.4-rc1) rather than using the Ubuntu 5.4-rc1 headers also fails e.g. "make M=fs/cifs modules nsdeps" ... LD [M] fs/cifs/cifs.o Building modules, stage

Re: [PATCH 0/7] module: various bug-fixes and clean-ups for module namespace

2019-10-02 Thread Matthias Maennich
On Wed, Oct 02, 2019 at 08:57:02PM +0200, Jessica Yu wrote: +++ Matthias Maennich [27/09/19 14:41 +0100]: On Fri, Sep 27, 2019 at 06:35:56PM +0900, Masahiro Yamada wrote: I was hit by some problems caused by the module namespace feature that was merged recently. At least, the breakage

[PATCH v3] usb-storage: SCSI glue: use dev_err instead of printk

2019-10-02 Thread Matthias Maennich
Follow common practice and retire printk(KERN_ERR ...) in favor of dev_err(). Cc: Alan Stern Cc: Greg Kroah-Hartman Cc: usb-stor...@lists.one-eyed-alien.net Signed-off-by: Matthias Maennich --- drivers/usb/storage/scsiglue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH] modpost: Copy namespace string into 'struct symbol'

2019-10-01 Thread Matthias Maennich
On Mon, Sep 30, 2019 at 04:20:46PM -0500, Shaun Ruffell wrote: On Fri, Sep 27, 2019 at 09:03:46AM +0100, Matthias Maennich wrote: On Thu, Sep 26, 2019 at 05:24:46PM -0500, Shaun Ruffell wrote: > When building an out-of-tree module I was receiving many warnings from > modpost like: > &

Re: [PATCH 7/7] nsdeps: make generated patches independent of locale

2019-10-01 Thread Matthias Maennich
at 10:27 PM Matthias Maennich wrote: > > > > > > On Fri, Sep 27, 2019 at 06:36:03PM +0900, Masahiro Yamada wrote: > > > >scripts/nsdeps automatically generates a patch to add MODULE_IMPORT_NS > > > >tags, and what is nicer, it sorts the lines alphabetically wi

Re: [PATCH 0/7] module: various bug-fixes and clean-ups for module namespace

2019-09-27 Thread Matthias Maennich
On Fri, Sep 27, 2019 at 06:35:56PM +0900, Masahiro Yamada wrote: I was hit by some problems caused by the module namespace feature that was merged recently. At least, the breakage of external module builds is a fatal one. I just took a look at the code closer, and I noticed some more issues and

Re: [PATCH 7/7] nsdeps: make generated patches independent of locale

2019-09-27 Thread Matthias Maennich
s file or as part of the command that calls this script. With this Reviewed-by: Matthias Maennich Cheers, Matthias tail -n +$((offset +1)) ${source_file} | grep -v MODULE_IMPORT_NS >> ${source_file}.tmp if ! diff -q ${source_file} ${source_file}.tm

Re: [PATCH 6/7] nsdeps: fix hashbang of scripts/nsdeps

2019-09-27 Thread Matthias Maennich
On Fri, Sep 27, 2019 at 06:36:02PM +0900, Masahiro Yamada wrote: This script does not use bash-extension. I am guessing this hashbang was copied from scripts/coccicheck, which really uses bash-extension. /bin/sh is enough for this script. Reviewed-by: Matthias Maennich Cheers, Matthias

Re: [PATCH 5/7] kbuild: fix build error of 'make nsdeps' in clean tree

2019-09-27 Thread Matthias Maennich
:1708) resolved that for me. I wonder what I missed. But I won't disagree with you on kbuild advise. :-) Reviewed-by: Matthias Maennich Cheers, Matthias Signed-off-by: Masahiro Yamada --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index

Re: [PATCH 4/7] module: avoid code duplication in include/linux/export.h

2019-09-27 Thread Matthias Maennich
On Fri, Sep 27, 2019 at 01:07:33PM +0200, Rasmus Villemoes wrote: On 27/09/2019 11.36, Masahiro Yamada wrote: include/linux/export.h has lots of code duplication between EXPORT_SYMBOL and EXPORT_SYMBOL_NS. To improve the maintainability and readability, unify the implementation. When the

Re: [PATCH 3/7] module: rename __kstrtab_ns_* to __kstrtabns_* to avoid symbol conflict

2019-09-27 Thread Matthias Maennich
rtab_ns_capable" and "__kstrtab_ns_ns_capable", and the latter to "__kstrtab_capable" and "__kstrtab_ns_capable". Then, we have the duplication for "__kstrtab_ns_capable". To ensure the uniqueness, rename "__kstrtab_ns_*" to "__kstrtabns_*&qu

Re: [PATCH 2/7] module: swap the order of symbol.namespace

2019-09-27 Thread Matthias Maennich
the idea of appending the namespace came from being afraid of other tools facing the problem of parsing the namespace out of the middle of the entry. Thanks for this improvement. Reviewed-by: Matthias Maennich Cheers, Matthias Signed-off-by: Masahiro Yamada --- include/linux/export.h | 4 ++-- sc

Re: [PATCH 1/7] modpost: fix broken sym->namespace for external module builds

2019-09-27 Thread Matthias Maennich
's fix also ensures that memory is released when updating the namespace. But judging from the code around 'symbolhash' it seems that leaking this is accepted for modpost. Not sure about that. Having said that, please feel free to add Reviewed-by: Matthias Maennich Cheers, Matthias Signed-off-

Re: [PATCH] modpost: Copy namespace string into 'struct symbol'

2019-09-27 Thread Matthias Maennich
of the symbol string. Because a copy is being made, handle_modversion can now free the temporary copy Fixes: cb9b55d21fe0 ("modpost: add support for symbol namespaces") Cc: Martijn Coenen Cc: Joel Fernandes (Google) Cc: Greg Kroah-Hartman Cc: Matthias Maennich Cc: Jessica Yu

[PATCH v2] usb-storage: SCSI glue: use pr_fmt and pr_err

2019-09-18 Thread Matthias Maennich
Follow common practice and retire printk(KERN_ERR ...) in favor of pr_fmt and dev_err(). Cc: Alan Stern Cc: Greg Kroah-Hartman Cc: usb-stor...@lists.one-eyed-alien.net Signed-off-by: Matthias Maennich --- drivers/usb/storage/scsiglue.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions

[PATCH] usb-storage: SCSI glue: use pr_fmt and pr_err

2019-09-17 Thread Matthias Maennich
Follow common practice and retire printk(KERN_ERR ...) in favor of pr_fmt and pr_err. Cc: Alan Stern Cc: Greg Kroah-Hartman Cc: usb-stor...@lists.one-eyed-alien.net Signed-off-by: Matthias Maennich --- drivers/usb/storage/scsiglue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

Re: [PATCH] module: Fix link failure due to invalid relocation on namespace offset

2019-09-11 Thread Matthias Maennich
t at the top of the address space, it > almost certainly results in a runtime failure if the kernel is relocated > dynamically as a result of KASLR. > > Rework 'namespace_offset' so that a value of 0, which cannot occur for a > valid namespaced symbol, indicates that the corresponding symbo

[PATCH v5 04/11] modpost: add support for symbol namespaces

2019-09-06 Thread Matthias Maennich
Reviewed-by: Joel Fernandes (Google) Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- Documentation/kbuild/modules.rst | 7 ++- scripts/export_report.pl | 2 +- scripts/mod/modpost.c| 104 ++- scripts/mod/modpost.h

[PATCH v5 10/11] usb-storage: remove single-use define for debugging

2019-09-06 Thread Matthias Maennich
USB_STORAGE was defined as "usb-storage: " and used in a single location as argument to printk. In order to be able to use the name 'USB_STORAGE', drop the definition and use the string directly for the printk call. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --

[PATCH v5 08/11] scripts: Coccinelle script for namespace dependencies.

2019-09-06 Thread Matthias Maennich
-by: Martijn Coenen Acked-by: Julia Lawall Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- MAINTAINERS | 5 ++ Makefile| 12 + scripts/Makefile.modpost| 4 +- scripts/coccinelle/misc

[PATCH v5 11/11] usb-storage: export symbols in USB_STORAGE namespace

2019-09-06 Thread Matthias Maennich
touching their respective EXPORT_SYMBOL macro expansion. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- drivers/usb/storage/Makefile| 2 ++ drivers/usb/storage/alauda.c| 1 + drivers/usb/storage/cypress_atacb.c | 1 + drivers/usb/storage/datafab.c | 1

[PATCH v5 01/11] module: support reading multiple values per modinfo tag

2019-09-06 Thread Matthias Maennich
namespaces patch series to read the (potentially) multiple namespaces a module is importing. Reviewed-by: Joel Fernandes (Google) Reviewed-by: Martijn Coenen Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- kernel/module.c | 17 +++-- 1 file changed, 15

[PATCH v5 06/11] export: allow definition default namespaces in Makefiles or sources

2019-09-06 Thread Matthias Maennich
-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- include/linux/export.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/export.h b/include/linux/export.h index d59461e71478..2c5468d8ea9a 100644 --- a/include/linux/export.h +++ b/include/linux/export.h @@ -166,6

[PATCH v5 09/11] docs: Add documentation for Symbol Namespaces

2019-09-06 Thread Matthias Maennich
Describe using Symbol Namespaces from a perspective of a user. I.e. module authors or subsystem maintainers. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- Documentation/kbuild/namespaces.rst | 154 +++ Documentation/kernel-hacking/hacking.rst

[PATCH v5 03/11] module: add support for symbol namespaces.

2019-09-06 Thread Matthias Maennich
'struct namespaced_kernel_symbol' for that section, at the cost of making the module loader more complex. Co-developed-by: Martijn Coenen Signed-off-by: Martijn Coenen Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- include/asm-generic/export.h | 6 +-- include/linux/export.h

[PATCH v5 07/11] modpost: add support for generating namespace dependencies

2019-09-06 Thread Matthias Maennich
Signed-off-by: Matthias Maennich --- .gitignore| 1 + Makefile | 2 +- scripts/mod/modpost.c | 54 +++ scripts/mod/modpost.h | 2 ++ 4 files changed, 53 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index

[PATCH v5 05/11] module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS

2019-09-06 Thread Matthias Maennich
the enforcement at module loading time and loading is denied if the module's imports are not satisfactory. Reviewed-by: Martijn Coenen Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- init/Kconfig| 13 + kernel/module.c | 11 +-- 2 files changed, 22

[PATCH v5 02/11] export: explicitly align struct kernel_symbol

2019-09-06 Thread Matthias Maennich
, the section contents didn't change, and the ELF section alignment only changed on x86_64 and m68k. Feedback from other archs more than welcome. Co-developed-by: Martijn Coenen Signed-off-by: Martijn Coenen Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- arch/m68k/include/asm

[PATCH v5 00/11] Symbol Namespaces

2019-09-06 Thread Matthias Maennich
vger.kernel.org Cc: linux-modu...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: usb-stor...@lists.one-eyed-alien.net Cc: kernel-t...@android.com Matthias Maennich (11): module: support reading multiple values per modinfo tag export: explicitly align struct kernel_symbol module: add support for symbol name

Re: [PATCH v4 08/12] scripts: Coccinelle script for namespace dependencies.

2019-09-05 Thread Matthias Maennich
On Wed, Sep 04, 2019 at 06:53:25PM +0900, Masahiro Yamada wrote: On Wed, Sep 4, 2019 at 12:07 AM Matthias Maennich wrote: A script that uses the '.ns_deps' files generated by modpost to automatically add the required symbol namespace dependencies to each module. Usage: 1) Move some symbols

Re: [usb-storage] Re: [PATCH v4 12/12] RFC: watchdog: export core symbols in WATCHDOG_CORE namespace

2019-09-05 Thread Matthias Maennich
On Thu, Sep 05, 2019 at 12:41:47PM +0200, Jessica Yu wrote: +++ Matthew Dharm [04/09/19 09:16 -0700]: On Wed, Sep 4, 2019 at 5:12 AM Guenter Roeck wrote: Note that I don't object to the patch set in general. There may be symbols which only need be exported in the context of a single

[PATCH v4 12/12] RFC: watchdog: export core symbols in WATCHDOG_CORE namespace

2019-09-03 Thread Matthias Maennich
as a reference on how to use the symbol namespaces. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- drivers/hwmon/ftsteutates.c | 1 + drivers/hwmon/sch56xx-common.c | 1 + drivers/rtc/rtc-abx80x.c| 1 + drivers/watchdog/armada_37xx_wdt.c | 1

[PATCH v4 11/12] RFC: usb-storage: export symbols in USB_STORAGE namespace

2019-09-03 Thread Matthias Maennich
touching their respective EXPORT_SYMBOL macro expansion. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- drivers/usb/storage/Makefile| 2 ++ drivers/usb/storage/alauda.c| 1 + drivers/usb/storage/cypress_atacb.c | 1 + drivers/usb/storage/datafab.c | 1

[PATCH v4 09/12] docs: Add documentation for Symbol Namespaces

2019-09-03 Thread Matthias Maennich
Describe using Symbol Namespaces from a perspective of a user. I.e. module authors or subsystem maintainers. Signed-off-by: Matthias Maennich --- Documentation/kbuild/namespaces.rst | 154 +++ Documentation/kernel-hacking/hacking.rst | 18 +++ 2 files changed, 172

[PATCH v4 06/12] export: allow definition default namespaces in Makefiles or sources

2019-09-03 Thread Matthias Maennich
-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- include/linux/export.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/export.h b/include/linux/export.h index d59461e71478..2c5468d8ea9a 100644 --- a/include/linux/export.h +++ b/include/linux/export.h @@ -166,6

[PATCH v4 04/12] modpost: add support for symbol namespaces

2019-09-03 Thread Matthias Maennich
Reviewed-by: Joel Fernandes (Google) Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- Documentation/kbuild/modules.rst | 7 ++- scripts/export_report.pl | 2 +- scripts/mod/modpost.c| 104 ++- scripts/mod/modpost.h

[PATCH v4 10/12] usb-storage: remove single-use define for debugging

2019-09-03 Thread Matthias Maennich
USB_STORAGE was defined as "usb-storage: " and used in a single location as argument to printk. In order to be able to use the name 'USB_STORAGE', drop the definition and use the string directly for the printk call. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --

[PATCH v4 07/12] modpost: add support for generating namespace dependencies

2019-09-03 Thread Matthias Maennich
Signed-off-by: Matthias Maennich --- .gitignore| 1 + Makefile | 2 +- scripts/mod/modpost.c | 54 +++ scripts/mod/modpost.h | 2 ++ 4 files changed, 53 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index

[PATCH v4 05/12] module: add config option MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS

2019-09-03 Thread Matthias Maennich
the enforcement at module loading time and loading is denied if the module's imports are not satisfactory. Reviewed-by: Martijn Coenen Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- init/Kconfig| 13 + kernel/module.c | 11 +-- 2 files changed, 22

[PATCH v4 08/12] scripts: Coccinelle script for namespace dependencies.

2019-09-03 Thread Matthias Maennich
-by: Martijn Coenen Acked-by: Julia Lawall Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- MAINTAINERS | 5 ++ Makefile| 12 + scripts/Makefile.modpost| 4 +- scripts/coccinelle/misc

[PATCH v4 02/12] export: explicitly align struct kernel_symbol

2019-09-03 Thread Matthias Maennich
, the section contents didn't change, and the ELF section alignment only changed on x86_64 and m68k. Feedback from other archs more than welcome. Co-developed-by: Martijn Coenen Signed-off-by: Martijn Coenen Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- arch/m68k/include/asm

[PATCH v4 03/12] module: add support for symbol namespaces.

2019-09-03 Thread Matthias Maennich
'struct namespaced_kernel_symbol' for that section, at the cost of making the module loader more complex. Co-developed-by: Martijn Coenen Signed-off-by: Martijn Coenen Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- include/asm-generic/export.h | 6 +-- include/linux/export.h

[PATCH v4 01/12] module: support reading multiple values per modinfo tag

2019-09-03 Thread Matthias Maennich
namespaces patch series to read the (potentially) multiple namespaces a module is importing. Reviewed-by: Joel Fernandes (Google) Reviewed-by: Martijn Coenen Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- kernel/module.c | 17 +++-- 1 file changed, 15

[PATCH v4 00/12] Symbol Namespaces

2019-09-03 Thread Matthias Maennich
gle.com Cc: w...@kernel.org Cc: yamada.masah...@socionext.com Cc: linux-kbu...@vger.kernel.org Cc: linux-modu...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: usb-stor...@lists.one-eyed-alien.net Cc: linux-watch...@vger.kernel.org Matthias Maennich (12): module: support reading multiple v

Re: [PATCH v3 06/11] export: allow definition default namespaces in Makefiles or sources

2019-08-28 Thread Matthias Maennich
On Wed, Aug 28, 2019 at 12:49:51PM +0200, Jessica Yu wrote: +++ Matthias Maennich [21/08/19 12:49 +0100]: To avoid excessive usage of EXPORT_SYMBOL_NS(sym, MY_NAMESPACE), where MY_NAMESPACE will always be the namespace we are exporting to, allow exporting all definitions of EXPORT_SYMBOL

Re: [PATCH v3 04/11] modpost: add support for symbol namespaces

2019-08-28 Thread Matthias Maennich
On Wed, Aug 28, 2019 at 11:43:26AM +0200, Jessica Yu wrote: +++ Matthias Maennich [27/08/19 15:41 +0100]: On Mon, Aug 26, 2019 at 06:21:38PM +0200, Jessica Yu wrote: +++ Matthias Maennich [21/08/19 12:49 +0100]: Add support for symbols that are exported into namespaces. For that, extract any

Re: [PATCH v3 03/11] module: add support for symbol namespaces.

2019-08-27 Thread Matthias Maennich
On Tue, Aug 27, 2019 at 05:37:18PM +0200, Jessica Yu wrote: +++ Matthias Maennich [21/08/19 12:49 +0100]: The EXPORT_SYMBOL_NS() and EXPORT_SYMBOL_NS_GPL() macros can be used to export a symbol to a specific namespace. There are no _GPL_FUTURE and _UNUSED variants because these are currently

Re: [PATCH v3 04/11] modpost: add support for symbol namespaces

2019-08-27 Thread Matthias Maennich
On Mon, Aug 26, 2019 at 06:21:38PM +0200, Jessica Yu wrote: +++ Matthias Maennich [21/08/19 12:49 +0100]: Add support for symbols that are exported into namespaces. For that, extract any namespace suffix from the symbol name. In addition, emit a warning whenever a module refers to an exported

[PATCH] sctp: chunk.c: correct format string for size_t in printk

2019-02-28 Thread Matthias Maennich
github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Matthias Maennich --- net/sctp/chunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index 64bef313d436..5cb7c1ff97e9 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c @@ -192,7 +192,7