KR20190076217A - Apparatus and method for dynamic binary instrumentation using multi-core - Google Patents

Apparatus and method for dynamic binary instrumentation using multi-core Download PDF

Info

Publication number
KR20190076217A
KR20190076217A KR1020170177828A KR20170177828A KR20190076217A KR 20190076217 A KR20190076217 A KR 20190076217A KR 1020170177828 A KR1020170177828 A KR 1020170177828A KR 20170177828 A KR20170177828 A KR 20170177828A KR 20190076217 A KR20190076217 A KR 20190076217A
Authority
KR
South Korea
Prior art keywords
execution
breakpoint
code
core
instrument
Prior art date
Application number
KR1020170177828A
Other languages
Korean (ko)
Other versions
KR102462864B1 (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 KR1020170177828A priority Critical patent/KR102462864B1/en
Publication of KR20190076217A publication Critical patent/KR20190076217A/en
Application granted granted Critical
Publication of KR102462864B1 publication Critical patent/KR102462864B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Disclosed are a dynamic binary instrumentation device using multicores and a method thereof. The dynamic binary instrumentation method conducted by the dynamic binary instrumentation device using multicores comprises: a step of setting a break point in an executing core for executing an object program; a step of entering the break point and receiving a debugging event from the executing core in which the debugging event occurs; a step of identifying the break point in which the debugging event occurs, and executing an instrument code corresponding to the break point; a step of storing executing results of the instrument code; and a step of setting the break point in the next code block, and re-executing the executing core. Therefore, the dynamic binary instrumentation method can execute an instrument code for dynamic binary instrumentation (DBI) in a core which is not used by an object program in a multi-core CPU system, thereby efficiently utilizing the multi-core CPU system.

Description

멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치 및 방법{APPARATUS AND METHOD FOR DYNAMIC BINARY INSTRUMENTATION USING MULTI-CORE}[0001] APPARATUS AND METHOD FOR DYNAMIC BINARY INSTRUMENTATION USING MULTI-CORE [0002]

본 발명은 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 기술에 관한 것으로, 특히 인스트루멘트 코드(Instrument code)를 대상 프로그램의 바이너리에 삽입하지 않고, 다른 CPU 코어에서 실행하는 기술에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a dynamic binary instrumentation technique using a multicore, and more particularly to a technique for executing an instrument code in another CPU core without inserting an instrument code into a binary of a target program.

인스트루멘테이션(Instrumentation)은 대상 프로그램에 대한 특정 정보를 수집하고 분석하기 위하여, 부가적인 코드(Instrumentation code)를 대상 프로그램의 소스 코드나 바이너리에 삽입하는 것을 의미한다. Instrumentation refers to the insertion of additional instrumentation code into the source code or binary of the target program in order to collect and analyze specific information about the target program.

이때, 코드가 삽입되는 위치는 수집하고자 하는 정보의 종류에 따라 상이할 수 있으며, 특정 함수 호출 전, 특정 함수 호출 후, 특정 시스템 콜 전, 특정 시스템 콜 후, 특정 CPU 인스트럭션 전 또는 특정 CPU 인스트럭션 후 등 다양한 위치에 삽입될 수 있다. In this case, the position where the code is inserted may be different according to the type of information to be collected, and may be different depending on the type of the information to be collected, and may be different from a specific function call, And the like.

인스트루멘테이션 중 바이너리 인스트루멘테이션(Binary Instrumentation)은 대상 프로그램의 바이너리에 코드를 삽입하는 방식이다. 바이너리 인스트루멘테이션은 상용 제품이나 악성코드 등 소스 코드가 없는 프로그램을 분석하기 위한 인스트루멘테이션 방법으로 사용된다. Binary Instrumentation during instrumentation is a method of inserting code into the binary of the target program. Binary instrumentation is used as an instrumentation method for analyzing programs without source code, such as commercial products or malicious code.

바이너리 인스트루멘테이션은 Binary Instrumentation은 정적 바이너리 인스트루멘테이션(Static Binary Instrumentation, SBI)과 동적 바이너리 인스트루멘테이션(Dynamic Binary Instrumentation, DBI)으로 구분된다. SBI는 프로그램을 실행하기 전에 실행 파일을 디스어셈블(disassemble)하고, 디스어셈블한 코드에 인스트루멘트 코드를 삽입한다. 반면, DBI는 프로그램 실행 중에, 메모리에 로딩된 코드에 대해서 인스트루멘트 코드를 삽입하는 방법으로, 컴파일이나 링크를 새로 수행할 필요가 없이, 실행 중인 프로그램에 대해서 곧바로 사용할 수 있다. Binary Instrumentation is divided into Static Binary Instrumentation (SBI) and Dynamic Binary Instrumentation (DBI). SBI disassembles the executable file before inserting the program and inserts the instrument code into the disassembled code. DBI, on the other hand, inserts instrumentation code into memory-loaded code during program execution, and can be used immediately for running programs without having to compile or link.

대표적인 DBI 도구로는 pin, valgrind, dynamoRIO, bochs 등이 있다. pin, valgrind, dynamoRIO는 특정 프로그램(프로세스)에 대한 인스트루멘테이션 방법인 반면, bochs는 운영체제와 응용 프로그램을 포함하여 시스템 전체에 대한 인스트루멘테이션이 가능하다. 그러나 bochs는 에뮬레이터 상에서 실행해야 한다는 단점이 있다. Typical DBI tools include pin, valgrind, dynamoRIO, and bochs. While pin, valgrind, and dynamoRIO are instrumentation methods for specific programs (processes), bochs can instrument entire systems, including operating systems and applications. But bochs has the disadvantage of running on the emulator.

pin, valgrind, dynamoRIO가 사용하는, 프로세스 대상 인스트루멘테이션 방식은, 프로세스 기반 가상화 기술을 이용한 바이너리 번역(Translating) 방식의 인스트루멘테이션이다. 즉, DBI 도구를 통해 대상 프로그램을 실행시키면, 해당 프로그램이 직접 실행되는 것이 아니라, DBI 도구가 해당 바이너리 코드 블록을 읽고 실시간 번역(translation)을 수행하며, 번역된 코드가 실행된다. DBI는 번역 과정에서 대상 프로그램을 관찰하고 분석하는 코드가 삽입되어, 프로그램 코드 블럭과 함께 코드 블럭 전 또는 후에 삽입된 코드가 실행된다. The process instrumentation method used by pin, valgrind, and dynamoRIO is a translating method instrumentation using process-based virtualization technology. That is, when the target program is executed through the DBI tool, the DBI tool reads the corresponding binary code block, performs the translation in real time, and executes the translated code. In the DBI, the code for observing and analyzing the target program is inserted in the translation process, and the code inserted before or after the code block together with the program code block is executed.

DBI는 Taint Analysis, 난독화 해제, 쉘코드 탐지 등의 분야에서 인기를 얻고, DBI 도구를 이용한 기술이 많이 개발되었다. 그리고 DBI를 이용한 프로그램 분석 방법이 주목을 받으면서, DBI를 탐지하는 기법들도 많이 개발되었다. DBI has gained popularity in areas such as Taint Analysis, de-obfuscation, and shellcode detection, and many techniques have been developed using DBI tools. And, as the program analysis method using DBI gets attention, many techniques for detecting DBI have been developed.

상용 소프트웨어나 악성 코드는 DBI 탐지 기법을 통해서 자신이 DBI를 통해 분석되고 있다고 판단되면, 자신이 분석되지 않기 위해, 정상 실행과는 다른 실행을 보이게 된다. pin, valgrind, dynamoRIO와 같은 프로세스 대상 인스트루멘테이션은, 별도의 프로세스에서 원본 코드를 복사하고 번역 및 인스트루멘테이션 한 후 실행하는데, 프로세스 공간에서 복사된 원본 코드에 인스트루멘트 코드가 덧붙여지는 구조이다. 따라서 원본 코드와 인스트루멘트 코드는 같은 프로세스에서 실행되므로, 원본 코드에 인스트루멘트 코드를 탐지할 수 있는 기능이 있다면, 인스트루멘테이션 여부가 쉽게 탐지된다. If commercial software or malicious code is analyzed by DBI through DBI detection method, it will be executed differently from normal execution because it is not analyzed. A process target instrument such as pin, valgrind, or dynamoRIO is a structure in which instrument code is added to the original code copied in the process space, after the original code is copied, translated, and instrumented in a separate process. Thus, if the original code and the instrument code are executed in the same process, if the original code has the ability to detect the instrument code, the instrumentation is easily detected.

프로세스 대상 인스트루멘테이션에 대해서, 각 DBI 도구마다 인스트루멘트 코드가 보이는 특징이 정리되어 발표된 바 있다. Recon 2012에서 "Dynamic Binary Instrumentation Frameworks: I know you're there spying on me", BlackHat USA 2014에서 "Defeating the Transparency Features of Dynamic Binary Instrumentation" 그리고 "Anti-instrumentation techniques: I know you're there, Frida!"를 통해서 프로세스 기반 DBI 대상 탐지 기법이 공개되었다. 또한 Bochs 에뮬레이터를 이용해 시스템 전체를 인스트루멘테이션하는 방법에 대해서는 Bochs 에뮬레이터 환경을 탐지하는 많은 방법이 이미 공개되었다.For the instrumentation of the process target, the characteristics of the instrument code are listed and announced for each DBI tool. "I know you're there spying on me" at Recon 2012, "Defeating the Transparency Features of Dynamic Binary Instrumentation" and "Anti-instrumentation techniques: I know you're there, Frida! "A process-based DBI object detection technique. There are also a number of ways to detect the Bochs emulator environment in terms of instrumenting the entire system with the Bochs emulator.

즉, 프로세스 대상 인스트루멘테이션이 탐지되는 근본적인 이유는, 하나의 프로세스 주소 공간에 대상 프로그램 코드와 인스트루멘트 코드가 같이 존재하기 때문이다. 같은 프로세스 공간에 있으므로, 원본 프로그램 코드가 인스트루멘트 코드에 대해서 접근이 가능하고, 인스트루멘트 코드를 읽고 분석하여 DBI 특징을 찾아낼 수 있는 것이다. That is, the fundamental reason for the detection of the process target instrumentation is that the target program code and the instrument code coexist in a single process address space. Because it is in the same process space, the original program code can access the instrument code and read and analyze the instrument code to find the DBI feature.

반면, Bochs 에뮬레이터 기반 인스트루멘테이션은 코드를 덧붙이는 방식이 아니라, 에뮬레이터가 대상 프로그램 코드를 실행할 때, 특정 코드 블럭을 만나면 에뮬레이터가 인스트루멘트 코드를 실행해 주는 방식이다. 이러한 점으로 인하여 Bochs 에뮬레이터 기반 인스트루멘테이션에는 기존의 DBI 탐지 방법을 적용할 수는 없다. 그러나 Bochs 에뮬레이터 자체를 탐지하는 방법은 이미 많이 공개되어 있으며, 이러한 에뮬레이터 탐지 방법을 사용하면 간단히 에뮬레이터 기반 인스트루멘테이션을 탐지할 수 있다. Bochs emulator-based instrumentation, on the other hand, is not a way of adding code, but rather a way in which the emulator executes instrument code when it encounters a particular code block when it executes the target program code. Because of this, existing DBI detection methods can not be applied to Bochs emulator-based instrumentation. However, there are already plenty of ways to detect the Bochs emulator itself, and using these emulator detection methods can easily detect emulator-based instrumentation.

따라서, 기존의 동적 바이너리 인스트루멘테이션 방식이 원본 코드와 인스트루멘트 코드를 같은 프로세스의 주소 공간에 로딩함으로써, 대상 프로그램에 의해 탐지되는 문제를 해결할 수 있는 기술의 개발이 필요하다. Therefore, it is necessary to develop a technology that can solve the problem detected by the target program by loading the original code and the instrument code into the address space of the same process in the existing dynamic binary instrumentation method.

한국 공개 특허 제 10-2017-0055933 호, 2017년 05월 22일 공개(명칭: 정적 바이너리 계측을 사용하여 커널 제어-흐름 무결성을 보호하기 위한 방법 및 장치)Korean Patent Publication No. 10-2017-0055933, published May 22, 2017 (titled: Method and Apparatus for Kernel Control-Flow Integrity Protection Using Static Binary Metering)

본 발명의 목적은 기존의 동적 바이너리 인스트루멘테이션(DBI) 방식이 원본 코드와 인스트루멘트 코드를 같은 프로세스의 주소 공간에 로딩함으로써, 대상 프로그램에 의해 탐지되는 문제를 해결하는 것이다. It is an object of the present invention to solve the problem that a conventional dynamic binary instrumentation (DBI) method loads the original code and the instrument code into the address space of the same process and is detected by the target program.

또한, 본 발명의 목적은 대상 프로그램 코드에 변조를 가하지 않고, 대상 프로그램 실행과 인스트루멘테이션 실행 영역이 논리적 및 물리적으로 분리되도록 하여, 동적 바이너리 인스트루멘테이션(DBI) 여부가 탐지되지 않도록 하는 것이다. It is also an object of the present invention to ensure that the target program execution and the instrumentation execution region are logically and physically separated without modulating the target program code so that the dynamic binary instrumentation (DBI) is not detected.

또한, 본 발명의 목적은 멀티코어 CPU 시스템에서 대상 프로그램이 사용하지 않는 코어에 동적 바이너리 인스트루멘테이션(DBI)을 위한 인스트루멘트 코드를 실행하여, 멀티코어 CPU 시스템을 효율적으로 활용하는 것이다. It is also an object of the present invention to efficiently execute a multi-core CPU system by executinginstruction codes for dynamic binary instru- mentation (DBI) on a core not used by a target program in a multi-core CPU system.

상기한 목적을 달성하기 위한 본 발명에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치에 의해 수행되는 동적 바이너리 인스트루멘테이션 방법은, 대상 프로그램을 실행하는 실행 코어에 브레이크 포인트를 설정하는 단계, 상기 브레이크 포인트에 진입하여 디버그 이벤트를 발생한 상기 실행 코어로부터, 상기 디버그 이벤트를 수신하는 단계, 상기 디버그 이벤트가 발생한 상기 브레이크 포인트를 확인하고, 상기 브레이크 포인트에 상응하는 인스트루멘트 코드를 실행하는 단계, 상기 인스트루멘트 코드의 실행 결과를 저장하는 단계, 그리고 다음 코드 블록에 상기 브레이크 포인트를 설정하고, 상기 실행 코어를 재실행하는 단계를 포함한다. According to an aspect of the present invention, there is provided a method for dynamic binary instrumentation performed by a dynamic binary instrumentation apparatus using a multi-core, the method comprising: setting a breakpoint in an execution core executing a target program; Receiving the debug event from the execution core that generated the debug event, checking the breakpoint at which the debug event occurred, and executing an instrument code corresponding to the breakpoint, Storing the execution result, setting the breakpoint in the next code block, and re-executing the execution core.

이때, 상기 인스트루멘트 코드를 실행하는 단계는, 상기 실행 코어가 진입한 상기 브레이크 포인트에 상응하는 상기 인스트루멘트 코드를 검색하는 단계, 그리고 검색된 상기 인스트루멘트 코드를 메모리에 탑재하여 실행하는 단계를 포함할 수 있다. The execution of the instrument code may include retrieving the instrument code corresponding to the breakpoint entered by the execution core, loading the instrument code retrieved in the memory and executing the instru- ment code . ≪ / RTI >

이때, 상기 인스트루멘트 코드의 실행 결과를 저장하는 단계는, 실행코어 컨텍스트 읽기 명령, 인스트럭션 송신 명령, 인스트럭션 실행 명령 중 적어도 어느 하나에 대한 응답인 실행코어 컨텍스트 값 및 인스트럭션 실행 결과 중 적어도 어느 하나를 수집하여 저장할 수 있다. At this time, the step of storing the execution result of the instrument code may include at least one of an execution core context value which is a response to at least one of an execution core context read instruction, an instruction transmission instruction, and an instruction execution instruction and an instruction execution result Can be collected and stored.

이때, 상기 인스트루멘트 코드의 실행 결과를 저장하는 단계는, 상기 실행 코어가 진입한 상기 브레이크 포인트의 정보, 상기 브레이크 포인트의 개수, 상기 브레이크 포인트의 설정 여부 및 상기 브레이크 포인트의 설정값 중 적어도 어느 하나를 포함하는 상기 브레이크 포인트의 상태 정보를 수신하여 저장할 수 있다. At this time, the step of storing the execution result of the instrument code may include at least one of the information of the breakpoint, the number of the breakpoints, the setting of the breakpoint, and the setting value of the breakpoint And receive and store status information of the breakpoint including one of the breakpoints.

이때, 상기 다음 코드 블록에 상기 브레이크 포인트를 설정하고, 상기 실행 코어를 재실행하는 단계는, 상기 브레이크 포인트의 상태 정보 및 상기 메모리 중 적어도 어느 하나를 기반으로, 상기 다음 코드 블록의 위치를 계산하는 단계, 상기 인스트루멘트 코드를 실행한 현재의 상기 브레이크 포인트를 해제하는 단계, 상기 다음 코드 블록의 위치를 기반으로 상기 다음 코드 블록에 상기 브레이크 포인트를 설정하는 단계를 포함할 수 있다. The step of setting the breakpoint in the next code block and re-executing the execution core may include calculating the position of the next code block based on at least one of the state information of the breakpoint and the memory , Releasing the current breakpoint that executed the instrument code, and setting the breakpoint in the next code block based on the location of the next code block.

이때, 상기 코드 블록은, 기본 블록 단위, 인스트럭션 단위, 함수 단위 및 이미지 단위 중 적어도 어느 하나인 인스트루멘트 단위일 수 있다. In this case, the code block may be an instrument unit that is at least one of a basic block unit, an instruction unit, a function unit, and an image unit.

이때, 상기 디버그 이벤트 발생 시, 상기 실행 코어를 정지 모드(Halt mode)로 전환하는 단계, 그리고 상기 다음 코드 블록에 상기 브레이크 포인트를 설정한 후, 상기 실행 코어를 정상 모드(Normal mode)로 전환하여 상기 실행 코어를 재실행하는 단계를 더 포함할 수 있다. In this case, when the debug event occurs, the execution core is switched to a halt mode, and after setting the breakpoint in the next code block, the execution core is switched to a normal mode And re-executing the execution core.

이때, 상기 대상 프로그램의 마지막 코드를 실행할 때까지, 상기 다음 코드 블록에 상기 브레이크 포인트를 설정한 후 상기 실행 코어를 재실행하는 단계를 반복하여 수행할 수 있다. At this time, it is possible to repeat the step of re-executing the execution core after setting the break point in the next code block until the last code of the target program is executed.

이때, 상기 브레이크 포인트를 설정하는 단계는, 상기 실행 코어에 하나 이상의 하드웨어 브레이크 포인트를 설정할 수 있다. At this time, the setting of the breakpoint may set one or more hardware breakpoints in the execution core.

또한, 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는, 대상 프로그램을 실행하는 실행 코어에 브레이크 포인트를 설정하고, 상기 브레이크 포인트에 진입하여 디버그 이벤트를 발생한 상기 실행 코어로부터, 상기 디버그 이벤트를 수신하는 실행 코어 제어부, 그리고 상기 디버그 이벤트가 발생한 상기 브레이크 포인트를 확인하고, 상기 브레이크 포인트에 상응하는 인스트루멘트 코드를 실행하며, 상기 인스트루멘트 코드의 실행 결과를 저장하고, 다음 코드 블록에 상기 브레이크 포인트를 설정하며, 상기 실행 코어를 재실행하는 인스트루멘트 실행부를 포함한다. According to another aspect of the present invention, there is provided a dynamic binary instrumentation apparatus using a multicore, the method comprising: setting a breakpoint in an execution core that executes a target program; determining, from the execution core that has generated a debug event, An execution core control unit for receiving a debug event, checking the breakpoint at which the debug event occurs, executing an instruction code corresponding to the breakpoint, storing the execution result of the instruction code, And an instruction execution unit for setting the break point in the block and re-executing the execution core.

이때, 상기 인스트루멘트 실행부는, 상기 실행 코어가 진입한 상기 브레이크 포인트에 상응하는 상기 인스트루멘트 코드를 검색하는 인스트루멘트 코드 검색 모듈, 그리고 검색된 상기 인스트루멘트 코드를 메모리에 탑재하여 실행하는 인스트루멘트 코드 실행 모듈을 포함할 수 있다. The instrument execution unit may include an instrument code search module that searches for the instrument code corresponding to the break point entered by the execution core, and the instrument code loaded in the memory and executes the instrumement code And an instrument code execution module.

이때, 상기 인스트루멘트 코드 실행 모듈은, 실행코어 컨텍스트 읽기 명령, 인스트럭션 송신 명령, 인스트럭션 실행 명령 중 적어도 어느 하나에 대한 응답인 실행코어 컨텍스트 값 및 인스트럭션 실행 결과 중 적어도 어느 하나를 수집하여 저장할 수 있다. At this time, the instrument code execution module may collect and store at least one of an execution core context value that is a response to at least one of an execution core context read command, an instruction transmission instruction, and an instruction execution instruction, and an instruction execution result .

이때, 상기 인스트루멘트 실행부는, 상기 실행 코어가 진입한 상기 브레이크 포인트의 정보, 상기 브레이크 포인트의 개수, 상기 브레이크 포인트의 설정 여부 및 상기 브레이크 포인트의 설정값 중 적어도 어느 하나를 포함하는 상기 브레이크 포인트의 상태 정보를 수신하여 저장하는 코드 블록 제어 모듈을 더 포함할 수 있다. At this time, the instrument execution unit may include at least one of the breakpoints including at least one of the breakpoint information on which the execution core has entered, the number of breakpoints, the setting of the breakpoint, And a code block control module for receiving and storing status information of the mobile terminal.

이때, 상기 코드 블록 제어 모듈은, 상기 브레이크 포인트의 상태 정보 및 상기 메모리 중 적어도 어느 하나를 기반으로 상기 다음 코드 블록의 위치를 계산하고, 상기 인스트루멘트 코드를 실행한 현재의 상기 브레이크 포인트를 해제하며, 상기 다음 코드 블록의 위치를 기반으로 상기 다음 코드 블록에 상기 브레이크 포인트를 설정할 수 있다. Here, the code block control module may calculate the position of the next code block based on at least one of the state information of the breakpoint and the memory, and may cancel the current break point that executed the instruction code And set the breakpoint in the next code block based on the location of the next code block.

이때, 상기 코드 블록은, 기본 블록 단위, 인스트럭션 단위, 함수 단위 및 이미지 단위 중 적어도 어느 하나인 인스트루멘트 단위일 수 있다. In this case, the code block may be an instrument unit that is at least one of a basic block unit, an instruction unit, a function unit, and an image unit.

이때, 상기 실행 코어 제어부는, 상기 디버그 이벤트 발생 시 상기 실행 코어를 정지 모드(Halt mode)로 전환하고, 상기 다음 코드 블록에 상기 브레이크 포인트를 설정한 후, 상기 실행 코어를 정상 모드(Normal mode)로 전환하여 상기 실행 코어를 재실행할 수 있다. At this time, the execution core controller switches the execution core to a halt mode when the debug event occurs, sets the breakpoint in the next code block, The execution core can be re-executed.

이때, 상기 실행 코어 제어부는, 상기 대상 프로그램의 마지막 코드를 실행할 때까지, 상기 다음 코드 블록에 상기 브레이크 포인트를 설정한 후 상기 실행 코어를 재실행하는 과정을 반복하여 수행할 수 있다. At this time, the execution core control unit may repeat the process of re-executing the execution core after setting the break point in the next code block until the last code of the target program is executed.

이때, 상기 실행 코어에는 하나 이상의 하드웨어 브레이크 포인트가 설정될 수 있다. At this time, one or more hardware breakpoints may be set in the execution core.

또한, 본 발명의 또 다른 실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는, 복수의 코어들 중에서 대상 프로그램을 실행하는 실행 코어에 브레이크 포인트를 설정하고, 상기 실행 코어의 온 칩 디버그 로직을 이용하여, 상기 브레이크 포인트에 진입하여 디버그 이벤트를 발생한 상기 실행 코어로부터 상기 디버그 이벤트를 수신하는 실행 코어 제어부, 상기 디버그 이벤트가 발생한 상기 브레이크 포인트에 상응하는 인스트루멘트 코드를 검색하는 인스트루멘트 코드 검색부, 검색된 상기 인스트루멘트 코드를 실행하고, 상기 인스트루멘트 코드의 실행 결과를 저장하는 인스트루멘트 코드 실행부, 그리고 다음 코드 블록의 위치를 계산하고, 상기 다음 코드 블록에 상기 브레이크 포인트를 설정하는 코드 블록 제어부를 포함한다. According to another aspect of the present invention, there is provided a dynamic binary instrumentation apparatus using a multicore, comprising: a breakpoint setting unit that sets a breakpoint in an execution core that executes a target program among a plurality of cores, An execution core controller for entering the breakpoint and receiving the debug event from the execution core which has generated a debug event, an instrument code search unit for searching for an instrument code corresponding to the break point at which the debug event occurred, An instrument code execution unit for executing the searched instrument code and storing the result of execution of the instrument code, and calculating the position of the next code block and setting the breakpoint in the next code block Code block control included The.

이때, 상기 실행 코어 제어부는, 상기 실행 코어가 상기 브레이크 포인트에 진입한 경우 상기 실행 코어를 정지 모드(Halt mode)로 전환하고, 인스트루멘트 코어에서 상기 브레이크 포인트에 상응하는 상기 인스트루멘트 코드를 실행하며, 상기 인스트루멘트 코드의 실행을 종료한 후 상기 실행 코어를 정상 모드(Normal mode)로 전환할 수 있다. At this time, the execution core control unit switches the execution core to the halt mode when the execution core enters the break point, and the execution code corresponding to the break point in the instrument core After the execution of the instrument code is completed, the execution core can be switched to the normal mode.

본 발명에 따르면, 기존의 동적 바이너리 인스트루멘테이션(DBI) 방식이 원본 코드와 인스트루멘트 코드를 같은 프로세스의 주소 공간에 로딩함으로써, 대상 프로그램에 의해 탐지되는 문제를 해결할 수 있다. According to the present invention, the conventional dynamic binary instru- ment (DBI) method can solve the problem of being detected by the target program by loading the source code and the instrument code into the address space of the same process.

또한 본 발명에 따르면, 대상 프로그램 코드에 변조를 가하지 않고, 대상 프로그램 실행과 인스트루멘테이션 실행 영역이 논리적 및 물리적으로 분리되도록 하여, 동적 바이너리 인스트루멘테이션(DBI) 여부가 탐지되지 않도록 할 수 있다. Further, according to the present invention, the target program execution and the execution execution area can be logically and physically separated without modulating the target program code, so that the dynamic binary instrumentation (DBI) can be prevented from being detected.

또한 본 발명에 따르면, 멀티코어 CPU 시스템에서 대상 프로그램이 사용하지 않는 코어에 동적 바이너리 인스트루멘테이션(DBI)을 위한 인스트루멘트 코드를 실행하여, 멀티코어 CPU 시스템을 효율적으로 활용할 수 있다. Further, according to the present invention, it is possible to utilize the multi-core CPU system efficiently by executing theinstruction code for the dynamic binaryinstruction (DBI) on the core that is not used by the target program in the multicore CPU system.

도 1은 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치가 적용되는 환경을 개략적으로 나타낸 도면이다.
도2는 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치의 구성을 나타낸 블록도이다.
도 3은 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법을 설명하기 위한 순서도이다.
도 4는 도 3의 S360 단계에서 다음 코드 블록에 브레이크 포인트를 설정하는 방법을 설명하기 위한 순서도이다.
도 5는 본 발명의 일실시예에 따른 실행 코어를 제어하는 방법을 설명하기 위한 도면이다.
도 6은 본 발명의 또 다른 실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치가 적용된 인스트루멘트 코어를 나타낸 도면이다.
1 is a diagram schematically illustrating an environment to which a dynamic binary instrumentation apparatus using a multicore according to an embodiment of the present invention is applied.
2 is a block diagram illustrating a configuration of a dynamic binary instrumentation apparatus using a multicore according to an embodiment of the present invention.
3 is a flowchart illustrating a dynamic binary instrumentation method using a multicore according to an embodiment of the present invention.
FIG. 4 is a flowchart illustrating a method of setting a break point in a next code block in step S360 of FIG.
5 is a diagram for explaining a method of controlling an execution core according to an embodiment of the present invention.
6 is a diagram illustrating an instrument core to which a dynamic binary instrumentation apparatus using a multicore according to another embodiment of the present invention is applied.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시 예들을 도면에 예시하고 상세하게 설명하고자 한다.While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail.

그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가진 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the relevant art and are to be interpreted in an ideal or overly formal sense unless explicitly defined in the present application Do not.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 전체적인 이해를 용이하게 하기 위하여 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In order to facilitate the understanding of the present invention, the same reference numerals are used for the same constituent elements in the drawings and redundant explanations for the same constituent elements are omitted.

도 1은 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치가 적용되는 환경을 개략적으로 나타낸 도면이다. 1 is a diagram schematically illustrating an environment to which a dynamic binary instrumentation apparatus using a multicore according to an embodiment of the present invention is applied.

도 1에 도시한 바와 같이, 멀티 코어 CPU 시스템에서, 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 하나 이상의 인스트루멘트 코어(20)에 적용되며, 대상 프로그램 코드를 실행하는 하나 이상의 실행 코어(10)에 대한 코어 제어 기능을 수행할 수 있다. 1, in a multi-core CPU system, a dynamic binary instrumentation apparatus 200 using a multicore according to an embodiment of the present invention is applied to one or more instrument core 20, The core control functions for one or more execution cores 10 executing the core control functions.

멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 실행 코어(10)가 대상 프로그램을 실행하는 중에, 메모리에 로딩된 코드에 대하여 인스트루멘트 코드를 삽입하는 동적 바이너리 인스트루멘테이션(Dynamic Binary Instrumentation, DBI) 도구이다. The dynamic binary instrumentation apparatus 200 using a multicore includes a Dynamic Binary Instrumentation (DBI) tool, which inserts an instrument code into a code loaded in a memory while the execution core 10 executes a target program to be.

DBI는 대상 프로그램의 프로세스가 코드를 직접 실행하는 것이 아니라, DBI 도구에 의해 별도의 프로세스(process)가 생성되고, 생성된 별도의 프로세스가 대상 프로그램의 코드 블록을 복사한 후, 복사한 코드 블록을 번역하고 인스트루멘테이션 한 후 실행하는 구조이다. In DBI, the process of the target program does not directly execute the code, but a separate process is created by the DBI tool, and the generated separate process copies the code block of the target program, It is a structure that is translated and instrumented and then executed.

이때, 별도의 프로세스에서 코드 블록에 복사되어 저장되는 메모리 영역을 일반적으로 코드 캐시(Code Cache)라고 부른다. 코드 캐시에는 대상 프로그램의 모든 코드가 복사되어 저장되는 것이 아니라, 코드 실행 경로에 따라서 특정 코드 블록을 읽어온 후 인스트루멘테이션하여 실행하고, 다음에 실행해야 할 코드 블록을 읽어온 후 인스트루멘테이션하고 실행하는 과정을 반복하여 수행함에 따라 코드 캐시에 인스트루멘테이션된 코드 블록이 누적되게 된다. 그리고 이미 읽어온 코드 블록이 코드 캐시에 존재하는 경우, 코드 캐시에 저장되어 있는 코드 블록이 실행된다. At this time, a memory area copied and stored in a code block in a separate process is generally called a code cache. In the code cache, not all the code of the target program is copied and stored. Instead, a specific code block is read according to the execution path of the code, then instrumented and executed. Then, the code block to be executed is read and then instrumented and executed By repeatedly performing, the instrumented code blocks are accumulated in the code cache. If the code block already read is present in the code cache, the code block stored in the code cache is executed.

그리고 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 대상 프로그램이 실행되는 CPU 코어인 실행 코어(10)와 다른 CPU 코어인 인스트루멘트 코어(20)에서 동작한다. The dynamic binary instrumentation apparatus 200 using a multicore according to an embodiment of the present invention operates in the instruction core 20, which is a CPU core different from the execution core 10, which is a CPU core in which a target program is executed.

이를 통하여, 대상 프로그램 코드에 변조를 가하지 않고, 대상 프로그램 실행 영역과 인스트루멘테이션 실행 영역을 논리적 및 물리적으로 분리할 수 있으며, 대상 프로그램이 DBI 여부를 탐지하지 못하도록 할 수 있다. This makes it possible to logically and physically separate the target program execution area and the instrumentation execution area without modulating the target program code and prevent the target program from detecting the DBI.

최근, 모바일 분야 및 데스크탑 PC 분야에서, CPU의 성능을 향상시키기 위하여, CPU 코어의 개수를 증가하는 방법을 사용하고 있다. 특히, 퀄컴, 삼성, 화웨이 등 모바일 CPU 제조사는 하나의 CPU에 8개 내지 10개의 코어를 탑재하고, 애플 또한 최근 A11 bionic CPU에 6개의 코어를 탑재하여 출시하였다. 데스크톱과 서버 제품에서 AMD는 최대 32코어 CPU를, 인텔은 최대 28코어 CPU를 2017년에 출시하였다. 하드웨어 분야에서 코어 개수가 빠르게 증가하는 데 반해, 소프트웨어는 멀티코어 하드웨어를 효율적으로 활용하고 있지 못하다. Recently, in the field of mobile field and desktop PC, a method of increasing the number of CPU cores is used to improve the performance of the CPU. In particular, mobile CPU makers such as Qualcomm, Samsung, and Huawei have 8 to 10 cores on one CPU, and Apple recently released 6 cores on A11 bionic CPUs. In desktop and server products, AMD released up to 32-core CPUs and Intel released 28-core CPUs in 2017. While the number of cores is increasing rapidly in the hardware field, software is not making efficient use of multicore hardware.

그러나, 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 사용되지 않는 CPU 코어를 인스트루멘트 코어(20) 상에서 동작하여, 멀티 코어 구조를 적극 활용할 수 있다. 또한, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 인스트루멘트 코드를 대상 프로그램이 실행되는 영역과 논리적 및 물리적으로 분리된 영역에서 실행하고, 이를 통하여 대상 프로그램이 DBI 여부를 탐지하지 못하도록 할 수 있다. However, the dynamic binary instrumentation apparatus 200 using a multicore according to an embodiment of the present invention can operate an unused CPU core on the instruction core 20, thereby taking advantage of the multicore structure. In addition, the dynamic binary instrumentation apparatus 200 using the multicore executes the instrument code in an area logically and physically separated from the area in which the target program is executed, thereby preventing the target program from detecting the DBI have.

또한, 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 가상화 기술이나 에뮬레이터를 사용하지 않으므로, 에뮬레이터 탐지에 의해서도 DBI가 탐지되지 않을 수 있다. Also, since the dynamic binary instrumentation apparatus 200 using the multicore according to an embodiment of the present invention does not use a virtualization technique or an emulator, the DBI may not be detected even by the emulator detection.

이하에서는 도 2를 통하여 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치의 구성에 대하여 더욱 상세하게 설명한다. Hereinafter, a configuration of a dynamic binary instrumentation apparatus using a multicore according to an embodiment of the present invention will be described in detail with reference to FIG.

도2는 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치의 구성을 나타낸 블록도이다. 2 is a block diagram illustrating a configuration of a dynamic binary instrumentation apparatus using a multicore according to an embodiment of the present invention.

도 2에 도시한 바와 같이, 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 실행 코어 제어부(210), 인스트루멘트 코드 검색부(220), 인스트루멘트 코드 실행부(230), 코드 블록 제어부(240)를 포함한다. 2, a dynamic binary instrumentation apparatus 200 using a multicore according to an embodiment of the present invention includes an execution core control unit 210, an instrument code search unit 220, an instrument code execution unit Unit 230, and a code block control unit 240.

먼저, 실행 코어 제어부(210)는 대상 프로그램 코드를 실행하는 CPU 코어인 실행 코어를 제어한다. 이때, 실행 코어 제어부(210)는 ARM 32/64 비트, 인텔 32/64 비트, Freescale 32/64 비트 등과 같이, CPU 아키텍처에 따라 실행 코어를 제어하기 위한 제어 데이터를 생성하고, 실행 코어로부터 수신한 코어 상태 데이터(상태 정보)를 해석할 수 있다. First, the execution core control unit 210 controls an execution core which is a CPU core executing the target program code. At this time, the execution core control unit 210 generates control data for controlling the execution core according to the CPU architecture, such as ARM 32/64 bit, Intel 32/64 bit, Freescale 32/64 bit, The core state data (state information) can be interpreted.

실행 코어 제어부(210)는 대상 프로그램을 실행하는 실행 코어에 브레이크 포인트(Breakpoint)를 설정하고, 실행 코어가 브레이크 포인트에 진입한 경우 디버그 이벤트를 발생시킨다. 그리고 실행 코어 제어부(210)는 실행 코어로부터 발생한 디버그 이벤트를 수신하고, 해당 실행 코어의 실행 모드를 정지 모드로 전환할 수 있다. The execution core control unit 210 sets a breakpoint in the execution core executing the target program, and generates a debug event when the execution core enters the break point. The execution core control unit 210 receives the debug event generated from the execution core, and can switch the execution mode of the execution core to the stop mode.

실행 코어 제어부(210)는 인스트럭션 브레이크 포인트(Instruction-breakpoint) 및 데이터 브레이크 포인트(Data-breakpoint) 중 적어도 어느 하나를 포함하는 브레이크 포인트(Breakpoint)를 설정하거나 해제하고, 실행 코어(10)의 레지스터, 캐시, 메모리, 온 칩 하드웨어의 코어 컨텍스트 값을 읽고 쓸 수 있다. 또한, 실행 코어 제어부(210)는 실행 코어로 인스트럭션을 전송하여 실행시키고, 디버그 이벤트를 관리할 수 있다. The execution core control unit 210 sets or releases a breakpoint including at least one of an instruction breakpoint and a data breakpoint and sets a breakpoint including a register, You can read and write core context values for cache, memory, and on-chip hardware. In addition, the execution core control unit 210 can transmit and execute instructions to the execution core and manage the debug events.

그리고 실행 코어 제어부(210)는 실행 코어의 실행 모드를 전환할 수 있다. 디버그 이벤트가 발생한 경우, 실행 코어 제어부(210)는 디버그 이벤트가 발생한 실행 코어를 정지 모드(Halt mode)로 전환하여, 실행 코어의 실행을 정지할 수 있다. The execution core control unit 210 can switch the execution mode of the execution core. When a debug event occurs, the execution core control unit 210 can stop the execution core by switching the execution core in which the debug event has occurred to the halt mode.

또한, 실행 코어 제어부(210)는 인스트루멘트 코드의 실행이 종료된 후, 실행 코어의 모드를 정상 모드(Normal mode)로 전환하고, 실행이 중지된 실행 코어를 재실행할 수 있다. 이때, 다음 코드 블록에 브레이크 포인트를 설정하는 과정을 수행한 후, 실행 코어 제어부(210)는 실행 코어를 정상 모드로 전환하여, 실행 코어를 재실행할 수 있다. Also, after the execution of the instrument code is completed, the execution core control unit 210 can switch the mode of the execution core to the normal mode and re-execute the execution core whose execution has been suspended. At this time, after the process of setting the breakpoint in the next code block, the execution core control unit 210 can switch the execution core into the normal mode and re-execute the execution core.

그리고 실행 코어 제어부(210)는 대상 프로그램의 마지막 코드를 실행할 때까지, 다음 코드 블록에 브레이크 포인트를 설정한 후 실행 코어를 재실행하는 과정을 반복하여 수행할 수 있다. The execution core control unit 210 may repeat the process of re-executing the execution core after setting a break point in the next code block until the last code of the target program is executed.

다음으로 인스트루멘트 코드 검색부(220)는 실행 코어가 진입한 브레이크 포인트에 상응하는 인스트루멘트 코드를 검색한다. Next, the instrument code searching unit 220 searches for the instrument code corresponding to the break point entered by the execution core.

실행 코어가 인스트루멘트 지점인 브레이크 포인트 지점에 도달한 경우, 실행 코어의 위치, 인스트루멘트 지점의 주소, 실행 코어 컨텍스트 중 적어도 어느 하나를 포함하는 실행 코어 브레이크 정보를 실행 코어 제어부(210)로부터 전달받을 수 있다. When the execution core reaches the break point point, which is an instrument point, execution core break information including at least one of the position of the execution core, the address of the instrument point, and the execution core context is transmitted from the execution core control unit 210 Can be delivered.

그리고 인스트루멘트 코드 검색부(220)는 실행 코어 브레이크 정보를 이용하여, 해당 인스트루멘트 지점에 상응하는 인스트루멘트 코드를 검색하고, 검색된 인스트루멘트 코드를 후술할 인스트루멘트 코드 실행부(230)로 전달한다. The instrument code searching unit 220 searches the instrument code corresponding to the instrument point by using the execution core break information and outputs the instrument code to the instrument code execution unit 230).

