Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for detecting unsecure direct memory access in driver

A memory access and driver technology, applied in program control devices, memory systems, boot programs, etc., can solve problems such as inability to detect driver unsafe DMA access well

Pending Publication Date: 2021-06-08
TSINGHUA UNIV
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The present invention provides a method and device for detecting unsafe direct memory access in a driver program, which is used to solve the problem that the unsafe DMA access in the driver program cannot be well detected in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for detecting unsecure direct memory access in driver
  • Method and device for detecting unsecure direct memory access in driver
  • Method and device for detecting unsecure direct memory access in driver

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0052] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention , but not all examples. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0053] figure 1 is a schematic flowchart of a method for detecting unsafe direct memory access in a driver program provided by an embodiment of the present invention, as shown in figure 1 shown, including:

[0054] Step S1, compiling the source code of the tested driver based on the compiler framework to obtain the intermediate code of the driver;

[0055] Specifically, because the source ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method and device for detecting unsafe direct memory access in a driver, and the method comprises the steps: compiling a source code of a detected driver based on a compiler frame, and obtaining a driver intermediate code; adopting a field-based analysis algorithm for the intermediate code, and recognizing direct memory access operation in the code; performing static taint analysis on the basis of the direct memory access operation, determining an instruction influenced by the direct memory access operation, and performing mode-based analysis on the instruction to obtain candidate unsafe direct memory access; and verifying the accessibility of the code path of each candidate unsafe direct memory access to obtain the unsafe direct memory access. The working process in the embodiment of the invention is automatic, and manual work of developers and testers is not needed, so that the workload of program analysis is saved, and the efficiency of error detection is improved.

Description

technical field [0001] The invention relates to the technical field of software testing, in particular to a method and device for detecting unsafe direct memory access in a driver program. Background technique [0002] Direct Memory Access (DMA) is a technology that allows hardware devices to directly communicate with system memory, and is widely used in existing drivers. According to the different ways of data synchronization, DMA is divided into two categories. The first is consistent DMA, that is, after DMA memory application, each DMA access operation will automatically synchronize the data of the hardware device and system memory, so the overhead of DMA access is relatively large; the second is streaming DMA, that is, in DMA After the memory application, the hardware device and the data in the system memory need to be explicitly synchronized. Each DMA access will not be automatically synchronized, so the overhead of DMA access is relatively small. Generally speaking, ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/41G06F8/30G06F9/4401G06F12/14
CPCG06F8/37G06F8/41G06F9/4411G06F12/1416
Inventor 胡事民白家驹
Owner TSINGHUA UNIV