KR20190065841A - Memory error detection method - Google Patents

Memory error detection method Download PDF

Info

Publication number
KR20190065841A
KR20190065841A KR1020170165396A KR20170165396A KR20190065841A KR 20190065841 A KR20190065841 A KR 20190065841A KR 1020170165396 A KR1020170165396 A KR 1020170165396A KR 20170165396 A KR20170165396 A KR 20170165396A KR 20190065841 A KR20190065841 A KR 20190065841A
Authority
KR
South Korea
Prior art keywords
memory
page
red zone
area
virtual memory
Prior art date
Application number
KR1020170165396A
Other languages
Korean (ko)
Other versions
KR102044075B1 (en
Inventor
신인식
한욱현
조병길
이병영
송청위
Original Assignee
한국과학기술원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국과학기술원 filed Critical 한국과학기술원
Priority to KR1020170165396A priority Critical patent/KR102044075B1/en
Publication of KR20190065841A publication Critical patent/KR20190065841A/en
Application granted granted Critical
Publication of KR102044075B1 publication Critical patent/KR102044075B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1416Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7201Logical to physical mapping or translation of blocks or pages

Abstract

The present invention relates to a memory error detection method and, more specifically, to a region-based memory error detection method which may be applied to a large-scale application and fuzz testing. According to the present invention, the memory error detection method may be applied to a large-scale application and fuzz testing by maintaining unique practicality of a region-based memory while a technique capable of detecting memory errors which may not be found by the conventional region-based memory error detection technique is presented. In addition, the memory error detection method finds more memory vulnerabilities than the conventional region-based memory error detection technique in the large-scale application and fuzz testing, thereby preventing memory access errors.

Description

메모리 오류 감지 방법{MEMORY ERROR DETECTION METHOD}MEMORY ERROR DETECTION METHOD [0002]

본 발명은 메모리 오류 감지 방법에 관한 것으로서, 더 상세하게는 대규모 어플리케이션과 퍼즈 테스팅(fuzz testing)에 적용할 수 있는 영역 기반 메모리 오류 감지 방법에 대한 것이다.The present invention relates to a method of detecting a memory error, and more particularly, to a method for detecting a region-based memory error applicable to a large-scale application and fuzz testing.

메모리 오류는 C와 C++같은 안전하지 않은 메모리 사용 언어들에서 가장 흔한 취약점 중에 하나이다. 이러한 메모리 오류를 통해 공격자는 시스템의 정지를 일으키거나 시스템을 제어할 수 있다. 메모리 오류의 종류로는 공간적 메모리 오류와 시간적 메모리 오류가 있다. 공간적 메모리 오류의 대표적인 예로는 버퍼오버플로가 있으며, 시간적 메모리 오류의 대표적인 예로는 허상 포인터 접근이 있다. 이와 같은 오류를 막기 위한 메모리 오류 감지 기법에는 포인터 기반 감지, 객체 기반 감지, 영역 기반 감지 기법이 있다. 하지만, 대규모 어플리케이션의 실행과 퍼즈 테스팅을 위해서는 호환성 및 성능의 이유로 영역 기반 탐지 기법이 많이 사용되고 있다.Memory errors are one of the most common vulnerabilities in insecure memory-intensive languages such as C and C ++. This memory error allows the attacker to cause the system to hang or to control the system. Types of memory errors include spatial memory errors and temporal memory errors. A typical example of a spatial memory error is a buffer overflow, and a typical example of a temporal memory error is a virtual pointer access. Memory error detection techniques to prevent such errors include pointer-based detection, object-based detection, and area-based detection. However, for execution and fuzz testing of large-scale applications, area-based detection techniques are used for compatibility and performance reasons.

도 1은 영역 기반 메모리 오류 감지 기법의 개념을 보여주는 도면이다.1 is a diagram illustrating a concept of an area-based memory error detection technique.

영역 기반 탐지 기법은 전체 가상 메모리(10) 주소의 접근 가능 여부를 압축하여 저장해 놓고, 메모리 접근 시 해당 주소가 접근이 가능한지 아닌지를 검사한다. 접근 가능 여부를 판단하는 정보를 갖고 있는 메모리를 쉐도우 메모리(20)라 한다.The area-based detection method compresses and stores the accessibility of the entire virtual memory (10) address, and checks whether or not the corresponding address is accessible when accessing the memory. A memory having information for determining whether or not accessibility is possible is referred to as a shadow memory 20.

영역 기반 탐지 기법은 객체(11) 사이에, 객체의 접근이 불가능한 영역(이하 '레드존(red zone)'이라 한다)(12)을 두어서 공간적 메모리 오류를 감지하고, 메모리 할당 해제와 같이 객체의 수명이 끝나면 해당하는 객체의 주소를 레드존(13)으로 만들어 한동안 접근이 불가능하게 한다. 최근에 이러한 영역 기반 감지기법을 활용하는 컴파일러 기술들이 개발되었다. 이와 같은 영역 기반 감지 기법은 포인터의 메모리 레이아웃이 변하지 않아, 호환성이 높아 실용적인 장점이 있다. The area-based detection technique detects a spatial memory error by placing an area (hereinafter, referred to as 'red zone') 12 in which objects can not be accessed between the objects 11, When the lifetime of the object is completed, the address of the corresponding object is made into the red zone (13), making access impossible for a while. Recently compiler technologies have been developed that utilize this area-based detection technique. This area-based detection technique has practical advantages because it has high compatibility because the memory layout of the pointer does not change.

그러나 메모리 할당 해제된 메모리의 경우, 그 영역에 쓰여질 수 없는 객체(14)가 오류로 라이트(write) 될 위험이 있다. 즉, 예를 들어 가상 메모리 주소 1~8이 객체영역1이고, 가상 메모리 주소 9~16이 레드존이며, 현재 가상 메모리 주소 17~24(객체영역2)가 할당 해제된 상태인 경우에, 사용자가 20의 주소 크기를 차지하는 객체 'A'를 객체영역1에 쓰는(write) 경우, 객체 'A'는 객체영역1인 가상 메모리 주소 1~8과 객체영역2인 가상 메모리 주소 17~20에 쓰여지게 된다. 이때 객체영역2에는 객체영역1과 다른 객체가 씌여질 영역이므로, 객체영역2에 씌여진 객체 'A'는 오류가 발생한 것이다.However, in the case of a memory deallocated memory, there is a risk that the object 14, which can not be written to the area, is erroneously written. That is, for example, when the virtual memory addresses 1 to 8 are the object zone 1, the virtual memory addresses 9 to 16 are the red zone, and the virtual memory addresses 17 to 24 (object zone 2) A 'is written to object area 1, virtual memory addresses 1 to 8 and object area 2, virtual memory addresses 17 to 20, when object' A ', which occupies an address size of 20, is written to object area 1 . At this time, the object 'A' written in the object area 2 is an error because the object area 2 is an area in which an object different from the object area 1 is to be written.

이를 방지하기 위하여, 기존의 영역 기반 메모리 감지 기법에서는 할당 해제 요청을 받으면, 해당하는 메모리 영역을 할당 해제하지 않고, 격리하여 놓고(13) 격리 공간이 가득 찬 후에만, 해당하는 영역을 다시 사용하도록 하였다. 그러나 이 방법은 실제 물리 메모리를 차지하기 때문에 실용적이지 않은 문제점이 있었다.To prevent this, in the existing area-based memory detection technique, when the request for deallocation is received, the corresponding memory area is not deallocated but isolated, and (13) the corresponding area is used again only after the isolation space is full Respectively. However, since this method occupies actual physical memory, it is not practical.

메모리의 용량이 무한하지 않기 때문에 접근 불가능한 영역이 크지 않고, 수명이 끝난 객체의 주소도 재사용을 해야 하기 때문에, 다른 감지 기법보다 오류 감지 능력이 떨어진다. 또한, 레드존과 접근 가능 여부의 압축된 정보에 대한 추가적인 메모리 공간이 필요하다.Since the memory capacity is not infinite, the inaccessible area is not large and the address of the end of life object has to be reused. In addition, additional memory space is required for the compressed information of the red zone and accessibility.

이러한 기술들의 개발에도 불구하고 영역 기반 메모리 오류 감지 기법은 최근의 비선형적 메모리 접근에 의한 오류와 같이 새로운 버그들을 감지함에 있어서 어려움을 겪고 있다. Despite the development of these technologies, area - based memory error detection techniques have been challenged in detecting new bugs, such as those caused by recent non - linear memory accesses.

이러한 문제는 레드존의 범위를 넓히면 해결이 되지만, 종래 가상 메모리는, 물리 메모리와 그 배치, 주소 할당은 다르더라도 물리 메모리에서 객체 또는 레드존이 차지하는 크기는 가상 메모리에서 차지하는 크기와 동일하므로, 물리적 메모리의 한계로 인하여 가상 메모리 상에서도 레드존의 크기를 많이 키우는 것은 불가능하고, 레드존의 크기가 커짐에 따라 물리적 메모리 낭비가 심해져 실용적이지 않았다.Although this problem can be solved by widening the range of the red zone, the size of the virtual memory occupied by the object or the red zone in the physical memory is the same as that occupied by the virtual memory, Due to memory limitations, it is not possible to increase the size of the red zone too much in the virtual memory, and as the size of the red zone becomes larger, the physical memory is wasted, which is not practical.

이와 같이, 기존의 영역 기반 메모리 오류 감지 기법에 있어서, 감지 능력과 실용성은 균형 관계에 있다. 따라서, 감지 능력을 높이면서 대규모 어플리케이션과 퍼즈 테스팅을 위해 사용할 수 있도록 실용적인 메모리 오류 감지를 수행하기는 매우 어려운 문제점이 있었다.Thus, in the conventional area-based memory error detection technique, the sensing ability and the practicality are in balance. Therefore, it is very difficult to perform practical memory error detection so that it can be used for large-scale applications and fuzz testing while increasing the sensing capability.

1. Serebryany, Konstantin, et al. "AddressSanitizer: A Fast Address Sanity Checker." USENIX Annual Technical Conference. 2012.1. Serebryany, Constantin, et al. "AddressSanitizer: A Fast Address Sanity Checker." USENIX Annual Technical Conference. 2012. 2. Microsoft Support. How to use pageheap.exe in windows xp, windows 2000, and windows server 2003. https://support.microsoft.com/en-us/kb/286470, 20092. Microsoft Support. How to use pageheap.exe in windows xp, windows 2000, and windows server 2003. https://support.microsoft.com/en-us/kb/286470, 2009

본 발명은 이와 같은 문제점을 해결하기 위해 창안된 것으로서, 기존 영역 기반 메모리 오류 감지 기법을 발전시켜, 객체 사이에 큰 레드존을 제공하면서 그에 따른 메모리 낭비를 줄여, 오류 감지 능력을 향상시키면서 대규모 어플리케이션과 퍼즈 테스팅(fuzz testing)에 사용할 수 있는 정도의 실용성을 가진 메모리 오류 감지 방법을 제공하는 데 목적이 있다.SUMMARY OF THE INVENTION The present invention has been made to overcome the above problems, and it is an object of the present invention to develop an existing area-based memory error detection technique to provide a large red zone between objects, thereby reducing memory waste, It is an object of the present invention to provide a memory error detection method that is practically usable for fuzz testing.

이와 같은 목적을 달성하기 위하여 본 발명에 따른 데이터 접근시의 메모리 오류를 감지하는 방법은, (a) 하나의 가상 메모리 페이지를 하나의 물리 메모리 페이지에 매핑하는 단계; (b) 상기 가상 메모리 페이지 내부의 데이터 접근금지 영역(이하 '페이지 내부 레드존'이라 한다)을 설정하는 단계; (c) 상기 가상 메모리 페이지 이후 일정 영역을 데이터 접근금지 영역(이하 '페이지 단위 레드존'이라 한다)으로 설정하는 단계; (d) 상기 페이지 단위 레드존 이후 일정 영역을 새로운 가상 메모리 페이지로서 상기 물리 메모리 페이지에 매핑하는 단계; (e) 상기 가상 메모리 페이지 내부에, 페이지 내부 레드존을 설정하는 단계; (f) 상기 가상 메모리 페이지 이후 일정 영역에, 페이지 단위 레드존을 설정하는 단계; 및 (g) 새로운 가상 메모리 페이지 설정시마다 상기 단계(d) 내지 단계(f)를 수행하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method of detecting a memory error during data access, the method comprising: (a) mapping a virtual memory page to a physical memory page; (b) setting a data access prohibition area (hereinafter referred to as " page internal red zone ") inside the virtual memory page; (c) setting a certain area after the virtual memory page to a data access prohibition area (hereinafter referred to as a page unit red zone); (d) mapping a certain area after the page unit red zone to the physical memory page as a new virtual memory page; (e) setting a page internal red zone in the virtual memory page; (f) setting a page unit red zone in a predetermined area after the virtual memory page; And (g) performing the steps (d) through (f) each time a new virtual memory page is set.

상기 단계(b) 및 단계(e)의 페이지 내부 레드존 설정은, 메모리 상의 일정 영역에 할당된 쉐도우(shadow) 메모리 영역에서, 각 메모리 주소의 접근 가능여부를 설정함으로써 이루어질 수 있다.The page internal red zone setting of the step (b) and the step (e) can be performed by setting whether or not each memory address can be accessed in a shadow memory area allocated to a certain area on the memory.

상기 각 메모리 주소의 접근 가능여부 설정은, 상기 쉐도우 메모리 영역에서, 각 메모리 주소에 해당하는 비트(bit)를 0 또는 1로 설정함에 의해 이루어질 수 있다.The accessibility setting of each memory address may be performed by setting bit corresponding to each memory address to 0 or 1 in the shadow memory area.

상기 쉐도우 메모리 영역은, 물리 메모리 및 가상 메모리 상에 동시에 설정될 수 있다.The shadow memory area can be set simultaneously in the physical memory and the virtual memory.

상기 단계(b) 이후, (h) 데이터(객체)의 상기 가상 메모리 접근(access)이 있을 경우, 상기 접근하는 메모리 주소에 해당하는, 쉐도우 메모리 상의 접근금지여부 설정에 의하여 상기 데이터의 페이지 내부 레드존 접근에 의한 메모리 오류 발생 여부를 판별하는 단계를 더 포함할 수 있다.(H) if there is the virtual memory access of the data (object), the page internal red of the data by the setting of the access prohibition on the shadow memory corresponding to the accessed memory address, And determining whether a memory error due to the zone access has occurred or not.

상기 단계(c) 및 단계(f)의 상기 페이지 단위 레드존 설정은,The page unit red zone setting in the step (c) and the step (f)

상기 쉐도우 메모리 상에 접근가능여부를 설정하거나 또는 추가적인 메모리 상에 접근가능여부를 설정하지 않고, 운영체제(OS)에 상기 페이지 단위 레드존에 대한 접근금지 영역 설정을 요청하여, 상기 운영체제의 상기 페이지 단위 레드존에 대한 접근금지 영역 설정에 의해 이루어질 수 있다.Requesting an operating system (OS) to set an access prohibited area for the page unit red zone, without setting accessibility on the shadow memory or setting accessibility on an additional memory, This can be done by setting an access prohibited zone for the red zone.

상기 단계(c) 이후, (i) 데이터(객체)의 상기 페이지 단위 레드존에의 접근이 있을 경우, 신호 처리기(signal handler)에서 이를 감지하여 메모리 오류가 발생했음을 알려주는 단계를 더 포함할 수 있다.After step (c), if the access to the page-unit red zone of the data (object) is made, the signal handler may detect the access to the page unit red zone to notify that a memory error has occurred have.

상기 단계(a) 및 단계(d)에서, 가상 메모리 페이지의 물리 메모리 페이지로의 매핑은, 시스템이 제공하는 가상 메모리 페이지의 물리 메모리 페이지로의 매핑 함수를 호출함으로써 이루어질 수 있다.In steps (a) and (d) above, the mapping of the virtual memory page to the physical memory page may be accomplished by calling the mapping function to the physical memory page of the virtual memory page provided by the system.

상기 단계(d)에서, 시스템이 제공하는 가상 메모리 페이지의 물리 메모리 페이지로의 매핑 함수가, 기존의 가상 메모리 페이지에 대하여 할당해제할 크기를 지정하도록 요청하는 경우, 할당해제할 크기를 0으로 설정함으로써 기존의 가상 메모리 페이지를 그대로 유지한 상태로 새로운 가상 메모리 페이지를, 상기 기존의 가상 메모리 페이지가 매핑되어 있는 상기 물리 메모리 페이지로 매핑시킬 수 있다.In the step (d), when the mapping function to the physical memory page of the virtual memory page provided by the system requests to specify the size to be deallocated to the existing virtual memory page, the size to be deallocated is set to 0 The new virtual memory page can be mapped to the physical memory page to which the existing virtual memory page is mapped while maintaining the existing virtual memory page as it is.

상기 단계(d)에서, 시스템이 제공하는 가상 메모리 페이지의 물리 메모리 페이지로의 상기 매핑 함수 호출시, 새로운 가상 메모리 페이지를, 새로운 물리 메모리 페이지가 아닌 상기 기존의 가상 메모리 페이지가 매핑되어 있는 물리 메모리 페이지로 매핑될 수 있도록 하는 파라미터를 설정할 수 있다.In the step (d), at the time of calling the mapping function to the physical memory page of the virtual memory page provided by the system, the new virtual memory page is referred to as a physical memory You can set the parameters to be mapped to the page.

본 발명에 의하면, 종래의 영역 기반 메모리 오류 감지 기법으로 찾을 수 없었던 메모리 오류들을 감지할 수 기법을 제시하면서도 영역 기반 메모리 특유의 실용성을 유지시켜 대규모 어플리케이션과 퍼즈 테스팅에 적용이 가능하도록 하며, 또한, 대규모 어플리케이션 및 퍼즈 테스팅에서 종래의 영역 기반 메모리 오류 감지 기법보다 더 많은 메모리 취약점을 찾아, 메모리 액세스 오류를 방지하는 효과가 있다.According to the present invention, a technique for detecting memory errors that could not be found by the conventional area-based memory error detection technique is presented, while maintaining practicality peculiar to the area-based memory so that it can be applied to a large scale application and fuzz testing, Large-scale applications and fuzz testing have the effect of finding more memory weaknesses than traditional area-based memory error detection techniques and preventing memory access errors.

도 1은 영역 기반 메모리 오류 감지 기법의 개념을 보여주는 도면.
도 2는 64-bit 메모리 주소를 활용한 공간적, 시간적 메모리 오류 감지 능력 향상과 다대일 메모리 페이지 매핑을 통한 실용성 확보 개념을 보여주는 도면.
도 3은 다대일 메모리 페이지 매핑의 방법을 나타내는 도면.
도 4는 본 발명의 메모리 오류 감지 방법을 수행하는 순서도.
도 5는 프로토타입의 실행 성능을 나타내는 그래프.
도 6은 프로토타입의 퍼징(fuzzing) 성능을 나타내는 그래프.
1 shows a concept of a region-based memory error detection scheme;
FIG. 2 is a diagram showing the concept of securing practicality through improved mapping of many-to-one memory pages and improved ability to detect spatial and temporal memory errors using a 64-bit memory address.
3 illustrates a method of many-to-one memory page mapping;
4 is a flowchart for performing a memory error detection method of the present invention;
5 is a graph showing execution performance of a prototype.
Figure 6 is a graph showing the fuzzing performance of the prototype.

이하 첨부된 도면을 참조로 본 발명의 바람직한 실시예를 상세히 설명하기로 한다. 이에 앞서, 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. 따라서, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시예에 불과할 뿐이고 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형예들이 있을 수 있음을 이해하여야 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Prior to this, terms and words used in the present specification and claims should not be construed as limited to ordinary or dictionary terms, and the inventor should appropriately interpret the concepts of the terms appropriately It should be interpreted in accordance with the meaning and concept consistent with the technical idea of the present invention based on the principle that it can be defined. Therefore, the embodiments described in this specification and the configurations shown in the drawings are merely the most preferred embodiments of the present invention and do not represent all the technical ideas of the present invention. Therefore, It is to be understood that equivalents and modifications are possible.

도 2는 64-bit 메모리 주소를 활용한 공간적, 시간적 메모리 오류 감지 능력 향상과 다대일 메모리 페이지 매핑을 통한 실용성 확보 개념을 보여주는 도면이고, 도 3은 다대일 메모리 페이지 매핑의 방법을 나타내는 도면이다.FIG. 2 is a diagram illustrating a concept of ensuring practicality through improvement of a spatial and temporal memory error detection capability using a 64-bit memory address and mapping of many-to-one memory pages, and FIG. 3 is a diagram illustrating a method of a many-to-one memory page mapping.

이하에서는, 도 2 및 도 3을 참조하여 본 발명의 메모리 오류 감지 방법을 설명한다.Hereinafter, a memory error detection method of the present invention will be described with reference to FIGS. 2 and 3. FIG.

도 2의 큰 가상 메모리 영역을 차지하는 레드존(120)을 사용하여 공간적인 메모리 오류 감지 능력을 향상시킨다. 이러한 레드존(120)은 가상 메모리 페이지 내부의 레드존(212, 도 3 참조)과 페이지 단위의 레드존(220, 도 3 참조)으로 나누어진다. 이 차이는 도 3에 상세히 나와 있다.The red zone 120 occupying the large virtual memory area of FIG. 2 is used to improve spatial memory error detection capability. This red zone 120 is divided into a red zone 212 (see FIG. 3) inside the virtual memory page and a red zone 220 (see FIG. 3) by page unit. This difference is shown in detail in FIG.

도 2의 화살표(140)는 객체를 가상 메모리 영역 끝까지 사용했을 때, 다시 가상 메모리 영역 앞으로 돌아와 기존의 사용 영역을 재사용하게 되는 경우를 나타낸다. 이 경우, 레드존(120) 영역이 매우 크다면, 최대한 가상 메모리 주소의 재사용 시간을 늦추게 되고, 이와 같이 늦취진 시간 동안에 시간적 메모리 오류의 감지 능력을 향상시킨다. 또한 큰 크기의 메모리 주소값, 일 실시예로서, 64-bit 메모리 주소를 최대한 활용하여 시간적 오류 메모리 감지 능력 향상시킬 수도 있다.An arrow 140 in FIG. 2 indicates a case where an existing use area is reused when the object is used up to the end of the virtual memory area, and then returns to the virtual memory area. In this case, if the area of the red zone 120 is very large, the reuse time of the virtual memory address is delayed as much as possible, thereby improving the detection capability of the temporal memory error during the late purging time. It is also possible to utilize a large memory address value, in one embodiment, a 64-bit memory address as much as possible to improve the temporal error memory detection capability.

기존의 영역 기반 메모리 감지 기법에서는 할당 해제 요청을 받으면, 해당하는 메모리 영역을 할당 해제하지 않고, 격리하여 놓고 격리 공간이 가득 차면 해당하는 영역을 다시 사용하도록 하였다. 그러나 이 방법은 실제 물리 메모리를 차지하기 때문에 실용적이지 않다. 도 2의 객체가 할당 해제된다면 해당하는 가상 메모리 주소는 모든 주소가 다 쓰일 때까지 사용되지 않으며 물리 메모리 영역은 다른 객체에게 할당 될 수 있다.In the conventional area-based memory sensing technique, when a request for deallocation is received, the corresponding memory area is not deallocated and isolated, and when the isolation space becomes full, the corresponding area is used again. However, this method is not practical because it takes up actual physical memory. If the object of FIG. 2 is deallocated, the corresponding virtual memory address is not used until all addresses are exhausted and the physical memory area can be allocated to another object.

앞서 전술한 바와 같은, 물리 메모리와 가상 메모리 간에 객체 또는 레드존이 차지하는 영역의 크기가 일대일로 동일하기 때문에 레드존 영역을 크게 할당할 수 없는 문제점을 해결하기 위해, 도 2 및 도 3의 다대일 매핑을 통해 물리 메모리 낭비를 줄여 실용성을 확보한다. 여기서 다대일 매핑이란, 가상 메모리상의 다수의 페이지가 물리 메모리상의 한개의 페이지와 매핑된다는 것이다. 물리 메모리의 한개의 페이지에는 레드존 없이 오직 객체만이 할당되며, 가상 메모리 상에서는 물리 메모리의 각 객체들과, 각 객체들 사이에는 큰 영역을 차지하는 레드존이 할당된다. 가상 메모리에서 객체(211)가 포함된 각 페이지(210) 내부에는 레드존(이하 '페이지 내부 레드존'이라 한다)(212)이 할당되고, 각 페이지 사이에도 레드존(이하 '페이지 단위 레드존'이라 한다)(220)이 할당된다. 즉, 레드존은 가상 주소 상에서만 존재하고, 실제 레드존이 차지하는 물리 메모리는 없게 된다. 여러 가상 메모리의 페이지를 하나의 물리 메모리 페이지에 매핑하여 레드존에 의한 물리 메모리 공간의 낭비를 없애는 장점이 있다. 이때, 해당하는 레드존이 접근이 불가능하다는 정보는 압축되어 저장되어 있다.In order to solve the problem that the size of the area occupied by the object or the red zone between the physical memory and the virtual memory is the same one-to-one, as described above, the red zone area can not be allocated largely, By mapping, physical memory is wasted and practicality is ensured. Many-to-one mapping here means that multiple pages on virtual memory are mapped to one page on physical memory. Only one object is allocated to one page of physical memory without a red zone, and a red zone occupying a large area is allocated between each object in the physical memory and each object in the virtual memory. A red zone (hereinafter referred to as a " page internal red zone ") 212 is allocated in each page 210 including an object 211 in the virtual memory, and a red zone Quot;) < / RTI > That is, the red zone exists only on the virtual address, and there is no physical memory occupied by the actual red zone. It is advantageous to eliminate the waste of the physical memory space due to the red zone by mapping pages of multiple virtual memories to one physical memory page. At this time, information that the corresponding red zone is inaccessible is compressed and stored.