인스트루멘트 코드는 메모리나 하드디스크를 포함하는 저장 장치에 저장될 수 있으며, 코드 블록의 단위에 따라 상이한 형태로 저장될 수 있다. 예를 들어, 코드 블록이 인스트럭션 단위인 경우, 인스트루멘트 코드는 인스트럭션의 종류와 인스트럭션 전에 실행할지, 인스트럭션 후에 실행할지에 따라 달라질 수 있다. 즉, Load, Store, Move, Or, Xor, Call, Return 등의 인스트럭션에 대하여, 각기 다른 인스트루멘트 코드를 사용할 수 있다. The instrument code may be stored in a storage device including a memory or a hard disk, and may be stored in a different form depending on the unit of the code block. For example, if the code block is an instruction unit, the instrument code may vary depending on the type of instruction, whether it is executed before the instruction, or after the instruction. That is, different instrument codes can be used for instructions such as Load, Store, Move, Or, Xor, Call, and Return.

코드 블록의 단위가 함수 단위인 경우, 함수 진입 부분 및 함수 종료 부분이 인스트루멘트 지점이 될 수 있다. 함수 진입 부분에서 인스트루멘트 코드는 함수의 입력 인자 값을 읽을 수 있고, 함수 종료 부분에서 인스트루멘트 코드는 함수의 반환값을 읽고 저장할 수 있다. 또한, 함수에 따라 입력 인자의 개수, 반환 데이터의 종류가 상이할 수 있으며, 이에 따라 인스트루멘트 코드가 달라질 수 있다. If the unit of the code block is a function unit, the function entry portion and the function end portion can be instrument points. In the function entry section, the instrument code can read the input parameter value of the function, and at the end of the function, the instrument code can read and store the return value of the function. Also, depending on the function, the number of input parameters and the type of the return data may be different, and thus the instrument code may be different.

