Feature #6571
closed
Support modules without or with non-standard approaches to provide init and exit functions
Added by Ilja Zakharov almost 9 years ago.
Updated about 5 years ago.
Category:
Environment models
Description
EMG always expect single init and single exit function given to module_init and module_exit macros.
- Category set to Environment models
- Subject changed from Support modules without or with the different implementation of init and exit to Support modules without or with non-standard approaches to provide init and exit functions
What kinds of non-standard approaches to provide init and exit functions do you mean?
I mean the other macros than "module_init". For example "console_initcall" macro. Header "include/linux/module.h" describes many of them, but the set strongly depends on kernel version. For example in the latest 4.4 kernel the majority of them are transformed into "module_init" still. By the way it makes sense to conduct experiments on 3.x kernels and determine drivers on which our current approach does not work.
P.S. To fix this it is just needed to add more macros to specific template file for Source Analyzer plugin.
- Priority changed from Normal to Low
- Tracker changed from Bug to Feature
- Priority changed from Low to High
I guess that the issue was primarily connected with attempts to analyze modules compiled into the kernel since otherwise it looks like all modules have module_init either explicitly or via substituting one of specific macros to it (you can see mentioned by Ilja header for details).
The issue was implemented about a year ago by explicit enumeration of many initialization macros. I am just wondering why not get initialization functions from macro __define_initcall to which a lot of other initialization macros are substituted? This seems to be a more safe approach regarding different versions of the kernel (although I assume that the corresponding API doesn't change frequently/ever).
- Status changed from New to Resolved
Currently I have implemented a configurable way to set macros for both modules and kernel initializations in 8066-abstract-translator. If necessary additional macros can be defined in configuration. At the moment both kernel and module initialization functions are supported and called by EMG.
- Status changed from Resolved to Closed
It seems that the branch was merged to master a long ago, but issues were not closed at that time.
Also available in: Atom
PDF