Feature #9394

Support verification of built-in Linux kernel modules

Added by Evgeny Novikov over 2 years ago. Updated 3 days ago.

Program fragments generation
Target version:
Start date:
Due date:
% Done:


Estimated time:
Published in build:


Some time ago Klever could verify built-in Linux kernel modules like loadable ones pretty well. But in Klever 2.0 this was broken.



Updated by Evgeny Novikov over 1 year ago

  • Target version deleted (3.0)
  • Priority changed from Urgent to High

Linux is not our main priority.


Updated by Evgeny Novikov 14 days ago

  • Target version set to 3.1
  • Priority changed from High to Urgent

Seems that users suffer from this issue more and more.


Updated by Ilja Zakharov 14 days ago

  • Status changed from New to Resolved

Implemented in pfg-internal-modules.


Updated by Evgeny Novikov 14 days ago

  • Status changed from Resolved to Open

Pavel detected the following exception:

Raise exception:
Traceback (most recent call last):
  File "/home/alpha/git/klever/venv/lib/python3.7/site-packages/klever/core/", line 395, in run
  File "/home/alpha/git/klever/venv/lib/python3.7/site-packages/klever/core/", line 304, in callbacks_caller
    ret = attr(*args, **kwargs)
  File "/home/alpha/git/klever/venv/lib/python3.7/site-packages/klever/core/pfg/", line 49, in generate_program_fragments
    attr_data, pairs = strategy.fragmentation(fset, tactic_name, fset_name)
  File "/home/alpha/git/klever/venv/lib/python3.7/site-packages/klever/core/pfg/fragmentation/", line 85, in fragmentation
    self.tactic.get("ignore missing files"))
  File "/home/alpha/git/klever/venv/lib/python3.7/site-packages/klever/core/pfg/abstractions/", line 44, in init
  File "/home/alpha/git/klever/venv/lib/python3.7/site-packages/klever/core/pfg/abstractions/", line 424, in __divide
    raise RuntimeError(msg)
RuntimeError: Cannot calculate path to existing file '/home/alpha/git/linux/scripts/dtc/dtc-lexer.lex.c'


Updated by Evgeny Novikov 12 days ago

  • Status changed from Open to Closed

Ilja fixed it so that no extra information is necessary to consider built-in modules absolutely like loadable ones. The branch passed tests. Moreover, I added one more preset job for testing built-in modules support. That job is a complete copy of "Loadable kernel modules sample" except for a kernel configuration ("allyesconfig" rather than "allmodconfig").


Updated by Evgeny Novikov 12 days ago

I merged the branch to master in 3f7db52cf. Everybody is welcome to cherry-pick commits 753efebd13e90ab12fe4c623509da7062bc7904f and 4d4197b319d5e553cb6dc774d34cd114a9afc454 to support built-in modules.


Updated by Ilja Zakharov 12 days ago

Built-in modules are selected by iterating all CC commands collected by Clade. Commands from modules have either a 'KBUILD_MODNAME' or '-DKBUILD_MODNAME' option. Klever groups input files of commands with the same value of the mentioned options to get modules even if there are linked to the kernel. This approach is used for fragmentation strategy "statically linked modules". By default, Klever is using the approach with iterating over LD commands to detect modules.


Updated by Evgeny Novikov 11 days ago

  • Priority changed from Urgent to High
  • Status changed from Closed to Open

It was my mistake that I merged the branch to master too early while it turned out that it is not so vital. Indeed, we need to investigate the issue better and to fix different corner cases. The current implementation is still in branch pfg-internal-modules that I hope to be completed for Klever 3.1. I reverted corresponding commits in master.


Updated by Evgeny Novikov 3 days ago

  • Target version changed from 3.1 to 3.2

We need to release Klever 3.1 faster due to an incompatibility with Clade 3.3+ and a new OpenStack cloud.

Also available in: Atom PDF