Symbol namespaces
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 17 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | export: explicitly align struct kernel_symbol.arch/ arch/ arch/ +1 more | +2 | 0 replies | |
| 2/6 | module: add support for symbol namespaces.include/ include/ include/ +1 more | +156 | 10 replies | |
| 3/6 | modpost: add support for checking symbol namespaces.scripts/ scripts/ | +72 | 0 replies | |
| 4/6 | modpost: add support for generating namespace dependencies.scripts/ scripts/ | +55 | 1 reply | |
| 5/6 | scripts: Coccinelle script for namespace dependencies.Makefile scripts/ scripts/ +1 more | +74 | 0 replies | |
| 6/6 | RFC: USB: storage: move symbols into USB_STORAGE namespace.drivers/ drivers/ drivers/ +12 more | +24 | 2 replies |
Reviews trailers per patch
None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Joel Fernandes (Google) | Martijn Coenen | Julia Lawall | Greg Kroah-Hartman |
|---|---|---|---|---|
| Series | R-b R-b R-b R-b R-b R-b R-b R-b | R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b | A-b A-b A-b A-b | R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b T-b |
| 1/6 | ||||
| 2/6 | ||||
| 3/6 | ||||
| 4/6 | ||||
| 5/6 | ||||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH 0/6] Symbol namespaces
As of Linux 4.17, there are more than 30000 exported symbols in the kernel. 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.
Martijn Coenen (6):
export: explicitly align struct kernel_symbol.
module: add support for symbol namespaces.
modpost: add support for checking symbol namespaces.
modpost: add support for generating namespace dependencies.
scripts: Coccinelle script for namespace dependencies.
RFC: USB: storage: move symbols into USB_STORAGE namespace.
Makefile | 11 +++ arch/m68k/include/asm/export.h | 1 - arch/x86/include/asm/Kbuild | 1 + arch/x86/include/asm/export.h | 5 -- drivers/usb/storage/alauda.c | 1 + drivers/usb/storage/cypress_atacb.c | 1 + drivers/usb/storage/datafab.c | 1 + 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/sddr09.c | 1 + drivers/usb/storage/sddr55.c | 1 + drivers/usb/storage/shuttle_usbat.c | 1 + drivers/usb/storage/uas.c | 1 + drivers/usb/storage/usb.c | 20 ++--- include/asm-generic/export.h | 2 +- include/linux/export.h | 84 ++++++++++++++----- include/linux/module.h | 13 +++ kernel/module.c | 79 ++++++++++++++++++ scripts/Makefile.modpost | 4 +- scripts/add_namespace.cocci | 19 +++++ scripts/mod/modpost.c | 120 ++++++++++++++++++++++++++-- scripts/mod/modpost.h | 9 +++ scripts/nsdeps | 41 ++++++++++ 28 files changed, 379 insertions(+), 44 deletions(-) delete mode 100644 arch/x86/include/asm/export.h create mode 100644 scripts/add_namespace.cocci create mode 100644 scripts/nsdeps
Signature · 1 line
2.18.0.203.gfac676dfb9-goog