Detecting method for illegal memory reading and writing

A memory, illegal technology, applied in the field of memory read and write detection, can solve the problem of only one or two memory blocks, and achieve the effect of flexible use and cost reduction

Inactive Publication Date: 2007-03-07
ZTE CORP
View PDF0 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this technique strongly depends on whether the CPU implements the data address breakpoint register, and most CPUs do not have this function; at the same time, due to the limited number of DABR registers, there are only one or two, so the number of memory blocks to be monitored at the same time is also limited. only one or two

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
  • Detecting method for illegal memory reading and writing
  • Detecting method for illegal memory reading and writing
  • Detecting method for illegal memory reading and writing

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] The invention is applicable to all embedded system platforms with MMU in the CPU. Below in conjunction with accompanying drawing, the inventive method is described in detail by specific examples:

[0024] First, describe the application environment of this example. The CPU used in this example is MPC8245, which has an MMU, and the page size is 4K bytes. The exception vector of data access violation is 0x300. When the authority is abnormal, the CPU will automatically jump to 0x300 to execute the exception handling program. After executing the abnormal program, the CPU will jump back to the normal program for execution. The operating system used is vxWorks (embedded real-time operating system). This operating system provides the interface functions vmStateSet and vmStateGet for setting and reading the read and write attributes of the MMU block. All this example directly uses these two functions to set the read and write properties of the MMU block. Write properties.

[...

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

This invention discloses one method to test illegal memory reading applied in CPU imbed system platform, which comprises the following steps: hanging the illegal program to the data memory authorization abnormal places; setting needed monitor memory, legal task and illegal visit process type and setting the page as non-reading and writing; when there is program order visits page, it generating data memory out of abnormal phenomenon jumping to abnormal program; judging the orders and reading content monitored and when the order is illegal, then recording and processing according to illegal process type and end; otherwise reading memory and jumping abnormal program to the normal program.

Description

technical field [0001] The invention relates to a detection method for memory reading and writing, in particular to a detection method for illegal memory reading and writing based on an MMU (memory management unit). Background technique [0002] In an embedded system, since its tasks use the same memory address space, it is often found that the contents of the memory (global variables, stack, heap) will be illegally read and written inexplicably. For example, when using a global array, other global variables are illegally read or written due to the out-of-bounds subscript of the array. For these system faults caused by illegal memory reading and writing, in order to accurately locate the fault, it is necessary to analyze the code and deduce which task may have mishandled the data. This kind of analysis is often extremely laborious and requires a lot of manpower and resources. environment. If we know when and who modified the memory we care about, it is very easy for us to ...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 康剑王云峰
Owner ZTE CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products