Project

General

Profile

Actions

Feature #10469

closed

Required to implement a specification for input_ff_create_memless

Added by Ilja Zakharov almost 2 years ago. Updated 6 days ago.

Status:
Closed
Priority:
High
Category:
Environment models
Target version:
Start date:
08/19/2020
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

This is a quite complicated model that should be connected with environment model specification for HID drivers. The input_ff_create_memless function allocates memory which is released transparently for a driver by the HID subsystem.

The issues causes false positives at checking memory safety issues for the following drivers:
drivers/hid/hid-holtekff.ko
drivers/hid/hid-sjoy.ko
drivers/hid/hid-mf.ko
drivers/hid/hid-emsff.ko
drivers/hid/hid-zpff.ko
drivers/hid/hid-pl.ko
drivers/hid/hid-axff.ko
drivers/hid/hid-dr.ko
drivers/hid/hid-gaff.ko

Actions #1

Updated by Evgeny Novikov almost 2 years ago

  • Tracker changed from Bug to Feature
  • Detected in build deleted (git)
Actions #2

Updated by Evgeny Novikov almost 2 years ago

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

Let's do specification fixes and improvements after releasing Klever 3.0.

Actions #3

Updated by Evgeny Novikov 7 days ago

  • Assignee changed from Ilja Zakharov to Evgeny Novikov
  • Target version set to 3.7

Perhaps, it would be better to relate the input_ff_create_memless() model with the environment model, but actually, if this is responsibility of the kernel to free the related memory, then we can simply add appropriate pointers to the global list. In that case SMG will not report memory leaks. I tested and that works well, so let's implement a simple model and tests for it.

BTW, it has sense to verify the HID driver API usage in drivers separately. Probably, they have to invoke some functions in a specific order (say, hid_hw_stop() after successful hid_hw_start()) to avoid resource leaks and other subtle issues.

Actions #4

Updated by Evgeny Novikov 7 days ago

  • Status changed from New to Resolved

I did what I want in branch input_ff_create_memless-models-and-tests. Preliminary testing demonstrated only positive regressions since all related false alarms became either safes or timeouts. Let's see on more comprehensive testing results.

Actions #5

Updated by Evgeny Novikov 6 days ago

  • Status changed from Resolved to Closed

Extended testing didn't reveal anything outstanding, all related false alarms have gone and nothing is broken. So I merged the branch to master in 6f154afa8.

Actions

Also available in: Atom PDF