도 3의 ①과 같이 처음에는 하나의 가상 메모리 페이지를 하나의 물리 메모리 페이지에 매핑한다. 이때, 일 실시예로서, mmap 시스템 콜을 통해서 매핑할 수 있다. 그 후에 도 3의 ②와 같이 새로운 가상 메모리 페이지를 기존에 매핑되어 있던 물리 메모리 페이지에 매핑한다. 이때, 일 실시예로서 mremap 시스템 콜을 사용할 수 있다. mremap 시스템 콜은 가상 페이지들을 할당해제하고 새로운 가상 페이지들을 제공하는 시스템 콜이다. 할당을 해제할 크기를 지정할 수 있는데, 여기서 이 크기를 0으로 하면 기존의 가상 페이지들은 그대로 유지가 되면서 새로운 가상 페이지들은 기존의 가상 페이지와 같은 물리 메모리 페이지와 매핑된다. 기존의 가상 페이지는 모든 프로세스가 공유하는 페이지여야 한다. 그러기 위해서 도 3의 ①에서 mmap 시스템 콜 사용 시에 MAP_SHARED로 할당한다. 기존의 페이지가 MAP_SHARED로 할당된 페이지여야 새로운 가상 페이지가 새로운 물리 페이지와 매핑되지 않고, 기존의 가상 페이지와 매핑된 물리 페이지와 매핑된다.As shown in (1) of FIG. 3, at first, one virtual memory page is mapped to one physical memory page. In this case, as an embodiment, mapping can be performed through the mmap system call. After that, a new virtual memory page is mapped to the existing physical memory page as shown in (2) of FIG. In this case, the mremap system call can be used as an embodiment. The mremap system call is a system call that deallocates virtual pages and provides new virtual pages. In this case, if the size is set to 0, existing virtual pages are maintained, and new virtual pages are mapped to physical memory pages such as existing virtual pages. Existing virtual pages must be pages shared by all processes. To do so, allocate it as MAP_SHARED when using the mmap system call in (1) of Fig. The existing page should be a page allocated with MAP_SHARED. The new virtual page is not mapped to the new physical page, but is mapped to the existing virtual page and the mapped physical page.

