Project

General

Profile

Actions

Bug #7936

open

Kernel model for dev_set_drvdata is absent or impresize

Added by Vadim Mutilin almost 8 years ago. Updated about 7 years ago.

Status:
New
Priority:
High
Category:
Requirement specifications
Target version:
-
Start date:
02/01/2017
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

In http://ldvstore:8998/reports/unsafe/77289/

drivers/mmc/card/mmc_block.ko     linux:alloc

the function dev_set_drvdata(mmc_set_drvdata) is not modeled
 618 dev_set_drvdata(&card->dev, (void *)md);

thus when reading ldv_dev_get_drvdata (mmc_get_drvdata), which is modeled, we get an unknown pointer.

Actions #1

Updated by Evgeny Novikov almost 8 years ago

  • Priority changed from Immediate to High

Too complicated rule specification producing too many false alarms while requiring too much resources. We will not fix everything required for it in the near future.

BTW, there is a model for dev_set_drvdata() in linux/drivers/base/dd.* but it isn't compatible with old API, since there dev_set_drvdata() returns nothing while the model assumes it returns int.

Actions #2

Updated by Alexey Khoroshilov almost 8 years ago

  • Subject changed from linux:alloc: should model dev_set_drvdata to Kernel model for dev_set_drvdata
  • Priority changed from High to Immediate

It is an important model for many rules.

Possibly, the problem is in changes between versions in interface and in implementation:
3.0-3.15 int dev_set_drvdata(struct device *dev, void *data);
before 3.0 and after 3.16: void dev_set_drvdata(struct device *dev, void *data);

while our pointcut is:
around: call(int dev_set_drvdata(struct device *dev, void *data))

Actions #3

Updated by Evgeny Novikov almost 8 years ago

  • Priority changed from Immediate to High

Indeed we would be able to detect these issues easily if #7424 will be implemented.

Since the suggested fix is too broad and can affect everybody it should be tested separately from the main workflow. Taking into account that there is the only false alarm due to this issue and even it is for the rule specification to be marked incomplete, I am unsure that somebody will be able to do that soon.

Actions #4

Updated by Evgeny Novikov over 7 years ago

  • Subject changed from Kernel model for dev_set_drvdata to Kernel model for dev_set_drvdata is absent or impresize
  • Assignee set to Evgeny Novikov
  • Priority changed from High to Urgent

We have various issues with that model from its absence for old versions of the Linux kernel to its imprecision for the newer ones. Actually it is extremely important interface to be modeled very accurately for many versions of the Linux kernel.

Actions #5

Updated by Evgeny Novikov about 7 years ago

  • Priority changed from Urgent to High

Let's fix and improve specifications after we will have good tests and a testing infrastructure (version:0.3) and likely after we will complete a considerable refactoring of Core (1.0).

Actions

Also available in: Atom PDF