설명의 편의를 위하여, 코드 블록이 인스트럭션 단위 및 함수 단위인 경우에 대하여 설명하였으나 이에 한정하지 않고, 인스트루멘테이션의 목적에 따라 코드 블록의 단위 및 실행 코드의 특징은 다양한 형태로 설계 변경되어 구현될 수 있다. For convenience of explanation, the case where the code block is the instruction unit and the function unit has been described, but the present invention is not limited to this, and the unit of the code block and the characteristic of the execution code may be designed and modified in various forms according to the purpose of the instrumentation .

그리고 인스트루멘트 코드 실행부(230)는 검색된 인스트루멘트 코드를 메모리에 탑재하여 실행한다. 인스트루멘트 코드 실행부(230)는 인스트루멘트 코드 검색부(220)로부터 전달받은 인스트루멘트 코드를 시스템 메모리에 탑재하여 실행할 수 있다. Then, the instrument code execution unit 230 loads the instrument code found in the memory and executes the instru- ment code. The instrument code execution unit 230 can execute the instrument code stored in the system memory by loading the instrument code received from the instrument code search unit 220.

인스트루멘트 코드 실행부(230)는 인스트루멘트 코드의 구현에 따라, 실행코어 컨텍스트 읽기 명령, 인스트럭션 송신 명령, 인스트럭션 실행 명령 중 적어도 어느 하나의 명령을 실행 코어 제어부(210)로 전송하고, 명령에 대한 응답을 수신하여 저장할 수 있다. 이때, 인스트루멘트 코드 실행부(230)는 명령에 대한 응답으로 실행 코어 컨텍스트 값 및 인스트럭션 실행 결과 중 적어도 어느 하나를 수집하여 저장할 수 있다. The instruction code execution unit 230 transmits at least one of an execution core context read instruction, an instruction transmission instruction, and an instruction execution instruction to the execution core control unit 210 according to the implementation of the instruction code, Can be received and stored. At this time, the instrument code execution unit 230 may collect and store at least one of the executed core context value and the instruction execution result in response to the instruction.