전술한 바와 같이 도 3에서 레드존 영역은 두 가지로 나뉠 수 있다. 할당된 객체(211)의 가상 메모리 페이지 내부에 있는 레드존(페이지 내부 레드존)(212)과 할당된 객체가 없는 가상 메모리 페이지 전체를 차지하는 레드존(페이지 단위 레드존)(220)이다.As described above, the red zone area in FIG. 3 can be divided into two. A red zone (page internal red zone) 212 inside the virtual memory page of the allocated object 211 and a red zone (page unit red zone) 220 occupying the entire virtual memory page without the object allocated.

페이지 단위 레드존(220)에 대하여, 쉐도우 메모리(230)에 접근 불가능 정보를 저장하려면 많은 물리적 메모리 낭비가 발생한다. 이를 위해서 운영체제(operating system, OS)의 가상 메모리 페이지 권한을 이용하여 해당하는 페이지 단위 레드존을 모두 접근 불가능하게 한다. 이후에 페이지 단위 레드존에 대한 접근을 신호 처리기(signal handler)에서 잡아내어 메모리 오류가 발생했음을 알 수 있다. 이 기술을 통해서 레드존의 사이즈는 물리 메모리의 낭비가 거의 없이 매우 커질 수 있으며, 이에 따라 메모리 접근 오류를 감지할 가능성이 매우 커져서 오류 데이터가 씌여지는 것을 방지하게 된다. 즉, 운영체제는 가상 페이지 단위의 권한을 제공하는데, 하나의 페이지가 모두 레드존인 경우, 이에 대한 접근 불가능 정보를 따로 저장하지 않고, 페이지의 접근 권한을 막아 해당하는 페이지에 대한 접근이 이루어질 경우 신호 처리기에서 해당하는 접근을 감지한다. 이 부분은 기존의 운영체제가 제공하는 기능으로, 추가적인 메모리 공간이 전혀 필요하지 않다.To store inaccessible information in the shadow memory 230 for the page-by-page red zone 220, a lot of physical memory is wasted. In order to do this, it makes all the corresponding page-unit red zones inaccessible by using the virtual memory page privilege of the operating system (OS). Then, the access to the page-by-page red zone is caught by the signal handler and it can be seen that a memory error has occurred. With this technique, the size of the red zone can become very large without wasting physical memory, which greatly increases the likelihood of detecting memory access errors and prevents erroneous data writing. In other words, the operating system provides the authority of a virtual page unit. When one page is all in the red zone, the inaccessibility information is not stored separately. If access to the corresponding page is inhibited, The processor detects the corresponding access. This is a feature provided by the existing operating system and requires no additional memory space at all.

