News: 0001551731

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 6.16 Introduces New Helper For Restricting Symbols To Select Kernel Modules

([Linux Kernel] 3 Hours Ago EXPORT_SYMBOL_GPL_FOR_MODULES)


All of the kernel build system "Kbuild" updates were merged today for the nearly-over [1]Linux 6.16 merge window that is expected to conclude tomorrow with the Linux 6.16-rc1 release. Notable with the Kbuild pull is the introduction of the EXPORT_SYMBOL_GPL_FOR_MODULES helper.

Added to the Linux kernel today is the new EXPORT_SYMBOL_GPL_FOR_MODULES() helper. This macro can be used to limit the exporting of kernel symbols to a given list of modules.

The example given in [2]the patch introducing EXPORT_SYMBOL_GPL_FOR_MODULES is:

EXPORT_SYMBOL_GPL_FOR_MODULES(preempt_notifier_inc, "kvm");

So now it's easy to limiting GPL symbols for allowed use by only select kernel modules. The macro puts the exported symbols into a module namespace that cannot be imported by other modules. Multiple modules can be specified with this macro using a comma separated list. The macro also supports tail-globs for selecting multiple modules like "drm_*" as another avenue.

The [3]Kbuild pull for LInux 6.16 in addition to introducing this new macro also improves ABI handling within gendwarfksyms and brings a variety of other smaller fixes and enhancements.



[1] https://www.phoronix.com/search/Linux+6.16

[2] https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=for-next&id=707f853d7fa3ce323a6875487890c213e34d81a0

[3] https://lore.kernel.org/lkml/CAK7LNAQunzxOHR+vMZLf8kqxyRtLx-Z2G2VZquJmndrT9TZjiQ@mail.gmail.com/



phoronix

You have to admit that it's difficult to misplace the Perl sources. :-)
-- Larry Wall in <1992Aug26.184221.29627@netlabs.com>