Project

General

Profile

Feature #9394

Support verification of built-in Linux kernel modules

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

Status:
Open
Priority:
High
Assignee:
Category:
Program fragments generation
Target version:
Start date:
11/21/2018
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

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

History

#1

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.

#2

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.

#3

Updated by Ilja Zakharov 14 days ago

  • Status changed from New to Resolved

Implemented in pfg-internal-modules.

#4

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/components.py", line 395, in run
    self.main()
  File "/home/alpha/git/klever/venv/lib/python3.7/site-packages/klever/core/components.py", line 304, in callbacks_caller
    ret = attr(*args, **kwargs)
  File "/home/alpha/git/klever/venv/lib/python3.7/site-packages/klever/core/pfg/__init__.py", 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/__init__.py", 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/__init__.py", line 44, in init
    self.__divide(skip_missing_files)
  File "/home/alpha/git/klever/venv/lib/python3.7/site-packages/klever/core/pfg/abstractions/__init__.py", line 424, in __divide
    raise RuntimeError(msg)
RuntimeError: Cannot calculate path to existing file '/home/alpha/git/linux/scripts/dtc/dtc-lexer.lex.c'

#5

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

#6

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.

#7

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.

#8

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.

#9

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