도 4는 본 발명의 메모리 오류 감지 방법을 수행하는 순서도이다.4 is a flowchart illustrating a method of detecting a memory error according to the present invention.

도 2 및 도 3을 참조하여 설명한 바를 토대로, 본 발명의 메모리 오류 감지 방법을 수행하는 방법을 순서도를 이용하여 정리하면 다음과 같다.Based on the description with reference to FIG. 2 and FIG. 3, a method of performing the memory error detection method of the present invention will be summarized below using a flowchart.

하나의 가상 메모리 페이지를 하나의 물리 메모리 페이지에 매핑한다(S401). 전술한 바와 같이 이와 같은 매핑은, 시스템에서 제공하는 함수를 호출하여 수행시킬 수 있다. 일 실시예로서, 'mmap'와 같은 함수를 호출할 수 있다One virtual memory page is mapped to one physical memory page (S401). As described above, such a mapping can be performed by calling a function provided by the system. As an example, a function such as 'mmap' may be called

이러한 가상 메모리 페이지 내부에, 데이터 접근금지 영역(이하 '페이지 내부 레드존'이라 한다)을 설정한다(S402). 이러한 페이지 내부 레드존은 메모리 상의 일정 영역에 할당된 쉐도우(shadow) 메모리 영역에서, 각 메모리 주소의 접근 가능여부를 설정하는 방식으로 구현할 수 있다. 이러한 쉐도우 메모리 영역의 예는 도 1(20), 도 2(130), 도 3(230)에 도시되어 있으며, 각 메모리 주소에 해당하는 비트(bit)를 0 또는 1로 설정함에 의해 페이지 내부 레드존 또는 객체 영역임을 구분하여 설정할 수 있다. 도 2 및 도 3에는 쉐도우 메모리 영역을 편의상 가상 메모리 영역에만 도시하였으나, 실제로는 물리 메모리 및 가상 메모리 상에 동시에 설정된다.A data inaccessible area (hereinafter referred to as " page internal red zone ") is set in the virtual memory page (S402). This page internal red zone can be implemented by setting whether or not each memory address can be accessed in a shadow memory area allocated to a certain area on the memory. An example of such a shadow memory area is shown in FIG. 1 (20), FIG. 2 (130) and FIG. 3 (230). By setting bit corresponding to each memory address to 0 or 1, A zone or an object area. Although FIG. 2 and FIG. 3 show only the virtual memory area for the sake of convenience, the shadow memory area is actually set on the physical memory and the virtual memory at the same time.

