Project

General

Profile

Actions

Feature #6571

closed

Support modules without or with non-standard approaches to provide init and exit functions

Added by Ilja Zakharov about 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Environment models
Target version:
-
Start date:
01/28/2016
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

EMG always expect single init and single exit function given to module_init and module_exit macros.


Related issues 3 (0 open3 closed)

Related to Klever - Feature #6558: Support several init and exit functions in EMG and SAClosedIlja Zakharov01/28/2016

Actions
Related to Klever - Feature #6563: Implement multi-module environement modelClosedAlexey Polushkin

Actions
Related to Klever - Feature #8588: Support initialization of Linux kernelClosedIlja Zakharov11/22/2017

Actions
Actions #1

Updated by Ilja Zakharov about 8 years ago

  • Category set to Environment models
Actions #2

Updated by Evgeny Novikov about 8 years ago

  • 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
Actions #3

Updated by Alexey Khoroshilov about 8 years ago

What kinds of non-standard approaches to provide init and exit functions do you mean?

Actions #4

Updated by Ilja Zakharov about 8 years ago

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.

Actions #5

Updated by Ilja Zakharov about 8 years ago

  • Priority changed from Normal to Low
Actions #6

Updated by Evgeny Novikov over 6 years ago

  • 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).

Actions #7

Updated by Ilja Zakharov about 6 years ago

  • 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.

Actions #8

Updated by Evgeny Novikov over 4 years ago

  • 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.

Actions

Also available in: Atom PDF