Method for dynamically detecting memory overflow on GPU based on address compression technology

A memory overflow, dynamic detection technology, applied in the direction of memory address/allocation/relocation, memory system, instrument, etc., can solve doublefree errors, program errors, no protection and other problems

CN107908954AActive Publication Date: 2018-04-13HUNAN UNIV
11 Cites 3 Cited by

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
Publication Date
2018-04-13

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to detection on memory overflow in the field of GPU security, and in particular relates to a method for dynamically detecting memory overflow on a GPU based on an address compression technology. The method disclosed by the invention comprises the steps of: enabling a user program to distribute a memory by using a mallocN function, inserting a canary, compressing an address ina compression address set composed of multiple byte arrays, and marking the memory to be released by using a freeN function; and performing garbage collection or dynamic capacity expansion of the compression address set by utilizing a garbage collection module of a detector; decompressing the address by utilizing a memory overflow detection module of the detector, and performing memory overflow check; and releasing the memory marked by the freeN by utilizing a memory releasing module of the detector. As shown in the figure 1, the system can realize memory overflow detection, which is transparent to the user program and little in performance influence when less memory is consumed.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to memory overflow detection in the GPU security field. Specifically, it relates to a method for dynamically detecting memory overflow on a GPU based on an address compression technology. Background technique

[0002] Graphics processing units (GPUs) were originally designed for graphics rendering. Today, thanks to its high concurrency and easy-to-use programming framework, GPUs are widely used in various general computing tasks, such as various graphics computing applications , GPU-assisted accelerated routing, etc. In particular, some applications that require high security, such as AES encryption and database systems, use GPUs for acceleration. With the increasing number of GPU application scenarios, more requirements are placed on the GPU programming framework. On the one hand, as cloud computing becomes more and more popular, the technology of GPU virtualization has also become mature. Major cloud service providers, such ...

Examples

Embodiment Construction

[0070] The hardware environment of the present invention is mainly a server. Among them, the CPU of the server is Intel Xeon E5-2609, 1.9GHz, and a discrete graphics card NVIDIAGM200GeForce GTX TITAN X for GPU computing. This GPU has 24 stream processors, 3072 CUDA cores and 12GB of GDDR5 memory. The memory bandwidth is 336.5GB / s.

[0071] The software of the present invention takes 64-bit Ubuntu 14.04.4LTS as a platform, and uses CUDA C++ language development under the CUDA environment. The NVIDIA graphics driver version is 352.39, and the CUDA version is 7.5.

[0072] The program is mainly divided into four parts. The first part is the initialization part. The second part is the allocation of memory, compressed address and insertion into the compressed address set performed by the user program calling mallocN. The third part is the mark of the memory block that calls freeN. The fourth part is the garbage collection module, the memory overflow detection module and the me...