가상 메모리 페이지 이후 일정 영역을 데이터 접근금지 영역(이하 '페이지 단위 레드존'이라 한다)으로 설정한다(S403). 페이지 단위 레드존은, 객체 영역이 존재하지 않는다.After the virtual memory page, a certain area is set as a data access prohibition area (hereinafter referred to as 'page red zone') (S403). In the page-by-page red zone, there is no object area.

이러한 페이지 단위 레드존을 설정할 때는, 상기 쉐도우 메모리 상에 접근가능여부를 설정하거나 또는 추가적인 메모리 상에 접근가능여부를 설정하지 않고, 운영체제(OS)에 상기 페이지 단위 레드존에 대한 접근금지 영역 설정을 요청하여, 상기 운영체제의 상기 페이지 단위 레드존에 대한 접근금지 영역 설정에 의해 이루어진다. 즉, 페이지 단위 레드존 설정을 위해서는 추가적인 물리 메모리를 전혀 필요로 하지 않아, 물리 메모리의 소모를 방지하게 된다.When setting the page unit red zone, the access inhibition area setting for the page unit red zone is set to the operating system (OS) without setting accessibility on the shadow memory or setting accessibility on the additional memory And setting an access prohibited area for the page unit red zone of the operating system. That is, the page-by-page red zone setting does not require additional physical memory at all and prevents consumption of the physical memory.