인스트루멘트 코드 실행부(230)는 인스트루멘트 코드 실행 중에, 인스트루멘트 코드의 실행에 의해 수집 및 가공된 정보인 관찰 정보를 저장 장치에 저장할 수 있다. The instrument code execution unit 230 may store observation information, which is information collected and processed by execution of the instrument code, in the storage device during execution of the instrument code.

마지막으로 코드 블록 제어부(240)는 실행 코어가 진입한 브레이크 포인트의 정보(현재 인스트루멘트 지점의 정보), 브레이크 포인트의 개수, 브레이크 포인트의 설정 여부 및 브레이크 포인트의 설정값 중 적어도 어느 하나를 포함하는 브레이크 포인트의 상태 정보를 수신하여 저장할 수 있다. Finally, the code block controller 240 includes at least one of the information of the breakpoint (information of the current instrument point) entered by the execution core, the number of breakpoints, the setting of the breakpoint and the setting value of the breakpoint The status information of the breakpoint to be stored can be received and stored.

그리고 코드 블록 제어부(240)는 브레이크 포인트의 상태 정보 및 메모리 중 적어도 어느 하나를 기반으로, 현재 인스트루멘트 지점으로부터 다음 코드 블록의 위치를 계산한다. 또한, 코드 블록 제어부(240)는 인스트루멘트 코드를 실행한 현재의 브레이크 포인트를 해제한다. The code block controller 240 calculates the position of the next code block from the current instrument point based on at least one of the state information of the breakpoint and the memory. In addition, the code block control unit 240 releases the current break point in which the instrument code is executed.

