Back to results
US 8,145,903 B2Granted
Method and system for a kernel lock validator
AssigneeRed Hat, Inc.
InventorIngo Molnar
Life of this patent
Estimating the term…
Abstract
An embodiment relates generally to a method of preventing resource access conflicts in a software component. The method includes intercepting a lock operation in the software component and testing an associated lock type of the lock operation against a set of rules. The method also includes determining an action based on the associated lock type conflicting one of the rules of the set of rules.
Claims22
A method, implemented using a processor, of preventing resource access bugs in a kernel, the method comprising:
- generating a first hash value from a sequence of held locks;
- intercepting a lock operation in a software component before the lock operation completes;
- adding the lock operation as a temporary last entry to a sequence of currently held locks to produce a proposed sequence of currently held locks;
- generating a second hash value from the proposed sequence of currently held locks;
- testing, using the processor, whether the second hash value equals the first hash value;
- if the second hash value does not equal the first hash value, then testing, using the processor, an associated lock type of the lock operation against a set of rules for administering lock operations;
- and
- determining an action based on the associated lock type conflicting with one of the rules of the set of rules for administering lock operations.
5 more elements
A system for preventing resource access conflicts in a software component, the system comprising:
- a memory containing instructions;
- a processor, operably connected to the memory, that executes the instructions;
- wherein the memory includes:
- a rules module configured to store rules for administrating locks in the software component;
- a data structure configured to store a sequence of currently held locks;
- and
- a control module configured to interface with the rules module and the data structure, wherein the control module is configured to perform operations comprising:
- generating a first hash value from a sequence of held locks;
- intercepting a lock operation in the software component before the lock operation completes;
- adding the lock operation as a temporary last entry to the sequence of currently held locks to produce a proposed sequence of currently held locks;
- generating a second hash value from the proposed sequence of currently held locks;
- testing whether the second hash value equals the first hash value;
- if the second hash value does not equal the first hash value, then testing an associated lock type of the lock operation against the rules for administering locks stored by the rules module;
- and
- reporting an error based on the associated lock type conflicting with one of the rules.
12 more elements
Dependencies are inferred from the claim text.