이후, 페이지 단위 레드존 이후 일정 영역을 새로운 가상 메모리 페이지로서 상기 물리 메모리 페이지에 매핑한다(S404). 이때의 물리 메모리 페이지는 단계 S401에서 매핑한 그 물리 메모리 페이지로서, 가상 메모리 페이지와 물리 메모리 페이지 간에 다대일 매핑이 이루어지는 것이다.Thereafter, a certain area after the page unit red zone is mapped to the physical memory page as a new virtual memory page (S404). The physical memory page at this time is the physical memory page mapped in step S401, and many-to-one mapping is performed between the virtual memory page and the physical memory page.

가상 메모리 페이지의 물리 메모리 페이지로의 매핑 역시, 시스템이 제공하는 가상 메모리 페이지의 물리 메모리 페이지로의 매핑 함수를 호출함으로써 이루어질 수 있는데, 일 실시예로서 mremap 함수를 호출할 수 있다.The mapping of the virtual memory page to the physical memory page may also be accomplished by calling the mapping function to the physical memory page of the virtual memory page provided by the system, which may call the mremap function as an example.

시스템이 제공하는 가상 메모리 페이지의 물리 메모리 페이지로의 매핑 함수가, mremap과 같이, 기존의 가상 메모리 페이지에 대하여 할당해제할 크기를 지정하도록 요청할 수 있는데, 이러한 경우에는 할당해제할 크기를 0으로 설정함으로써 기존의 가상 메모리 페이지를 그대로 유지한 상태로 새로운 가상 메모리 페이지를, 상기 기존의 가상 메모리 페이지가 매핑되어 있는 상기 물리 메모리 페이지로 매핑시킬 수 있다.You can request that the mapping function to the physical memory page of the virtual memory page provided by the system specify the size to be unallocated for the existing virtual memory page, such as mremap. In this case, set the size to be deallocated to 0 The new virtual memory page can be mapped to the physical memory page to which the existing virtual memory page is mapped while maintaining the existing virtual memory page as it is.

또한 시스템이 제공하는 가상 메모리 페이지의 물리 메모리 페이지로의 상기 매핑 함수 호출시, 새로운 가상 메모리 페이지를, 새로운 물리 메모리 페이지가 아닌 상기 기존의 가상 메모리 페이지가 매핑되어 있는 물리 메모리 페이지로 매핑될 수 있도록 하는 파라미터를 설정할 수 있다. 예를 들어 mmap 함수를 호출시 파라미터를 MAP_SHARED로 설정할 수 있다.In addition, at the time of the mapping function call to the physical memory page of the virtual memory page provided by the system, the new virtual memory page is mapped to the physical memory page to which the existing virtual memory page is mapped instead of the new physical memory page Can be set. For example, you can set the parameter to MAP_SHARED when calling the mmap function.

새로운 가상 메모리 페이지 내부에도, 페이지 내부 레드존을 설정하며(S405), 이에 대하여는 위 단계 S402에서 설명한 바와 동일하다.A page internal red zone is also set in the new virtual memory page (S405), which is the same as described in the above step S402.

상기 가상 메모리 페이지 이후 일정 영역에도, 페이지 단위 레드존을 설정하며(S406), 이에 대하여는 위 단계 S403에서 설명한 바와 동일하다.A page unit red zone is also set in a certain area after the virtual memory page (S406), and the same is the same as that described in the above step S403.

이후, 새로운 가상 메모리 페이지 설정시마다 상기 단계 S404 ~ 단계 S406을 수행한다.Thereafter, the above steps S404 to S406 are performed every time a new virtual memory page is set.

이와 같은 가상 메모리 페이지 매핑 후, 데이터(객체)의 상기 가상 메모리 접근(access)이 있을 경우, 접근하는 메모리 주소에 해당하는, 쉐도우 메모리 상의 접근금지여부 설정에 의하여 상기 데이터의 페이지 내부 레드존 접근에 의한 메모리 오류 발생 여부를 판별하여, 페이지 내부 레드존에의 접근이면 메모리 오류로 판단하여 메모리 접근을 불허하게 된다(S407).If there is the virtual memory access of the data (object) after the virtual memory page mapping as described above, access to the in-page red zone access of the data by the access prohibition setting on the shadow memory corresponding to the accessed memory address If it is determined that an access to the page internal red zone is determined, it is determined that the memory error is caused and the memory access is disabled (S407).

또는 전술한 바와 같이 데이터(객체)의 상기 페이지 단위 레드존에의 접근이 있을 경우에는, 쉐도우 메모리 상의 접근금지여부 설정을 체크할 필요없이, 신호 처리기(signal handler)에서 이를 감지하여 메모리 오류가 발생했음을 알려주게 되고, 이 경우 메모리 접근을 불허하게 된다(S408).Or if there is an access to the page-by-page red zone of the data (object) as described above, the signal handler detects the access prohibition on the shadow memory, In this case, the memory access is disabled (S408).

도 5는 프로토타입의 실행 성능을 나타내는 그래프이고, 도 6은 프로토타입의 퍼징(fuzzing) 성능을 나타내는 그래프이다.Fig. 5 is a graph showing the execution performance of the prototype, and Fig. 6 is a graph showing the fuzzing performance of the prototype.