코드 블록 제어부(240)는 다음 코드 블록의 위치를 기반으로, 다음 코드 블록에 브레이크 포인트를 설정할 수 있다. 이때, 코드 블록 제어부(240)는 다음 코드 블록에 설정할 브레이크 포인트의 정보를 실행 코어 제어부(210)로 전송하여 브레이크 포인트를 설정할 수 있다. The code block control unit 240 can set a break point in the next code block based on the position of the next code block. At this time, the code block control unit 240 can transmit the information of the break point to be set to the next code block to the execution core control unit 210 to set the break point.

코드 블록 제어부(240)는 브레이크 포인트의 타입, 브레이크 포인트가 설정될 주소, 사용할 브레이크 포인트 하드웨어 중 적어도 어느 하나의 정보를 포함하는 브레이크 포인트 설정 명령을 실행 코어 제어부(210)로 전송하여, 다음 코드 블록에 브레이크 포인트를 설정할 수 있다. The code block control unit 240 transmits a breakpoint setting command including information on at least one of the type of the break point, the address at which the break point is to be set and the break point hardware to be used to the execution core control unit 210, A breakpoint can be set.

여기서, 코드 블록은 기본 블록 단위, 인스트럭션 단위, 함수 단위 및 이미지 단위 중 적어도 어느 하나의 인스트루멘트 단위일 수 있다. Here, the code block may be an instrument unit of at least one of a basic block unit, an instruction unit, a function unit, and an image unit.

이하에서는 도 3 및 도 4를 통하여 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치에 의해 수행되는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법에 대하여 더욱 상세하게 설명한다. Hereinafter, a dynamic binary instrumentation method using a multicore, which is performed by a dynamic binary instrumentation apparatus using a multicore according to an embodiment of the present invention, will be described in detail with reference to FIG. 3 and FIG.

도 3은 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법을 설명하기 위한 순서도이다. 3 is a flowchart illustrating a dynamic binary instrumentation method using a multicore according to an embodiment of the present invention.

먼저, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 실행 코어에 브레이크 포인트를 설정한다(S310).First, the dynamic binary instrumentation apparatus 200 using a multicore sets a break point in an execution core (S310).

멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 대상 프로그램을 실행하는 실행 코어(10)에 인스트럭션 브레이크 포인트(instruction-breakpoint) 및 데이터 브레이크 포인트(data-breakpoint) 중 적어도 어느 하나를 포함하는 브레이크 포인트(Breakpoint)를 설정한다. The dynamic binary instrumentation apparatus 200 using a multicore includes a breakpoint (at least one of an instruction-breakpoint and a data-breakpoint) in an execution core 10 executing a target program Breakpoint).

그리고 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 실행 코어로부터 디버그 이벤트를 수신한다(S320). The dynamic binary instrumentation apparatus 200 using the multicore receives a debug event from the execution core (S320).

실행 코어(10)의 온 칩 디버그 로직은 브레이크 포인트에 상응하는 지점에서 디버그 이벤트를 발생시킨다. 예를 들어, 인스트럭션 브레이크 포인트가 설정된 특정 주소에 위치한 코드(인스트럭션)을 실행 코어(10)가 실행하고자 하는 경우, 온 칩 디버그 로직은 디버그 이벤트를 발생할 수 있다. The on-chip debug logic of the execution core 10 generates a debug event at a point corresponding to the breakpoint. For example, if the execution core 10 intends to execute a code (instruction) located at a specific address for which an instruction breakpoint is set, the on-chip debug logic may generate a debug event.

또한, 일반적으로 와치 포인트(watchpoint)라고 불리는 데이터 브레이크 포인트가 설정된 특정 주소의 데이터에 대해 읽기 명령(data load, data read) 또는 쓰기 명령(data store, data write)이 실행될 경우, 온 칩 디버그 로직은 디버그 이벤트를 발생할 수 있다. Also, when a data load, a data read, or a write instruction (data store, data write) is executed on data of a specific address, which is generally set as a data breakpoint called a watchpoint, Debug events can occur.

일반적으로 디버그 이벤트는 소프트웨어 이벤트 및 하드웨어 이벤트로 구분되며, 동일한 브레이크 포인트에 대하여 설정에 따라 소프트웨어 이벤트를 발생시키거나 하드웨어 이벤트를 발생시킬 수 있다. 본 발명에서는, 대상 프로그램의 코드 메모리를 변조해야 하는 소프트웨어 브레이크 포인트는 사용하지 않고, 하나 이상의 브레이크 포인트만 사용할 수 있다. 이때, 브레이크 포인트의 개수는 시스템에 구현된 CPU 코어의 온 칩 디버그 로직에 따라 달라질 수 있다. Generally, a debug event is classified into a software event and a hardware event, and a software event or a hardware event can be generated according to the setting for the same breakpoint. In the present invention, it is possible to use only one or more breakpoints without using a software breakpoint to modulate the code memory of the target program. At this time, the number of breakpoints may vary depending on the on-chip debug logic of the CPU core implemented in the system.

그리고 본 발명의 일 실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 실행 코어(10)의 온 칩 디버그 로직으로부터, 다른 코어로 전달이 가능하고, 다른 코어에서 처리가 가능한 하드웨어 이벤트를 수신할 수 있다. The dynamic binary instrumentation apparatus 200 using a multicore according to an embodiment of the present invention can perform a hardware event that can be transferred from the on-chip debug logic of the execution core 10 to another core, .

멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 실행 코어를 정지 모드로 전환한다(S330). The dynamic binary instrumentation apparatus 200 using the multicore switches the execution core into the stop mode (S330).

멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 디버그 이벤트가 발생한 경우, 해당 실행 코어(10)를 설정에 따라 정지 모드(Halt mode)로 전환하여 실행을 정지할 수 있다. 또한, 정지 모드에서는 대상 프로그램의 실행도 정지된다. When a debug event occurs, the dynamic binary instrumentation apparatus 200 using the multicore can stop execution by switching the execution core 10 to a halt mode according to the setting. In the stop mode, the execution of the target program is also stopped.

정상 모드(Normal mode)에서 디버그 이벤트는, 해당 실행 코어에서 실행되는 운영체제 등의 시스템 내부 소프트웨어에 의해 처리될 수 있다. 그러나 정지 모드에서는 해당 실행 코어(10)가 정지된 상태이므로, 발생된 디버그 이벤트는 다른 코어, 다른 CPU 또는 시스템 외부 하드웨어와 같이, 해당 실행 코어의 관점에서의 외부 장치에 의해 처리되어야 한다. In the normal mode, the debug event can be processed by the in-system software such as an operating system executed in the execution core. However, since the execution core 10 is stopped in the stop mode, the generated debug event must be processed by an external device in terms of the execution core, such as another core, another CPU, or external hardware of the system.

즉, 해당 실행 코어는 발생된 하드웨어 디버그 이벤트를 처리할 수 없으므로, 하드웨어 디버그 이벤트는 디버그 포트에 연결된 외부 하드웨어 장치가 처리하거나, 멀티프로세서 시스템의 다른 프로세서 또는 멀티코어 시스템의 다른 코어가 처리해야 한다. That is, the execution core can not process the generated hardware debug event, so the hardware debug event must be handled by an external hardware device connected to the debug port, or processed by another processor of the multiprocessor system or another core of the multicore system.

그리고 도 3의 S320 단계에서 디버그 이벤트가 발생하는 과정과 S330 단계에서 실행 코어(10)를 정지 모드(Halt mode)로 전환하는 과정은, 설명의 편의를 위하여 S320 단계 및 S330 단계로 구분한 것일 뿐, S320 단계 및 S330 단계는 동시에 수행될 수 있다. The process of generating the debug event in step S320 of FIG. 3 and the process of switching the execution core 10 to the halt mode in step S330 are divided into steps S320 and S330 for convenience of description , S320, and S330 may be performed simultaneously.

다음으로 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 인스트루멘트 코드를 실행한다(S340). Next, the dynamic binary instrumentation apparatus 200 using the multicore executes the instrument code (S340).

멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 수신한 브레이크 포인트에 해당하는 인스트루멘트 지점을 확인하고, 인스트루멘트 지점에 상응하는 인스트루멘트 코드를 검색한다. 그리고 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 검색된 인스트루멘트 코드를 실행한다. The dynamic binary instrumentation apparatus 200 using the multicore identifies an instrument point corresponding to the received break point and retrieves an instrument code corresponding to the instrument point. The dynamic binary instrumentation apparatus 200 using the multicore executes the retrieved instrument code.

그리고 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 인스트루멘트 코드의 실행 결과를 저장한다(S350). The dynamic binary instrumentation apparatus 200 using the multicore stores the execution result of the instrument code (S350).

인스트루멘트 코드를 실행하면서, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 인스트루멘트 코드의 실행에 따라 수집되거나 가공된 관찰 정보를 저장할 수 있다. While executing the instrument code, the dynamic binary instrumentation apparatus 200 using the multicore can store observation information processed or collected according to the execution of the instrument code.

멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 다음 코드 블록에 브레이크 포인트를 설정한다(S360). The dynamic binary instrumentation apparatus 200 using the multicore sets a break point in the next code block (S360).

멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 현재의 브레이크 포인트가 발생한 지점인 인스트루멘트 지점을 기준으로, 다음 코드 블록의 위치를 계산한다. 그리고 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 다음 코드 블록에 브레이크 포인트를 설정할 수 있다. 이때, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 인스트루멘트 코드가 모두 실행된 후, S360 단계를 실행할 수 있다. The dynamic binary instrumentation apparatus 200 using the multicore calculates the position of the next code block based on the instru- ment point, which is the point at which the current breakpoint occurred. And the dynamic binary instrumentation apparatus 200 using the multicore can set a break point in the next code block. At this time, the dynamic binary instrumentation apparatus 200 using multicore can execute step S360 after all of the instrument codes are executed.

도 4는 도 3의 S360 단계에서 다음 코드 블록에 브레이크 포인트를 설정하는 방법을 설명하기 위한 순서도이다. FIG. 4 is a flowchart illustrating a method of setting a break point in a next code block in step S360 of FIG.

도 4에 도시한 바와 같이, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 다음 코드 블록의 위치를 계산한다(S410). As shown in Fig. 4, the dynamic binary instrumentation apparatus 200 using multicore calculates the position of the next code block (S410).

