Re: [PATCH v3 5/5] module: Provide EXPORT_SYMBOL_GPL_FOR_MODULES() helper

2025-05-14 Thread Petr Pavlu
On 5/2/25 16:12, Peter Zijlstra wrote: > Helper macro to more easily limit the export of a symbol to a given > list of modules. > > Eg: > > EXPORT_SYMBOL_GPL_FOR_MODULES(preempt_notifier_inc, "kvm"); > > will limit the use of said function to kvm.ko, any other module trying > to use this symbo

[PATCH v3 5/5] module: Provide EXPORT_SYMBOL_GPL_FOR_MODULES() helper

2025-05-02 Thread Peter Zijlstra
Helper macro to more easily limit the export of a symbol to a given list of modules. Eg: EXPORT_SYMBOL_GPL_FOR_MODULES(preempt_notifier_inc, "kvm"); will limit the use of said function to kvm.ko, any other module trying to use this symbol will refure to load (and get modpost build failures).