본 발명의 프로토타입을 통해 성능 및 메모리 오류 검출 능력을 예측해 보았다. 도 5와 같이 기존 프로그램 대비 평균 21% 성능이 저하되었으며, 기존의 영역 기반 메모리 오류 감지 기법보다는 8%정도 성능이 저하되었다. 그러나, 도 6과 같이 퍼징을 하였을 때, 단위 시간당 메모리 오류 감지 능력은 평균 68% 향상 된 것으로 나타났다.Performance and memory error detection capabilities were predicted through the prototype of the present invention. As shown in FIG. 5, the performance of the conventional program is degraded by an average of 21%, and the performance of the conventional area-based memory error detection technique is degraded by about 8%. However, when purging is performed as shown in FIG. 6, the memory error detection capability per unit time is improved by an average of 68%.

10: 종래 방식의 가상 메모리
11: 객체
12: 레드존(red zone)
13: 격리된 메모리
14: 오류 객체가 라이트(write)된 부분
20: 쉐도우(shadow) 메모리
100: 본 발명의 방식의 가상 메모리
110: 객체
120: 레드존
130: 쉐도우 메모리
140: 가상 메모리 재사용
200: 본 발명의 방식의 가상 메모리
210: 매핑된 가상 메모리 페이지
211: 객체
212: 페이지 내부 레드존
220: 페이지 단위 레드존
230: 쉐도우 메모리
300: 물리 메모리
10: Conventional virtual memory
11: object
12: Red zone
13: Isolated memory
14: Written part of error object
20: Shadow memory
100: virtual memory of the scheme of the present invention
110: object
120: Red Zone
130: Shadow Memory
140: Reuse virtual memory
200: Virtual memory of the scheme of the present invention
210: Mapped Virtual Memory Pages
211: object
212: Inside the page Red Zone
220: Red Zone by page
230: Shadow Memory
300: physical memory

Claims (10)

데이터 접근시의 메모리 오류를 감지하는 방법으로서,
(a) 하나의 가상 메모리 페이지를 하나의 물리 메모리 페이지에 매핑하는 단계;
(b) 상기 가상 메모리 페이지 내부의 데이터 접근금지 영역(이하 '페이지 내부 레드존'이라 한다)을 설정하는 단계;
(c) 상기 가상 메모리 페이지 이후 일정 영역을 데이터 접근금지 영역(이하 '페이지 단위 레드존'이라 한다)으로 설정하는 단계;
(d) 상기 페이지 단위 레드존 이후 일정 영역을 새로운 가상 메모리 페이지로서 상기 물리 메모리 페이지에 매핑하는 단계;
(e) 상기 가상 메모리 페이지 내부에, 페이지 내부 레드존을 설정하는 단계;
(f) 상기 가상 메모리 페이지 이후 일정 영역에, 페이지 단위 레드존을 설정하는 단계; 및
(g) 새로운 가상 메모리 페이지 설정시마다 상기 단계(d) 내지 단계(f)를 수행하는 단계
를 포함하는 메모리 오류 감지 방법.
CLAIMS 1. A method for detecting a memory error during data access,
(a) mapping one virtual memory page to one physical memory page;
(b) setting a data access prohibition area (hereinafter referred to as " page internal red zone ") inside the virtual memory page;
(c) setting a certain area after the virtual memory page to a data access prohibition area (hereinafter referred to as a page unit red zone);
(d) mapping a certain area after the page unit red zone to the physical memory page as a new virtual memory page;
(e) setting a page internal red zone in the virtual memory page;
(f) setting a page unit red zone in a predetermined area after the virtual memory page; And
(g) performing the steps (d) to (f) each time a new virtual memory page is set up
≪ / RTI >
청구항 1에 있어서,
상기 단계(b) 및 단계(e)의 페이지 내부 레드존 설정은,
메모리 상의 일정 영역에 할당된 쉐도우(shadow) 메모리 영역에서, 각 메모리 주소의 접근 가능여부를 설정함으로써 이루어지는 것
을 특징으로 하는 메모리 오류 감지 방법.
The method according to claim 1,
The page internal red zone setting of the step (b) and the step (e)
By setting whether or not each memory address can be accessed in a shadow memory area allocated to a certain area on the memory
The memory error detection method comprising:
청구항 2에 있어서,
상기 각 메모리 주소의 접근 가능여부 설정은,
상기 쉐도우 메모리 영역에서, 각 메모리 주소에 해당하는 비트(bit)를 0 또는 1로 설정함에 의해 이루어지는 것
을 특징으로 하는 메모리 오류 감지 방법.
The method of claim 2,
The accessibility setting of each of the memory addresses may include:
In the shadow memory area, a bit corresponding to each memory address is set to 0 or 1
The memory error detection method comprising:
청구항 2에 있어서,
상기 쉐도우 메모리 영역은,
물리 메모리 및 가상 메모리 상에 동시에 설정되는 것
을 특징으로 하는 메모리 오류 감지 방법.
The method of claim 2,
Wherein the shadow memory area comprises:
Simultaneously set on physical memory and virtual memory
The memory error detection method comprising:
청구항 2에 있어서,
상기 단계(b) 이후,
(h) 데이터(객체)의 상기 가상 메모리 접근(access)이 있을 경우, 상기 접근하는 메모리 주소에 해당하는, 쉐도우 메모리 상의 접근금지여부 설정에 의하여 상기 데이터의 페이지 내부 레드존 접근에 의한 메모리 오류 발생 여부를 판별하는 단계
를 더 포함하는 것을 특징으로 하는 메모리 오류 감지 방법.
The method of claim 2,
After the step (b)
(h) When the virtual memory access of the data (object) is made, a memory error occurs due to access to the in-page red zone of the data by setting prohibition on the shadow memory corresponding to the accessed memory address Steps to determine whether
Further comprising the steps of:
청구항 1에 있어서,
상기 단계(c) 및 단계(f)의 상기 페이지 단위 레드존 설정은,
상기 쉐도우 메모리 상에 접근가능여부를 설정하거나 또는 추가적인 메모리 상에 접근가능여부를 설정하지 않고, 운영체제(OS)에 상기 페이지 단위 레드존에 대한 접근금지 영역 설정을 요청하여, 상기 운영체제의 상기 페이지 단위 레드존에 대한 접근금지 영역 설정에 의해 이루어지는 것
을 특징으로 하는 메모리 오류 감지 방법.
The method according to claim 1,
The page unit red zone setting in the step (c) and the step (f)
Requesting an operating system (OS) to set an access prohibited area for the page unit red zone, without setting accessibility on the shadow memory or setting accessibility on an additional memory, What is done by setting the prohibited zone for the red zone
The memory error detection method comprising:
청구항 6에 있어서,
상기 단계(c) 이후,
(i) 데이터(객체)의 상기 페이지 단위 레드존에의 접근이 있을 경우, 신호 처리기(signal handler)에서 이를 감지하여 메모리 오류가 발생했음을 알려주는 단계
를 더 포함하는 것을 특징으로 하는 메모리 오류 감지 방법.
The method of claim 6,
After step (c)
(i) if there is an access to the page-unit red zone of data (object), the signal handler detects this and notifies that a memory error has occurred
Further comprising the steps of:
청구항 1에 있어서,
상기 단계(a) 및 단계(d)에서,
가상 메모리 페이지의 물리 메모리 페이지로의 매핑은,
시스템이 제공하는 가상 메모리 페이지의 물리 메모리 페이지로의 매핑 함수를 호출함으로써 이루어지는 것
을 특징으로 하는 메모리 오류 감지 방법.
The method according to claim 1,
In steps (a) and (d) above,
The mapping of the virtual memory page to the physical memory page,
By calling a mapping function to the physical memory page of the virtual memory page provided by the system
The memory error detection method comprising:
청구항 8에 있어서,
상기 단계(d)에서,
시스템이 제공하는 가상 메모리 페이지의 물리 메모리 페이지로의 매핑 함수가, 기존의 가상 메모리 페이지에 대하여 할당해제할 크기를 지정하도록 요청하는 경우, 할당해제할 크기를 0으로 설정함으로써 기존의 가상 메모리 페이지를 그대로 유지한 상태로 새로운 가상 메모리 페이지를, 상기 기존의 가상 메모리 페이지가 매핑되어 있는 상기 물리 메모리 페이지로 매핑시킬 수 있는 것
을 특징으로 하는 메모리 오류 감지 방법.
The method of claim 8,
In the step (d)
If the mapping function of the virtual memory page provided by the system to the physical memory page requests to specify the size to be deallocated to the existing virtual memory page, The new virtual memory page can be mapped to the physical memory page to which the existing virtual memory page is mapped
The memory error detection method comprising:
청구항 9에 있어서,
상기 단계(d)에서,
시스템이 제공하는 가상 메모리 페이지의 물리 메모리 페이지로의 상기 매핑 함수 호출시, 새로운 가상 메모리 페이지를, 새로운 물리 메모리 페이지가 아닌 상기 기존의 가상 메모리 페이지가 매핑되어 있는 물리 메모리 페이지로 매핑될 수 있도록 하는 파라미터를 설정할 수 있는 것
을 특징으로 하는 메모리 오류 감지 방법.
The method of claim 9,
In the step (d)
When the mapping function is called to the physical memory page of the virtual memory page provided by the system, the new virtual memory page is mapped to the physical memory page to which the existing virtual memory page is mapped rather than the new physical memory page What parameters can be set
The memory error detection method comprising:
KR1020170165396A 2017-12-04 2017-12-04 Memory error detection method KR102044075B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170165396A KR102044075B1 (en) 2017-12-04 2017-12-04 Memory error detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170165396A KR102044075B1 (en) 2017-12-04 2017-12-04 Memory error detection method