그리고 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 현재의 브레이크 포인트를 해제한다(S420). Then, the dynamic binary instrumentation apparatus 200 using the multicore releases the current break point (S420).

현재의 브레이크 포인트를 해제한 후, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 다음 코드 블록에 브레이크 포인트를 설정할 수 있다(S430). After releasing the current breakpoint, the dynamic binary instrumentation apparatus 200 using multicore can set a breakpoint in the next code block (S430).

동적 바이너리 인스트루멘테이션(DBI)에서 코드 블록의 크기는 다양하게 구현될 수 있다. 코드 블록은 기본 블록(Basic Block) 단위이거나, 함수(Function) 단위일 수 있으며, 대상 프로그램의 이미지 전체가 하나의 코드 블록이 될 수 있고, CPU 인스트럭션(기계어 코드)가 하나의 코드 블록이 될 수 있다. In dynamic binary instrumentation (DBI), the size of a code block can be variously implemented. A code block can be a basic block unit or a function unit. The entire image of the target program can be a single code block, and the CPU instruction (machine code) can be a single code block. have.

여기서, 기본 블록은 컴퓨팅에서 사용되는 용어로, 엔트리 이외에는 들어오는 분기가 없고, 출구 이외에는 나가는 분기가 없는 프로그램의 작은 코드 영역을 의미하며, 기본 블록 내에서 코드는 순차적으로 실행된다. Here, the basic block is a term used in computing, which means a small code area of a program that has no incoming branch other than the entry but no outgoing branch other than the exit, and the code is executed sequentially in the basic block.

다시 도 3에 대하여 설명하면, 마지막으로, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 실행 코어를 정상 모드(Normal mode)로 전환하고, 실행 코어를 재실행(resume)한다(S370). 3, the dynamic binary instrumentation apparatus 200 using multicore switches the execution core to the normal mode and resumes the execution core (S370).

실행 프로그램의 마지막 코드에 도달한 경우, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 인스트루멘테이션 과정을 종료하고, 마지막 코드가 아닌 경우 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)는 도 3의 S320 단계 내지 S370 단계의 과정을 반복하여 수행할 수 있다. When the final code of the execution program is reached, the dynamic binary instrumentation apparatus 200 using the multicore ends the instrumentation process, and when the last code is not the dynamic code, the dynamic binary instrumentation apparatus 200 using multi- S370 may be repeatedly performed.

CPU의 한 개의 코어가 정지 모드인 경우, CPU의 다른 코어나 시스템 내부 칩 또는 시스템 외부 하드웨어의 제어에 의해서만 해당 코어가 인스트럭션을 실행할 수 있다. 즉, 정지 모드의 실행 코어는 다른 코어(인스트루멘트 코어), 다른 프로세서 또는 외부 하드웨어의 제어에 의해 정상 모드로 전환될 수 있으며, 본 발명에서는 인스트루멘트 코어에서 동작하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치(200)가 실행 코어를 정상 모드로 전환할 수 있다. When one core of the CPU is in the stop mode, the core can execute the instruction only by controlling other cores of the CPU, an internal chip of the system, or external hardware of the system. That is, the execution core in the stop mode can be switched to the normal mode by control of another core (instrument core), another processor or external hardware. In the present invention, the dynamic binary The instrumentation apparatus 200 can switch the execution core to the normal mode.

이하에서는 도 5 및 도 6을 통하여 본 발명의 일실시예에 따른 인스트루멘트 코어가 실행 코어를 제어하는 방법에 대하여 더욱 상세하게 설명한다. Hereinafter, a method of controlling an execution core according to an embodiment of the present invention will be described in detail with reference to FIGS. 5 and 6. FIG.

도 5는 본 발명의 일실시예에 따른 실행 코어를 제어하는 방법을 설명하기 위한 도면이다. 5 is a diagram for explaining a method of controlling an execution core according to an embodiment of the present invention.

도 5에 도시한 바와 같이, 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 실행 코어(10)가 아닌 인스트루멘트 코어(20) 상에서 동적 바이너리 인스트루멘테이션을 수행한다. As shown in FIG. 5, a dynamic binary instrumentation apparatus using a multicore according to an embodiment of the present invention performs dynamic binary instrumentation on the instrument core 20, rather than the execution core 10.

실행 코어(10)는 관찰 대상이 되는 대상 프로그램의 코드를 실행하는 CPU 코어를 의미하고, 대상 프로그램은 하나 이상의 실행 코어(10)에서 실행될 수 있다. 그리고 각각의 실행 코어(10)에는 온 칩 디버그 로직(30)이 연결되어 있으며, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치의 실행 코어 제어부(510)는 실행 코어(10)에 연결된 온 칩 디버그 로직(30)을 통해 해당 실행 코어(10)를 제어할 수 있다. The execution core 10 means a CPU core executing a code of a target program to be observed, and the target program can be executed in one or more execution cores 10. [ The on-chip debug logic 30 is connected to each execution core 10 and the execution core control unit 510 of the dynamic binary instrumentation apparatus using the multicore is connected to on-chip debug logic 30 To control the execution core 10. [

본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 대상 프로그램이 실행되는 실행 코어(10)와 다른 인스트루멘트 코어(20)에서 DBI를 수행하고, 대상 프로그램의 파일이나 메모리를 수정하지 않으므로, 대상 프로그램은 자신이 인스트루멘테이션(Instrumentation)되고 있다는 것을 감지할 수 없다. A dynamic binary instrumentation apparatus using a multicore according to an embodiment of the present invention executes a DBI in an execution core (20) different from an execution core (10) in which a target program is executed, and modifies a file or memory of a target program , The target program can not detect that it is being instrumented.

그리고 인스트루멘트 코어(20)에 위치하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 하나 이상의 실행 코어(10)로 코어 제어 데이터를 전송하고, 하나 이상의 실행 코어(10)로부터 코어 상태 데이터(상태 정보)를 수신할 수 있다. And a dynamic binary instrumentation apparatus using multicore located in the instrument core 20 transmits core control data to one or more execution cores 10 and receives core state data (state information) from one or more execution cores 10, Lt; / RTI >

이때, 동적 바이너리 인스트루멘테이션 장치의 실행 코어 제어부(510)는 아키텍처별 제어 기능을 통하여, 실행 코어(10)의 CPU 아키텍처에 상응하는 코어 제어 데이터를 생성하고, 실행 코어(10)로부터 수신한 코어 상태 데이터를 해석할 수 있다. 즉, 인스트루멘트 실행부(520)는 CPU 아키텍처와 관계없이 일반화된 코어 제어 명령을 생성하여 실행 코어 제어부(510)로 전달하고, 실행 코어 제어부(510)를 통하여 실행 코어(10)로부터 일반화된 코어 상태 정보를 수신할 수 있다. At this time, the execution core control unit 510 of the dynamic binary instrumentation apparatus generates core control data corresponding to the CPU architecture of the execution core 10 through the architecture-specific control function, Can be interpreted. That is, the instrument execution unit 520 generates a generalized core control command irrespective of the CPU architecture, transfers the generalized core control command to the execution core control unit 510, and transmits the generalized core control command to the execution core control unit 510 through the execution core control unit 510 Core state information.

도 5에서 실행 코어 제어부(510) 및 인스트루멘트 실행부(520)를 포함하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 온 칩 디버그 로직(30)을 이용하여, 실행 코어(10)에서 실행되는 대상 프로그램의 코드 블록 전, 후 지점에 브레이크 포인트를 설정하고, 실행 코어(10)가 대상 프로그램을 실행할 때 브레이크 포인트 지점에서 발생한 디버그 이벤트를 수신할 수 있다. 이때, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 실행 코어(10)를 브레이크 포인트 지점에서 중지 모드(Halt mode)로 전환할 수 있다. 5, a dynamic binary instrumentation apparatus using a multicore, including an execution core control unit 510 and an instrument execution unit 520, uses an on-chip debug logic 30, A breakpoint may be set before and after the code block of the program and a debug event occurring at the breakpoint point when the execution core 10 executes the target program. At this time, the dynamic binary instrumentation apparatus using the multicore can switch the execution core 10 from the breakpoint point to the halt mode.

그리고 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 수신한 디버그 이벤트의 브레이크 포인트 위치를 파악하고, 브레이크 포인트에 상응하는 인스트루멘트 코드를 실행할 수 있다. 또한, 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 인스트루멘트 코드의 실행을 종료한 후, 다음 코드 블록 지점에 브레이크 포인트를 설정한 후 대상 코어(10)를 정상 모드(Normal mode)로 전환하여 대상 프로그램을 재실행할 수 있다. The dynamic binary instrumentation apparatus using the multicore can recognize the break point position of the received debug event and execute the instrument code corresponding to the break point. After the execution of the instrument code is completed, the dynamic binary instrumentation apparatus using the multicore sets the breakpoint at the next code block point and then switches the target core 10 to the normal mode, Can be re-executed.

도 6은 본 발명의 또 다른 실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치가 적용된 인스트루멘트 코어를 나타낸 도면이다. 6 is a diagram illustrating an instrument core to which a dynamic binary instrumentation apparatus using a multicore according to another embodiment of the present invention is applied.

도 6에 도시한 바와 같이, 인스트루멘트 코어(20)에 위치하는 인스트루멘트 실행부(520)는 인스트루멘트 코드 검색 모듈(521), 인스트루멘트 코드 실행 모듈(523) 및 코드 블록 제어 모듈(525)을 포함할 수 있다. 6, the instrument execution unit 520 located in the instrument core 20 includes an instrument code search module 521, an instrument code execution module 523, and a code block control Module 525, as shown in FIG.

여기서, 인스트루멘트 코드 검색 모듈(521)은 도 2의 인스트루멘트 코드 검색부(220)와 실질적으로 동일하고, 인스트루멘트 코드 실행 모듈(523)은 도 2의 인스트루멘트 코드 실행부(230)와 실질적으로 동일하며, 코드 블록 제어 모듈(525)은 도 2의 코드 블록 제어부(240)와 실질적으로 동일할 수 있다. 이에, 설명의 편의성 및 간결성을 위하여, 도 2와 중복되는 설명은 생략한다. Here, the instrument codes retrieval module 521 is substantially the same as the instrument code retrieval unit 220 of FIG. 2, and the instrument code execution module 523 is the same as the instrument code execution unit 230, and the code block control module 525 may be substantially the same as the code block control block 240 of FIG. For the sake of convenience and brevity, a description overlapping with FIG. 2 will be omitted.

도 6에서, 실행 코어 제어부(510)는 실행 코어(10)가 브레이크 포인트가 설정된 인스트루멘트 지점에 도달한 경우, 인스트루멘트 코드 검색 모듈(521)로 실행 코어의 위치, 인스트루멘트 지점의 주소, 실행 코어 컨텍스트 중 적어도 어느 하나를 포함하는 실행 코어 브레이크 정보를 전송할 수 있다. 그리고 실행 코어 브레이크 정보를 수신한 인스트루멘트 코드 검색 모듈(521)은 인스트루멘트 코드 정보 저장소(610)에서 인스트루멘트 코드를 검색할 수 있다. 6, when the execution core 10 reaches theinstruction point where the breakpoint is set, the execution core control unit 510 instructs the instrument code search module 521 to determine the position of the execution core, An address, and an execution core context. The instrument code retrieval module 521 receiving the execution core break information can retrieve the instrument code from the instrument code information storage 610.

인스트루멘트 코드 실행부(523)는 실행 코어 컨텍스트 읽기 명령, 인스트럭션 송신 및 실행 명령 중 적어도 어느 하나에 대한 제1 제어 명령을 실행 코어 제어부(510)로 전송하고, 실행 코어 제어부(510)로부터 제1 제어 명령에 대한 응답으로 실행 코어 컨텍스트 값, 인스트럭션 실행 결과 중 적어도 어느 하나를 포함하는 제1 제어 응답을 수신할 수 있다. 또한, 인스트루멘트 코드 실행부(523)는 관찰 정보 저장소(620)에 인스트루멘트 코드의 실행에 따른 관찰 정보를 저장할 수 있다. The instrument code execution unit 523 transmits a first control command for at least one of an execution core context read command, an instruction transmission instruction, and an execution instruction to the execution core control unit 510, 1 < / RTI > control command in response to the first control response, the execution core context value, and the instruction execution result. In addition, the instrument code execution unit 523 may store observation information according to the execution of the instrument code in the observation information storage 620. [

그리고 코드 블록 제어부(525)는 브레이크 포인트의 상태 정보를 읽기 위한 제2 제어 명령을 실행 코어 제어부(510)로 전송하고, 실행 코어 제어부(510)로부터 제1 제어 명령에 대한 응답으로 현재의 인스트루멘트 지점 정보, 브레이크 포인트의 개수, 설정 여부 및 설정값 정보 중 적어도 어느 하나를 포함하는 제2 제어 응답을 수신할 수 있다. The code block controller 525 transmits a second control command for reading the state information of the breakpoint to the execution core controller 510. In response to the first control command from the execution core controller 510, A second control response including at least any one of a moment point information, a number of breakpoints, setting information, and setting value information.

또한, 인스트루멘트 코드 실행부(523)는 제2 제어 응답을 이용하여, 실행 코어 제어부(510)로 제1 제어 명령을 전송할 수 있다. 여기서, 제1 제어 명령은 브레이크 포인트 타입, 브레이크 포인트가 설정될 주소, 사용할 브레이크 포인트 하드웨어 정보 중 적어도 어느 하나를 포함할 수 있다. In addition, the instrument code execution unit 523 can transmit the first control command to the execution core control unit 510 using the second control response. Here, the first control command may include at least one of a breakpoint type, an address at which a breakpoint is set, and breakpoint hardware information to be used.

이와 같이, 본 발명의 일실시예에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 실행 코어가 아닌 인스트루멘트 코어에서 동작하며, 인스트루멘트 코드를 대상 프로그램이 실행되는 실행 코어와 다른 코어에서 실행함으로써, 대상 프로그램에 변조를 가하지 않고 대상 프로그램 실행 영역과 인스트루멘테이션 실행 영역을 논리적 및 물리적으로 분리할 수 있다. 이를 통하여 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 대상 프로그램에 의해 DBI가 탐지되지 않는다. As described above, the dynamic binary instrumentation apparatus using the multicore according to the embodiment of the present invention operates in the instrument core, not the execution core, and executes the instrument code in a core different from the execution core in which the target program is executed , The target program execution area and the instrumentation execution area can be logically and physically separated without modulating the target program. Through this, the DBI is not detected by the target program in the dynamic binary instrumentation apparatus using the multicore.

또한, 본 발명에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치는 오염 분석(Taint Analysis), 기호 실행(Symbolic Execution), 취약점 분석 등 DBI를 활용한 분야에 적용될 수 있다. Further, the dynamic binary instrumentation apparatus using multicore according to the present invention can be applied to fields utilizing DBI such as taint analysis, symbol execution, and vulnerability analysis.

이상에서와 같이 본 발명에 따른 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치 및 방법은 상기한 바와 같이 설명된 실시예들의 구성과 방법이 한정되게 적용될 수 있는 것이 아니라, 상기 실시예들은 다양한 변형이 이루어질 수 있도록 각 실시예들의 전부 또는 일부가 선택적으로 조합되어 구성될 수도 있다. As described above, the apparatus and method for dynamic binary instrumentation using multicore according to the present invention are not limited to the configurations and methods of the embodiments described above, but the embodiments may be modified in various ways All or some of the embodiments may be selectively combined.

10: 실행 코어
20: 인스트루멘트 코어
30: 온 칩 디버그 로직
200: 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치
210: 실행 코어 제어부
220: 인스트루멘트 코드 검색부
230: 인스트루멘트 코드 실행부
240: 코드 블록 제어부
510: 실행 코드 제어부
520: 인스트루멘트 실행부
521: 인스트루멘트 코드 검색 모듈
523: 인스트루멘트 코드 실행 모듈
525: 코드 블록 제어 모듈
610: 인스트루멘트 코드 정보 저장소
620: 관찰 정보 저장소
630: 프로그램 메모리 저장소
10: Execution core
20: Instrument core
30: On-Chip Debug Logic
200: Dynamic Binary Instrumentation Device Using Multicore
210: Execution core control unit
220: Instruction code search unit
230: Instruction code execution unit
240: code block control unit
510: Execution code control section
520: Instruction execution unit
521: Instrument code search module
523: Instruction code execution module
525: Code block control module
610: Instruction code information store
620: Observation information store
630: Program memory storage

Claims (20)

멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치에 의해 수행되는 동적 바이너리 인스트루멘테이션 방법에 있어서,
대상 프로그램을 실행하는 실행 코어에 브레이크 포인트를 설정하는 단계,
상기 브레이크 포인트에 진입하여 디버그 이벤트를 발생한 상기 실행 코어로부터, 상기 디버그 이벤트를 수신하는 단계,
상기 디버그 이벤트가 발생한 상기 브레이크 포인트를 확인하고, 상기 브레이크 포인트에 상응하는 인스트루멘트 코드를 실행하는 단계,
상기 인스트루멘트 코드의 실행 결과를 저장하는 단계, 그리고
다음 코드 블록에 상기 브레이크 포인트를 설정하고, 상기 실행 코어를 재실행하는 단계를 포함하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법.
In a dynamic binary instrumentation method performed by a dynamic binary instrumentation apparatus using a multicore,
Setting a breakpoint at an execution core executing the target program,
Receiving the debug event from the execution core that enters the breakpoint and generates a debug event,
Checking the breakpoint where the debug event occurred, and executing an instrument code corresponding to the breakpoint,
Storing the execution result of the instrument code, and
Setting the breakpoint in a next code block, and rerunning the execution core. ≪ Desc / Clms Page number 22 >
제1항에 있어서,
상기 인스트루멘트 코드를 실행하는 단계는,
상기 실행 코어가 진입한 상기 브레이크 포인트에 상응하는 상기 인스트루멘트 코드를 검색하는 단계, 그리고
검색된 상기 인스트루멘트 코드를 메모리에 탑재하여 실행하는 단계를 포함하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법.
The method according to claim 1,
Wherein the step of executing the instrument code comprises:
Retrieving the instrument code corresponding to the breakpoint entered by the execution core; and
And loading the searched instrument code into a memory and executing the loaded instrument code.
제2항에 있어서,
상기 인스트루멘트 코드의 실행 결과를 저장하는 단계는,
실행코어 컨텍스트 읽기 명령, 인스트럭션 송신 명령, 인스트럭션 실행 명령 중 적어도 어느 하나에 대한 응답인 실행코어 컨텍스트 값 및 인스트럭션 실행 결과 중 적어도 어느 하나를 수집하여 저장하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법.
3. The method of claim 2,
Wherein storing the execution result of the instrument code comprises:
Core context value that is a response to at least one of an execution core context read instruction, an instruction transmission instruction, and an instruction execution instruction, and an instruction execution result. .
제3항에 있어서,
상기 인스트루멘트 코드의 실행 결과를 저장하는 단계는,
상기 실행 코어가 진입한 상기 브레이크 포인트의 정보, 상기 브레이크 포인트의 개수, 상기 브레이크 포인트의 설정 여부 및 상기 브레이크 포인트의 설정값 중 적어도 어느 하나를 포함하는 상기 브레이크 포인트의 상태 정보를 수신하여 저장하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법.
The method of claim 3,
Wherein storing the execution result of the instrument code comprises:
And receiving and storing status information of the breakpoint including at least one of the breakpoint information on which the execution core has entered, the number of breakpoints, the setting of the breakpoint, and the setting value of the breakpoint A dynamic binary instrumentation method using a multicore.
제4항에 있어서,
상기 다음 코드 블록에 상기 브레이크 포인트를 설정하고, 상기 실행 코어를 재실행하는 단계는,
상기 브레이크 포인트의 상태 정보 및 상기 메모리 중 적어도 어느 하나를 기반으로, 상기 다음 코드 블록의 위치를 계산하는 단계,
상기 인스트루멘트 코드를 실행한 현재의 상기 브레이크 포인트를 해제하는 단계,
상기 다음 코드 블록의 위치를 기반으로 상기 다음 코드 블록에 상기 브레이크 포인트를 설정하는 단계를 포함하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법.
5. The method of claim 4,
Setting the breakpoint in the next code block, and re-executing the execution core,
Calculating a position of the next code block based on at least one of the state information of the breakpoint and the memory,
Releasing the current breakpoint that executed the instrument code,
And setting the breakpoint in the next code block based on the position of the next code block. ≪ Desc / Clms Page number 21 >
제1항에 있어서,
상기 코드 블록은,
기본 블록 단위, 인스트럭션 단위, 함수 단위 및 이미지 단위 중 적어도 어느 하나인 인스트루멘트 단위인 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법.
The method according to claim 1,
The code block includes:
Wherein the basic unit is an instrument unit that is at least one of a basic block unit, an instruction unit, a function unit, and an image unit.
제1항에 있어서,
상기 디버그 이벤트 발생 시, 상기 실행 코어를 정지 모드(Halt mode)로 전환하는 단계, 그리고
상기 다음 코드 블록에 상기 브레이크 포인트를 설정한 후, 상기 실행 코어를 정상 모드(Normal mode)로 전환하여 상기 실행 코어를 재실행하는 단계를 더 포함하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법.
The method according to claim 1,
When the debug event occurs, switching the execution core to a halt mode, and
Further comprising setting the breakpoint in the next code block and then switching the execution core to a normal mode to re-execute the execution core.
제7항에 있어서,
상기 대상 프로그램의 마지막 코드를 실행할 때까지, 상기 다음 코드 블록에 상기 브레이크 포인트를 설정한 후 상기 실행 코어를 재실행하는 단계를 반복하여 수행하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법.
8. The method of claim 7,
And repeating the step of re-executing the execution core after setting the break point in the next code block until the last code of the target program is executed.
제1항에 있어서,
상기 브레이크 포인트를 설정하는 단계는,
상기 실행 코어에 하나 이상의 하드웨어 브레이크 포인트를 설정하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 방법.
The method according to claim 1,
Wherein setting the breakpoint comprises:
And setting one or more hardware breakpoints in the execution core.
대상 프로그램을 실행하는 실행 코어에 브레이크 포인트를 설정하고, 상기 브레이크 포인트에 진입하여 디버그 이벤트를 발생한 상기 실행 코어로부터, 상기 디버그 이벤트를 수신하는 실행 코어 제어부, 그리고
상기 디버그 이벤트가 발생한 상기 브레이크 포인트를 확인하고, 상기 브레이크 포인트에 상응하는 인스트루멘트 코드를 실행하며, 상기 인스트루멘트 코드의 실행 결과를 저장하고, 다음 코드 블록에 상기 브레이크 포인트를 설정하며, 상기 실행 코어를 재실행하는 인스트루멘트 실행부를 포함하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
An execution core control unit for setting a breakpoint in an execution core that executes the target program, receiving the debug event from the execution core that enters the breakpoint and generates a debug event, and
The method comprising: confirming the breakpoint at which the debug event occurred; executing an instrument code corresponding to the breakpoint; storing an execution result of the instrument code; setting the breakpoint in a next code block; And an instruction execution unit for re-executing the execution core.
제10항에 있어서,
상기 인스트루멘트 실행부는,
상기 실행 코어가 진입한 상기 브레이크 포인트에 상응하는 상기 인스트루멘트 코드를 검색하는 인스트루멘트 코드 검색 모듈, 그리고
검색된 상기 인스트루멘트 코드를 메모리에 탑재하여 실행하는 인스트루멘트 코드 실행 모듈을 포함하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
11. The method of claim 10,
Wherein the instrument execution unit comprises:
An instrument code retrieval module for retrieving the instrument code corresponding to the break point at which the execution core has entered;
And an instrument code execution module for loading and executing the searched instrument code in a memory.
제11항에 있어서,
상기 인스트루멘트 코드 실행 모듈은,
실행코어 컨텍스트 읽기 명령, 인스트럭션 송신 명령, 인스트럭션 실행 명령 중 적어도 어느 하나에 대한 응답인 실행코어 컨텍스트 값 및 인스트럭션 실행 결과 중 적어도 어느 하나를 수집하여 저장하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
12. The method of claim 11,
Wherein the instrument code execution module comprises:
Core context value, which is a response to at least one of an execution core context read instruction, an instruction transmission instruction, and an instruction execution instruction, and an instruction execution result. .
제12항에 있어서,
상기 인스트루멘트 실행부는,
상기 실행 코어가 진입한 상기 브레이크 포인트의 정보, 상기 브레이크 포인트의 개수, 상기 브레이크 포인트의 설정 여부 및 상기 브레이크 포인트의 설정값 중 적어도 어느 하나를 포함하는 상기 브레이크 포인트의 상태 정보를 수신하여 저장하는 코드 블록 제어 모듈을 더 포함하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
13. The method of claim 12,
Wherein the instrument execution unit comprises:
A code for receiving and storing status information of the breakpoint including at least one of the breakpoint information on which the execution core has entered, the number of breakpoints, the setting of the breakpoint, and the setting value of the breakpoint And a block control module for controlling the dynamic binary instru- mentation device.
제13항에 있어서,
상기 코드 블록 제어 모듈은,
상기 브레이크 포인트의 상태 정보 및 상기 메모리 중 적어도 어느 하나를 기반으로 상기 다음 코드 블록의 위치를 계산하고, 상기 인스트루멘트 코드를 실행한 현재의 상기 브레이크 포인트를 해제하며, 상기 다음 코드 블록의 위치를 기반으로 상기 다음 코드 블록에 상기 브레이크 포인트를 설정하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
14. The method of claim 13,
Wherein the code block control module comprises:
Calculating a position of the next code block based on at least one of the state information of the breakpoint and the memory, releasing the current breakpoint that executed the instruction code, And the breakpoint is set in the next code block based on the breakpoint.
제10항에 있어서,
상기 코드 블록은,
기본 블록 단위, 인스트럭션 단위, 함수 단위 및 이미지 단위 중 적어도 어느 하나인 인스트루멘트 단위인 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
11. The method of claim 10,
The code block includes:
Wherein the instruction unit is an instrument unit that is at least one of a basic block unit, an instruction unit, a function unit, and an image unit.
제10항에 있어서,
상기 실행 코어 제어부는,
상기 디버그 이벤트 발생 시 상기 실행 코어를 정지 모드(Halt mode)로 전환하고, 상기 다음 코드 블록에 상기 브레이크 포인트를 설정한 후, 상기 실행 코어를 정상 모드(Normal mode)로 전환하여 상기 실행 코어를 재실행하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
11. The method of claim 10,
The execution core control unit,
Wherein the execution core is switched to a halt mode when the debug event occurs, the breakpoint is set in the next code block, the execution core is switched to a normal mode, And a dynamic binary instrumentation apparatus using the multi-core.
제16항에 있어서,
상기 실행 코어 제어부는,
상기 대상 프로그램의 마지막 코드를 실행할 때까지, 상기 다음 코드 블록에 상기 브레이크 포인트를 설정한 후 상기 실행 코어를 재실행하는 과정을 반복하여 수행하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
17. The method of claim 16,
The execution core control unit,
And repeating the step of re-executing the execution core after setting the break point in the next code block until the last code of the target program is executed.
제10항에 있어서,
상기 실행 코어에는 하나 이상의 하드웨어 브레이크 포인트가 설정되는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
11. The method of claim 10,
Wherein at least one hardware breakpoint is set in the execution core. ≪ RTI ID = 0.0 > 8. < / RTI >
복수의 코어들 중에서 대상 프로그램을 실행하는 실행 코어에 브레이크 포인트를 설정하고, 상기 실행 코어의 온 칩 디버그 로직을 이용하여, 상기 브레이크 포인트에 진입하여 디버그 이벤트를 발생한 상기 실행 코어로부터 상기 디버그 이벤트를 수신하는 실행 코어 제어부,
상기 디버그 이벤트가 발생한 상기 브레이크 포인트에 상응하는 인스트루멘트 코드를 검색하는 인스트루멘트 코드 검색부,
검색된 상기 인스트루멘트 코드를 실행하고, 상기 인스트루멘트 코드의 실행 결과를 저장하는 인스트루멘트 코드 실행부, 그리고
다음 코드 블록의 위치를 계산하고, 상기 다음 코드 블록에 상기 브레이크 포인트를 설정하는 코드 블록 제어부를 포함하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
A breakpoint is set in an execution core that executes a target program among a plurality of cores and the debug event is entered from the execution core that enters the breakpoint and generates a debug event by using the on- An execution core control unit,
An instrument code search unit for searching for an instrument code corresponding to the break point at which the debug event occurred;
An instrument code execution unit for executing the searched instrument code and storing the execution result of the instrument code, and
And a code block control unit for calculating a position of a next code block and setting the break point in the next code block.
제19항에 있어서,
상기 실행 코어 제어부는,
상기 실행 코어가 상기 브레이크 포인트에 진입한 경우 상기 실행 코어를 정지 모드(Halt mode)로 전환하고, 인스트루멘트 코어에서 상기 브레이크 포인트에 상응하는 상기 인스트루멘트 코드를 실행하며, 상기 인스트루멘트 코드의 실행을 종료한 후 상기 실행 코어를 정상 모드(Normal mode)로 전환하는 것을 특징으로 하는 멀티 코어를 이용한 동적 바이너리 인스트루멘테이션 장치.
20. The method of claim 19,
The execution core control unit,
The execution core is switched to a halt mode when the execution core enters the break point and the instrumement code corresponding to the break point is executed in the instrument core, Wherein the execution core is switched to a normal mode after the execution of the multicore core is completed.
KR1020170177828A 2017-12-22 2017-12-22 Apparatus and method for dynamic binary instrumentation using multi-core KR102462864B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170177828A KR102462864B1 (en) 2017-12-22 2017-12-22 Apparatus and method for dynamic binary instrumentation using multi-core

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170177828A KR102462864B1 (en) 2017-12-22 2017-12-22 Apparatus and method for dynamic binary instrumentation using multi-core

Publications (2)

Publication Number Publication Date
KR20190076217A true KR20190076217A (en) 2019-07-02
KR102462864B1 KR102462864B1 (en) 2022-11-07

Family

ID=67258009

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170177828A KR102462864B1 (en) 2017-12-22 2017-12-22 Apparatus and method for dynamic binary instrumentation using multi-core

Country Status (1)

Country Link
KR (1) KR102462864B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115221051A (en) * 2022-07-12 2022-10-21 北京大学 Program instrumentation method and device for verifying data API execution process

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011108124A (en) * 2009-11-20 2011-06-02 Fujitsu Ltd Debugging method, debug processing program, and debugging device, using hardware break point
KR20110070468A (en) * 2009-12-18 2011-06-24 삼성전자주식회사 Apparatus for executing instrumentation and method thereof
KR101715759B1 (en) * 2015-09-22 2017-03-15 한국전자통신연구원 Apparatus and method for analysing malicious code in multi core environments
KR20170055933A (en) 2015-11-12 2017-05-22 삼성전자주식회사 Method and apparatus for protecting kernel control-flow integrity using static binary instrumentaiton
KR20170105394A (en) * 2016-03-09 2017-09-19 한양대학교 산학협력단 Emulation method and apparatus for processing request for non-deterministic hardware interrupt

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011108124A (en) * 2009-11-20 2011-06-02 Fujitsu Ltd Debugging method, debug processing program, and debugging device, using hardware break point
KR20110070468A (en) * 2009-12-18 2011-06-24 삼성전자주식회사 Apparatus for executing instrumentation and method thereof
KR101715759B1 (en) * 2015-09-22 2017-03-15 한국전자통신연구원 Apparatus and method for analysing malicious code in multi core environments
KR20170055933A (en) 2015-11-12 2017-05-22 삼성전자주식회사 Method and apparatus for protecting kernel control-flow integrity using static binary instrumentaiton
KR20170105394A (en) * 2016-03-09 2017-09-19 한양대학교 산학협력단 Emulation method and apparatus for processing request for non-deterministic hardware interrupt

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115221051A (en) * 2022-07-12 2022-10-21 北京大学 Program instrumentation method and device for verifying data API execution process

Also Published As

Publication number Publication date
KR102462864B1 (en) 2022-11-07

Similar Documents

Publication Publication Date Title
US7950001B2 (en) Method and apparatus for instrumentation in a multiprocessing environment
Carreira et al. Xception: Software fault injection and monitoring in processor functional units
CN103186461B (en) The store method of a kind of field data and restoration methods and relevant apparatus
KR101519845B1 (en) Method For Anti-Debugging
TWI410864B (en) Controlling instruction execution in a processing environment
TWI544410B (en) Diagnosing code using single step execution
US8806447B2 (en) Step-type operation processing during debugging by machine instruction stepping concurrent with setting breakpoints
US8843899B2 (en) Implementing a step-type operation during debugging of code using internal breakpoints
CN102346235A (en) Automatic test system and method for hardware device function
US12093398B2 (en) Vulnerability analysis and reporting for embedded systems
Arulraj et al. Leveraging the short-term memory of hardware to diagnose production-run software failures
CN105528284A (en) Kernel fault injection method and electronic device
JP2012118884A (en) Processor and semiconductor device
US20200143061A1 (en) Method and apparatus for tracking location of input data that causes binary vulnerability
US20240289257A1 (en) Method for testing a computer program
KR102462864B1 (en) Apparatus and method for dynamic binary instrumentation using multi-core
Gratchoff et al. Proving the wild jungle jump
US11030075B2 (en) Efficient register breakpoints
US12072789B2 (en) Resumable instruction generation
CN115878363A (en) Method, apparatus and computer readable storage medium for resolving processor exceptions
JP2009223714A (en) Arithmetic circuit and failure analysis method of arithmetic circuit
TWI417786B (en) Method,system,and program product of facilitating instruction execution in a processing environment
Chyłek Emulation based software reliability evaluation and optimization
Dofferhoff A performance evaluation of platform-independent methods to search for hidden instructions on risc processors
Zhang et al. Localization of linearizability faults on the coarse-grained level

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