Publications (2)

Publication Number Publication Date
KR20190065841A true KR20190065841A (en) 2019-06-12
KR102044075B1 KR102044075B1 (en) 2019-11-12

Family

ID=66846186

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170165396A KR102044075B1 (en) 2017-12-04 2017-12-04 Memory error detection method

Country Status (1)

Country Link
KR (1) KR102044075B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102299640B1 (en) * 2020-10-21 2021-09-08 한국과학기술원 Method and system for similarity analysis among kernel system calls using fuzz testing
CN113515405A (en) * 2021-07-09 2021-10-19 维沃移动通信有限公司 Address management method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102254159B1 (en) 2020-12-09 2021-05-18 연세대학교 산학협력단 Method for detecting real-time error in operating system kernel memory
KR102543663B1 (en) * 2021-07-29 2023-06-15 국방과학연구소 Software verification method of electronic apparatus

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080089002A (en) * 2007-03-30 2008-10-06 삼성전자주식회사 Method of controlling memory access

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080089002A (en) * 2007-03-30 2008-10-06 삼성전자주식회사 Method of controlling memory access

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
1. Serebryany, Konstantin, et al. "AddressSanitizer: A Fast Address Sanity Checker." USENIX Annual Technical Conference. 2012.
2. Microsoft Support. How to use pageheap.exe in windows xp, windows 2000, and windows server 2003. https://support.microsoft.com/en-us/kb/286470, 2009
Konstantin Serebryany 외 3인,'AddressSanitizer: A Fast Address Sanity Checker', USENIX Annual Technical Conference, June 2012* *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102299640B1 (en) * 2020-10-21 2021-09-08 한국과학기술원 Method and system for similarity analysis among kernel system calls using fuzz testing
CN113515405A (en) * 2021-07-09 2021-10-19 维沃移动通信有限公司 Address management method and device

Also Published As

Publication number Publication date
KR102044075B1 (en) 2019-11-12

Similar Documents

Publication Publication Date Title
EP3491520B1 (en) Controlling access to pages in a memory in a computing device
US8850158B2 (en) Apparatus for processing remote page fault and method thereof
US10169244B2 (en) Controlling access to pages in a memory in a computing device
US6775750B2 (en) System protection map
US8799879B2 (en) Method and apparatus for protecting translated code in a virtual machine
US8453015B2 (en) Memory allocation for crash dump
KR102044075B1 (en) Memory error detection method
EP3702924B1 (en) Technology for managing memory tags
US10031856B2 (en) Common pointers in unified virtual memory system
US8631170B2 (en) Memory overcommit by using an emulated IOMMU in a computer system with a host IOMMU
EP2472412B1 (en) Explicitly regioned memory organization in a network element
JP2015228227A (en) Computer readable program code logic, method, and system for facilitating storage management of computing environment supporting pageable guest
JP2008276763A (en) Memory error detection method
TW202008169A (en) Memory protection unit using memory protection table stored in memory system
JP7397057B2 (en) Binary search procedure for control tables stored in a memory system
US7562204B1 (en) Identifying and relocating relocatable kernel memory allocations in kernel non-relocatable memory
US8151086B2 (en) Early detection of an access to de-allocated memory
CN111373405B (en) Computer-implemented method for preventing bit flipping attacks in computing devices
WO2015161804A1 (en) Cache partitioning method and device
US7240179B1 (en) System, apparatus and method for reclaiming memory holes in memory composed of arbitrarily-sized memory devices
US20130262790A1 (en) Method, computer program and device for managing memory access in a multiprocessor architecture of numa type
JP2002049531A (en) Memory area border detecting method and computer system
US20120185741A1 (en) Apparatus and method for detecting a memory access error
CN115248718A (en) Memory data acquisition method and device and storage medium
KR20200066011A (en) Method and apparatus for protecting kernel without nested paging

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant