KR20130051271A - System and method that provides policies for virtualizing arm based operating system - Google Patents

System and method that provides policies for virtualizing arm based operating system Download PDF

Info

Publication number
KR20130051271A
KR20130051271A KR1020110116526A KR20110116526A KR20130051271A KR 20130051271 A KR20130051271 A KR 20130051271A KR 1020110116526 A KR1020110116526 A KR 1020110116526A KR 20110116526 A KR20110116526 A KR 20110116526A KR 20130051271 A KR20130051271 A KR 20130051271A
Authority
KR
South Korea
Prior art keywords
virtualization
command
operating system
stored
sensitive
Prior art date
Application number
KR1020110116526A
Other languages
Korean (ko)
Other versions
KR101433644B1 (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 KR1020110116526A priority Critical patent/KR101433644B1/en
Publication of KR20130051271A publication Critical patent/KR20130051271A/en
Application granted granted Critical
Publication of KR101433644B1 publication Critical patent/KR101433644B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45554Instruction set architectures of guest OS and hypervisor or native processor differ, e.g. Bochs or VirtualPC on PowerPC MacOS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PURPOSE: A policy providing system for the virtualization of an ARM(Advanced RISC Machine )-based OS(Operating System) and a method thereof are provided to ease the performance of emulation by using information stored for virtualization sensitive command emulation for VM(Virtual Machine) operation. CONSTITUTION: A command detecting module(214) detects a command not generating a trap in a specific mode during guest OS compile. A basis policy module(216) stores the command in a specific area of an execution file, converts the command into a command for a system call interface, and converts the command into an offset of the specific area in order to virtualize a guest OS. A specific mode is a nonprivileged mode only for an allocated address area and the command is a virtualization sensitive command not generating a trap in a user mode. [Reference numerals] (210) System call interface; (212) Hardware; (214) Command detecting module; (216) Basis policy module

Description

ARM 기반 운영체제의 가상화를 위한 정책 제공 시스템 및 방법{SYSTEM AND METHOD THAT PROVIDES POLICIES FOR VIRTUALIZING ARM BASED OPERATING SYSTEM} [0001] SYSTEM AND METHOD FOR PROVIDING VIRTUALIZING ARM BASED OPERATING SYSTEM FOR VIRTUALIZATION OF ARM-

본 발명은 ARM 기반 운영체제에서 가상화를 구현하기 위하여 가상화 민감 명령어를 선행처리하기 위한 것으로, 커널 소스 코드를 컴파일 할 때 가상화 민감 명령어를 검출하여 특정 섹션에 그 위치를 저장하고, 컴파일된 커널의 ELF 파일의 섹션 내용을 보고 가상화 민감 명령어를 트랩 발생 명령어와 오프셋으로 바꾸어 가상화 민감 명령어를 에뮬레이션하기 위한 ARM 기반 운영체제의 가상화를 위한 정책 기반 제공 시스템 및 방법에 관한 것이다.The present invention is for pre-processing virtualization-sensitive instructions to implement virtualization in an ARM-based operating system. It detects virtualization-sensitive instructions when compiling kernel source code, stores the location in a specific section, Based system for virtualization of an ARM-based operating system for emulating virtualization sensitive instructions by replacing virtualization sensitive instructions with trap generation instructions and offsets.

최근 들어, 기존의 서버 시스템뿐만 아니라 스마트폰 등 임베디드 기기 또한 성능이 증가함에 따라 가상화 기술의 필요성이 대두되고 있다.In recent years, as the performance of embedded systems such as smart phones has increased as well as existing server systems, the necessity of virtualization technology is increasing.

가상화가 구현되지 않은 일반적인 시스템의 경우 하나의 운영체제가 모든 하드웨어 자원(resource)을 제어하지만 가상화 시스템의 경우 하드웨어의 자원을 관리하는 VMM(Virtual Machine Monitor)이라는 소프트웨어 층이 하드웨어와 운영체제 사이에 추가된다. 상기 VMM은 VM(Virtual Machine)인 다수의 게스트 운영체제에게 호스트의 하드웨어 자원을 공유해 주는 역할을 한다. In a typical system where virtualization is not implemented, one operating system controls all the hardware resources. In the case of a virtualization system, a software layer called a VMM (Virtual Machine Monitor) is added between the hardware and the operating system to manage the hardware resources. The VMM plays a role of sharing hardware resources of a host to a plurality of guest operating systems (VMs).

OS/360과 같은 일반적인 3세대 아키텍처에는 특권 모드(Privileged mode)와 비 특권 모드(Non-privileged mode)라는 두 가지 상태의 프로세서 모드가 있다. 상기 특권 모드란 I/O 같은 하드웨어 시스템의 자원에 자유롭게 접근할 수 있는 프로세서 모드이다. 상기 VMM은 하드웨어의 자원을 관리하기 때문에 특권 모드에서 수행하지만 VMM 위에서 작동하는 VM은 비 특권 모드에서 수행된다.Typical third-generation architectures, such as OS / 360, have two processor modes: Privileged mode and Non-privileged mode. The privileged mode is a processor mode capable of freely accessing resources of a hardware system such as I / O. The VMM performs in a privileged mode because it manages the resources of the hardware, but a VM operating on the VMM is performed in a non-privileged mode.

하지만 각 VM에 존재하는 운영체제는 수행 중 시스템의 자원을 사용하기 위해 특권 모드의 권한이 필요한 경우가 존재한다. 대부분의 사용자 프로그램은 하드웨어의 특권 모드의 권한이 필요없는 경우 비 특권 모드에서 수행이 가능하지만 I/O access같은 특권 모드의 기능을 사용하기 위해서는 슈퍼바이저 콜(supervisor call)이나 트랩을 발생시켜 특권 모드로 상태 변환이 필요하다.However, there is a case where privilege mode privilege is required for operating system existing in each VM to use resources of the system during execution. Most user programs can be run in non-privileged mode if the privilege mode of the hardware is not needed, but in order to use the privileged mode function such as I / O access, a supervisor call or trap is generated, State conversion is required.

이처럼 현재 프로세서 모드에 민감하지 않은 명령어들은 VMM의 간섭없이 직접적으로 수행할 수 있지만 그 외의 명령어들은 현재 프로세서 모드에 민감하여 가상화를 구현할 경우 해당 명령어들에 대한 처리가 필요하다.Thus, instructions that are not sensitive to the current processor mode can be executed directly without intervention of the VMM, but other instructions are sensitive to the current processor mode, and processing of the corresponding instructions is required when virtualization is implemented.

특권 명령어는 프로세서 모드가 특권 모드일 때 수행하면 트랩이 발생하지 않으나 비 특권 모드에서 수행하면 트랩이 발생하는 명령어이다. 민감 명령어(sensitive instruction)는 제어 민감 명령어(control sensitive instruction)와 행동 민감 명령어(behavior sensitive instruction)로 구성된다. 제어 민감 명령어는 프로세서 모드의 변화를 일으키거나 relocation bound register의 변화를 일으키면 사용하는 자원에 변화를 일으킨다는 의미이며 3세대 컴퓨터의 경우 자원은 메모리를 말한다. 행동 민감 명령어는 현재의 relocation bound register의 값에 따라 수행의 결과가 달라지는 명령어이다.The privileged instruction is a command that does not generate a trap when the processor mode is executed in the privileged mode, but generates a trap when executed in the non-privileged mode. A sensitive instruction consists of a control sensitive instruction and a behavior sensitive instruction. Control-sensitive instructions mean that changes in the resource used are caused by changes in the processor mode or by changes in the relocation bound registers. In the case of third-generation computers, resources are memory. The behavior sensitive instruction is a command whose execution result depends on the value of the current relocation bound register.

도 1은 3세대 컴퓨터를 가상화 하기 위한 만족 조건을 나타낸 구성도이다. 일반적인 3세대 컴퓨터(120)는 민감 명령어 집합이 특권 명령어 집합의 부분 집합에 속하여 모든 민감 명령어가 비 특권 모드에서 수행 시 트랩을 발생시킨다. 이 경우에는 트랩 앤드 에뮬레이션 방식을 이용하여 가상화 구현이 가능하다. 하지만 x86, ARM 등의 프로세서(110)는 민감 명령어 집합 중 특권 명령어의 집합에 포함되지 않아 비 특권 모드에서 수행 시 트랩이 발생하지 않는 가상화 민감 명령어가 존재하므로 이 가상화 민감 명령어를 처리하지 않으면 가상화를 구현하기 어려운 문제가 발생한다.FIG. 1 is a diagram showing a satisfaction condition for virtualizing a third generation computer. A generic third generation computer 120 generates a trap when the sensitive instruction set belongs to a subset of the privileged instruction set and all sensitive instructions are executed in the non-privileged mode. In this case, virtualization can be implemented using the trap-and-emulation method. However, processors 110 such as x86 and ARM are not included in the set of privileged instructions in the set of sensitive instructions, so that there is a virtualization-sensitive instruction that does not cause a trap in execution in non-privileged mode. A problem that is difficult to implement occurs.

본 발명은 ARM 기반 운영체제에서 가상화를 구현하기 위한 것으로, 커널 소스 컴파일 시 가상화 민감 명령어를 검출하여 ELF 파일의 특정 섹션에 그 위치를 저장하는 기술을 제공하고자 한다.The present invention is for implementing virtualization in an ARM-based operating system, and aims to provide a technique for detecting a virtualization-sensitive instruction in a kernel source compilation and storing the position in a specific section of the ELF file.

또한, 본 발명은 컴파일된 커널의 ELF 파일에 기록된 가상화 민감 명령어의 위치정보를 보고 가상화 민감 명령어를 트랩 발생 명령어와 오프셋으로 변경하여 가상화 민감 명령어를 에뮬레이션하는 기술을 제공하고자 한다.It is another object of the present invention to provide a technology for emulating a virtualization sensitive command by changing the virtualization sensitive instruction to a trap generation instruction and an offset by viewing the position information of the virtualization sensitive instruction written in the ELF file of the compiled kernel.

본 발명의 일 견지에 따르면, ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템에 있어서, 게스트 운영체제(Guest OS) 컴파일 시 특정 모드에서 트랩이 발생되지 않는 명령어를 검출하는 커맨드 검출 모듈과, 상기 커맨드 검출 모듈에서 검출된 명령어를 소정 실행 파일의 특정 영역에 저장하고, 상기 저장된 명령어를 시스템 콜 인터페이스가 가능한 명령어로 변환하고, 상기 특정 영역의 오프셋으로 변환하여 상기 게스트 운영체제를 가상화하도록 제어하는 기반 정책 모듈을 포함함을 특징으로 한다.According to one aspect of the present invention, there is provided a policy-based provision system for virtualization of an ARM-based operating system, the system comprising: a command detection module for detecting an instruction for which a trap is not generated in a specific mode upon compilation of a guest OS; A base policy module that stores a command detected in the module in a specific area of a predetermined executable file, converts the stored command into a command capable of a system call interface, converts the command into an offset of the specific area, and controls the virtualization of the guest operating system .

본 발명의 다른 견지에 따르면, ARM 기반 운영체제의 가상화를 위한 정책기반 제공 방법에 있어서, 게스트 운영체제를 컴파일하는 과정과, 상기 게스트 운영체제 컴파일 수행 도중 특정 모드에서 트랩이 발생되지 않는 가상화 민감 명령어를 검출하는 과정과, 커널 소스 코드를 컴파일하는 과정과, 상기 검출된 가상화 민감 명령어를 이엘에프(ELF, Executable and Linking Format) 파일의 특정 섹션에 그 위치를 저장하는 과정과, 상기 저장된 가상화 민감 명령어를 소프트웨어 인터럽트(Software Interrupt, SWI) 명령어 및 상기 특정 섹션의 오프셋으로 변환하는 과정과, 상기 게스트 운영체제를 가상화하여 상기 가상화된 게스트 운영체제를 수행하는 과정을 포함함을 특징으로 한다.According to another aspect of the present invention, there is provided a policy-based provisioning method for virtualization of an ARM-based operating system, the method comprising: compiling a guest operating system; detecting virtualization-sensitive commands that do not cause a trap in a particular mode during execution of the guest operating system compilation; Storing the location of the detected virtualization sensitive command in a specific section of an Executable and Linking Format (ELF) file; and writing the stored virtualization sensitive instruction into a software interrupt (SWI) command and an offset of the specific section, and performing the virtualized guest operating system by virtualizing the guest operating system.

본 발명은 가상화 민감 명령어에 대한 정보를 미리 컴파일된 커널의 ELF 파일에 저장하여 가상 머신 동작을 위한 가상화 민감 명령어 에뮬레이션 시 저장해놓은 정보를 이용하여 보다 용이한 에뮬레이션 수행이 가능한 효과가 있다.The present invention has the effect of facilitating emulation by storing information on virtualization sensitive commands in an ELF file of a precompiled kernel to use information stored in virtualization sensitive command emulation for virtual machine operation.

도 1은 종래의 ARM 구조 기반 운영체제가 컴파일되는 과정과 본 발명에서 개발한 도구가 수행되어 가상화 민감 명령어를 처리하는 과정을 보인 도면.
도 2는 본 발명의 일 실시 예에 따른 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템의 개략적인 구성도.
도 3은 본 발명의 일 실시 예에 따른 ARM 기반 운영체제의 가상화를 위한 정책 기반 시스템의 기반 정책 모듈에서 컴파일된 ELF 파일의 구조를 보인 도면.
도 4는 본 발명의 일 실시 예에 따른 ARM 기반 운영체제의 가상화를 위한 정책 기반 시스템의 기반 정책 모듈에서 컴파일된 커널 ELF 파일의 구조를 보인 도면.
도 5는 본 발명의 일 실시 예에 ARM 기반 운영체제의 가상화를 위한 정책 기반 제공 방법에 관한 흐름도.
FIG. 1 illustrates a process of compiling a conventional ARM architecture-based operating system and a process of processing a virtualization sensitive command by executing a tool developed in the present invention.
2 is a schematic configuration diagram of a policy-based providing system for virtualization of an ARM-based operating system according to an embodiment of the present invention.
FIG. 3 illustrates a structure of an ELF file compiled in a policy-based system based policy module for virtualization of an ARM-based operating system according to an embodiment of the present invention; FIG.
FIG. 4 illustrates a structure of a kernel ELF file compiled in a policy-based system based policy-based system for virtualization of an ARM-based operating system according to an embodiment of the present invention; FIG.
FIG. 5 is a flowchart of a policy-based provision method for virtualization of an ARM-based operating system according to an embodiment of the present invention. FIG.

이하 본 발명에 따른 바람직한 실시 예를 첨부한 도면을 참조하여 상세히 설명한다. 하기 설명에서는 구체적인 구성 소자 등과 같은 특정 사항들이 나타나고 있는데 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐 이러한 특정 사항들이 본 발명의 범위 내에서 소정의 변형이나 혹은 변경이 이루어질 수 있음은 이 기술 분야에서 통상의 지식을 가진 자에게는 자명하다 할 것이다.
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. It will be appreciated that those skilled in the art will readily observe that certain changes in form and detail may be made therein without departing from the spirit and scope of the present invention as defined by the appended claims. To those of ordinary skill in the art.

본 발명은 ARM 기반 운영체제에서 가상화를 구현하기 위하여 가상화 민감 명령어를 선행처리 하기 위한 것으로, 더욱 상세하게는 커널(Kernel) 소스 코드 컴파일 시 가상화 민감 명령어를 검출하여 특정 섹션에 그 위치를 저장하고, 상기 컴파일된 커널의 ELF(Executable and Linking Format)파일의 섹션 정보를 이용하여 가상화 민감 명령어를 트랩 발생 명령어와 오프셋으로 변경하여 가상화 민감 명령어를 에뮬레이션 함으로써 가상 머신동작을 위한 가상화 민감 명령어 에뮬레이션 시 기저장된 정보를 이용하여 효과적으로 에뮬레이션을 수행하는 기술을 제공하고자 한다.The present invention relates to a method for pre-processing a virtualization-sensitive instruction to implement virtualization in an ARM-based operating system, and more particularly, to a method for detecting a virtualization-sensitive instruction in a kernel source code compile and storing the position in a specific section, Emulation of virtualization-sensitive instructions for virtual machine operation by emulating virtualization-sensitive instructions by changing virtualization-sensitive instructions to trap-generating instructions and offsets using section information in the compiled kernel's Executable and Linking Format (ELF) And to provide a technique for effectively performing emulation by using the same.

그리고 명세서 전체에서 "모듈"이란 용어는 특정한 기능이나 동작을 처리하는 하나의 단위를 의미하며, 이는 하드웨어 또는 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.
And throughout the specification, the term "module" refers to a unit for handling a particular function or operation, which may be implemented in hardware or software, or a combination of hardware and software.

이하, 본 발명의 일 실시 예에 따른 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템에 대해 도 2를 참조하여 자세히 살펴보기로 한다.Hereinafter, a policy-based provision system for virtualization of an ARM-based operating system according to an embodiment of the present invention will be described in detail with reference to FIG.

도 2는 본 발명의 일 실시 예에 따른 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템의 개략적인 구성도이다.2 is a schematic configuration diagram of a policy-based provision system for virtualization of an ARM-based operating system according to an embodiment of the present invention.

도 2를 참조하면, 본 발명이 적용된 시스템(200)은 시스템 콜 인터페이스(210), 제어 모듈(213) 및 하드웨어(212)를 포함한다.Referring to FIG. 2, a system 200 to which the present invention is applied includes a system call interface 210, a control module 213, and hardware 212.

상기 시스템 콜 인터페이스(210)은 유저 모드 프로세스인 응용 어플리케이션이 커널의 기능을 사용 가능하게 한다.The system call interface 210 enables an application, which is a user mode process, to use the functions of the kernel.

여기서, 상기 유저 모드는 커널 모드와 함께 유닉스(Unix) 시스템의 대표적인 특징 중에 하나로 나뉘어져 있다. Herein, the user mode is divided into one of the representative features of the Unix system together with the kernel mode.

상기 커널 모드는 특권 모드(Privileged mode)로서 모든 주소 공간에 접근할 수 있고 모든 명령(instruction)을 수행할 수 있다.The kernel mode is a privileged mode in which all address space is accessible and all instructions can be executed.

상기 유저 모드는 해당 유저 모드에 할당된 주소 공간만 접근할 수 있고 상기 커널 모드의 주소 공간에 대해서는 접근 불가능한 것으로, 시스템에 치명적인 영향을 끼칠 수 있는 특권 명령(mrs, msr, ldrbt, strbt 등)들은 사용할 수가 없다.Privileged commands (mrs, msr, ldrbt, strbt, etc.) that may have a catastrophic effect on the system are accessible only to the address space allocated to the user mode and not accessible to the address space of the kernel mode I can not use it.

이와 같이, 커널 모드 및 유저 모드를 구별하는 것은 응용 어플리케이션의 비정상적인 혹은 악의적인 수행에 대해서 시스템을 보호하기 위한 것이다.Thus, distinguishing between kernel mode and user mode is intended to protect the system against abnormal or malicious performance of application applications.

계속해서, 상기 제어 모듈(213)은 커맨드 검출 모듈(214) 및 기반 정책 모듈(216)을 포함한다.Subsequently, the control module 213 includes a command detection module 214 and an infrastructure policy module 216.

상기 커맨드 검출 모듈(214)는 게스트 운영체제(Guest OS) 컴파일 시 특정 모드에서 트랩이 발생되지 않는 명령어를 검출한다.The command detection module 214 detects an instruction for which a trap is not generated in a specific mode at the time of compiling the guest operating system (guest OS).

이때, 상기 가상화 민감 명령어 탐지 시 해당 명령어는 하기와 같이 처리된다.At this time, when detecting the virtualization sensitive command, the corresponding command is processed as follows.

Figure pat00001
Figure pat00001

상기 기반 정책 모듈(216)은 상기 커맨드 검출 모듈(214)에서 검출된 명령어를 소정 실행 파일의 특정 영역에 저장하고, 상기 저장된 명령어를 시스템 콜 인터페이스가 가능한 명령어로 변환하고, 상기 특정 영역의 오프셋으로 변환하여 상기 게스트 운영체제를 가상화하도록 제어한다.The base policy module 216 stores the command detected by the command detection module 214 in a specific area of a predetermined executable file, converts the stored command into a command capable of a system call interface, And controls to virtualize the guest operating system.

이때, 상기 특정 모드는 미리 할당된 주소 영역에만 접근 가능한 유저 모드 즉, 비 특권 모드(Non-privileged mode)를 의미하고, 상기 검출된 명령어는 응용 어플리케이션이 동작 가능한 유저 모드에서 수행 시 트랩이 발생하지 않는 가상화 민감 명령어를 의미한다.In this case, the specific mode refers to a user mode which is accessible only to a preallocated address area, that is, a non-privileged mode, and the detected instruction is a trap that is generated when the application is executed in a user mode Which means no virtualization sensitive instructions.

또한, 상기 기반 정책 모듈(216)은 상기 저장된 명령어를 커널 소스 코드 컴파일 시 이엘에프(Executable and Linking Format, ELF) 파일의 특정 섹션에 그 위치를 저장하고, 상기 저장된 명령어의 가상 주소가 저장된 위치에 해당 명령어의 디폴트 바이너리를 저장한다.In addition, the base policy module 216 stores the location of the stored instruction in a specific section of an Executable and Linking Format (ELF) file at the time of compiling the kernel source code, Stores the default binary for the command.

이때, 상기 ELF 파일은 상기 저장된 명령어에 대한 정보를 미리 컴파일된 커널의 파일을 의미하는 것으로, 하기는 컴파일된 커널의 ELF 파일에서 상기 저장된 명령어를 시스템 콜 인터페이스(210)에 접근 가능한 명령어 변환 시의 처리 과정이다.Hereinafter, the ELF file refers to a file of a kernel compiled with information on the stored command. The following description will be made on the assumption that the stored command in the ELF file of the compiled kernel, Process.

Figure pat00002
Figure pat00002

상기 기반 정책 모듈(216)에서 변환된 명령어는 응용 어플리케이션이 시스템 콜을 호출하기 위해서 사용하고 트랩 발생이 가능한 소프트웨어 인터럽트(Software Interrupt, SWI) 명령어를 의미하는 것으로, 상기 응용 어플리케이션은 유저 모드에서 동작하기 때문에 커널 영역에는 커널 함수 또는 커널 자료 구조에 대해서 접근할 수 없으므로, 상기 응용 어플리케이션이 커널 영역에 있는 커널 함수 또는 자료 구조를 사용하기 위해서는 상기 시스템 콜 인터페이스(210)을 사용해야 한다.The translated instruction in the base policy module 216 means a software interrupt (SWI) instruction that an application uses to call a system call and a trap can be generated. The application operates in a user mode Therefore, since the kernel function or the kernel data structure can not be accessed in the kernel area, the application program must use the system call interface 210 to use a kernel function or a data structure in the kernel area.

이러한 시스템 콜 인터페이스(210)은 소프트웨어 인터럽트를 사용해 구현되는 것으로, 상기 응용 어플리케이션은 SWI 명령어를 명시적으로 호출해서 시스템 콜 인터페이스(210)을 호출한다.This system call interface 210 is implemented using a software interrupt, and the application application calls the system call interface 210 by explicitly calling the SWI instruction.

그리고, 상기 기반 정책 모듈(216)은 상기 저장된 명령어를 가상 머신 동작을 위한 에뮬레이션(Emulation)을 수행한다.
The base policy module 216 performs the emulation for the virtual machine operation.

이하에서는, 본 발명의 일 실시 예에 따른 ARM 기반 운영체제의 가상화를 위한 정책 기반 시스템의 기반 정책 모듈에서 컴파일된 ELF 파일의 구조를 도 3을 참조하여 자세히 살펴보기로 한다.Hereinafter, a structure of an ELF file compiled in a policy-based system based policy module for virtualization of an ARM-based operating system according to an embodiment of the present invention will be described in detail with reference to FIG.

도 3은 본 발명의 일 실시 예에 따른 ARM 기반 운영체제의 가상화를 위한 정책 기반 시스템의 기반 정책 모듈에서 컴파일된 ELF 파일의 구조를 보인 것으로, 도 3을 참조하면, 커널 소스 코드(S322)에서 컴파일러인 ccl을 스크립트 파일로 변환하여 수정된 ccl(S324)은 원래의 컴파일러인 cc1을 호출한 뒤(S326), 본 발명에 따른 커맨드 검출 모듈 및 기반 정책 모듈의 동작에 따라 arm-parse를 수행시킨다(S328).FIG. 3 shows a structure of an ELF file compiled in a policy-based system based policy module for virtualization of an ARM-based operating system according to an embodiment of the present invention. Referring to FIG. 3, in the kernel source code S322, The modified ccl (S324), which has been converted into a script file, calls the original compiler cc1 (S326), and performs arm-parse according to the operation of the command detection module and the base policy module according to the present invention S328).

상기 arm-parse는 상기 수정된 cc1(S324)이 수행된 결과인 .s(S326) 파일에서 가상화 민감 명령어를 검출하여 그 위치를 특정 섹션에 저장한다(S332).The arm-parse detects the virtualization-sensitive command in the file .s (S326) which is the result of the execution of the modified cc1 (S324) and stores the virtualization-sensitive command in a specific section (S332).

여기서, 상기 가상화 민감 명령어의 위치를 섹션에 저장하기 위해서 ARM 어셈블러의 디렉티브인 .pushsection 과 .popsection을 사용한다.Here, we use the ARM assembler directives .pushsection and .popsection to store the location of the virtualization sensitive instructions in the section.

이후, 상기 as 파일을 어셈블하여 오브젝트 파일인 .o 파일을 생성한다(S334). Thereafter, the as file is assembled to generate an .o file which is an object file (S334).

그리고 링커인 collect2(S336)은 상기 생성된 .o(S334) 파일을 링크하여 최종 결과물인 ELF 포맷의 vmlinux 파일을 생성한다(S338).The linker collect2 (S336) links the generated .o (S334) file to generate a vmlinux file in ELF format, which is the final result (S338).

이와 같은 과정을 거쳐 컴파일된 커널 ELF 파일은 도 4와 같은 구조이다.The kernel ELF file thus compiled is shown in FIG.

도 4를 참조하면, 상기 컴파일된 커널 ELF 파일에서 .sensitive(434) 섹션은 그대로 둘 경우 일반 하드웨어에서도 부팅이 가능하고 가상화를 할 경우에는 상기 .sensitive(434)섹션에 있는 가상화 민감 명령어의 위치를 보고 원래의 가상화 민감 명령어를 찾아 해당 명령어를 트랩 발생 명령어인 SWI 명령어와 .sensitive(434) 섹션에 저장한다. 이러한 방법을 통해 커널 수행 도중 가상화 민감 명령어가 수행될 위치가 되면 트랩을 발생시킨 원래의 가상화 민감 명령어에 대한 정보가 필요한데 이 정보는 .sensitive(434) 섹션에서 SWI 명령어 뒤에 있는 오프셋을 더해 검출할 수 있다.
Referring to FIG. 4, in the compiled kernel ELF file, if the .sensitive (434) section is left as it is, it is bootable in general hardware. When virtualization is performed, the position of the virtualization sensitive command in the .sensitive (434) Look for the original virtualization-sensitive instruction and save it in the SWI instruction and the .sensitive (434) section, which are the trap generation instructions. In this way, when the virtualization sensitive instruction is to be executed during kernel execution, information about the original virtualization sensitive instruction that caused the trap is needed. This information can be detected by adding the offset behind the SWI instruction in the .sensitive (434) have.

이상 본 발명의 일 실시 예에 따른 ARM 기반 운영체제의 가상화를 위한 정책 기반 시스템의 개략적인 구성을 살펴보았다.Hereinabove, a schematic configuration of a policy-based system for virtualization of an ARM-based operating system according to an embodiment of the present invention has been described.

이하에서는, 본 발명의 일 실시 예에 따른 ARM 기반 운영체제의 가상화를 위한 정책 기반 제공 방법에 관해 도 5를 참조하여 살펴보기로 한다.Hereinafter, a policy-based provision method for virtualization of an ARM-based operating system according to an embodiment of the present invention will be described with reference to FIG.

도 5는 본 발명의 일 실시 예에 ARM 기반 운영체제의 가상화를 위한 정책 기반 제공 방법에 관한 흐름도이다.FIG. 5 is a flowchart of a policy-based provision method for virtualization of an ARM-based operating system according to an exemplary embodiment of the present invention.

도 5를 참조하면, 510 과정에서 게스트 운영체제를 컴파일하고, 512 과정에서 상기 게스트 운영체제 컴파일 수행 도중 특정 모드에서 트랩이 발생되지 않는 가상화 민감 명령어를 검출한다.Referring to FIG. 5, a guest operating system is compiled at step 510, and at step 512, a virtualization sensitive command that does not cause a trap in a specific mode during the compilation of the guest operating system is detected.

이때, 상기 특정 모드는 미리 할당된 주소 영역에만 접근 가능한 비 특권 모드(Non-privileged mode)를 의미하며, 상기 가상화 민감 명령어는 응용 어플리케이션이 동작 가능한 유저 모드에서 수행 시 트랩이 발생하지 않는다.In this case, the specific mode refers to a non-privileged mode accessible only to a preallocated address area, and the virtualization sensitive command does not cause a trap when the application is executed in a user mode in which an application can operate.

514 과정에서 커널 소스 코드를 컴파일하고, 516 과정에서 상기 검출된 가상화 민감 명령어를 이엘에프(Executable and Linking Format, ELF) 파일의 특정 섹션에 그 위치를 저장한다.In step 514, the kernel source code is compiled. In step 516, the detected virtualization sensitive command is stored in a specific section of an Executable and Linking Format (ELF) file.

이때, 상기 ELF 파일은 상기 저장된 명령어에 대한 정보를 미리 컴파일된 커널의 파일을 의미한다.In this case, the ELF file refers to a file of a kernel compiled with information on the stored command.

518 과정에서 상기 저장된 가상화 민감 명령어를 소프트웨어 인터럽트(Software Interrupt, SWI)명령어로 변환한고, 520 과정에서 상기 특정 섹션의 오프셋으로 변환한다.In step 518, the stored virtualization sensitive instruction is converted into a software interrupt (SWI) instruction. In step 520, the virtualization instruction is converted into an offset of the specific section.

이후, 522 과정에서는 게스트 운영체제를 가상화하여, 524 과정에서 상기 가상화된 게스트 운영체제를 수행한다.
In step 522, the guest operating system is virtualized, and the virtualized guest operating system is executed in step 524.

상기와 같이 본 발명에 따른 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템 및 방법에 관한 동작이 이루어질 수 있으며, 한편 상기한 본 발명의 설명에서는 구체적인 실시 예에 관해 설명하였으나 여러 가지 변형이 본 발명의 범위를 벗어나지 않고 실시될 수 있다. 따라서 본 발명의 범위는 설명된 실시 예에 의하여 정할 것이 아니고 청구범위와 청구범위의 균등한 것에 의하여 정하여져야 할 것이다.As described above, the operation of the policy-based provision system and method for virtualization of the ARM-based operating system according to the present invention can be performed. While the present invention has been described with respect to the specific embodiments, Can be carried out without departing from the scope. Accordingly, the scope of the present invention should not be limited by the illustrated embodiments, but should be determined by equivalents of the claims and the claims.

210: 시스템 콜 인터페이스 213: 제어 모듈
214: 커맨드 검출 모듈 216: 기반 정책 모듈
212: 하드웨어
210: system call interface 213: control module
214: command detection module 216: based policy module
212: Hardware

Claims (13)

ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템에 있어서,
게스트 운영체제(Guest OS) 컴파일 시 특정 모드에서 트랩이 발생되지 않는 명령어를 검출하는 커맨드 검출 모듈과,
상기 커맨드 검출 모듈에서 검출된 명령어를 소정 실행 파일의 특정 영역에 저장하고, 상기 저장된 명령어를 시스템 콜 인터페이스가 가능한 명령어로 변환하고, 상기 특정 영역의 오프셋으로 변환하여 상기 게스트 운영체제를 가상화하도록 제어하는 기반 정책 모듈을 포함함을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템.
A policy-based provisioning system for virtualization of an ARM-based operating system,
A command detection module for detecting an instruction that does not generate a trap in a specific mode when compiling a guest OS;
A base for controlling the guest operating system to virtualize the guest operating system by converting the stored command into a command for enabling a system call interface and converting the stored command into an offset of the specific area, Policy-based provisioning system for virtualization of an ARM-based operating system.
제1항에 있어서, 상기 특정 모드는,
미리 할당된 주소 영역에만 접근 가능한 비 특권모드(Non-privileged mode)임을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템.
The method according to claim 1,
And a non-privileged mode accessible only to a pre-allocated address area.
제1항에 있어서, 상기 검출된 명령어는,
응용 어플리케이션이 동작 가능한 유저 모드에서 수행 시 트랩이 발생하지 않는 가상화 민감 명령어임을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템.
The method of claim 1,
Wherein the virtual application is a virtualization-sensitive instruction that does not cause a trap when the application is executed in a user mode in which the application is operable.
제1항에 있어서, 상기 기반 정책 모듈은,
상기 저장된 명령어를 커널 소스 코드 컴파일 시 이엘에프(ELF, Executable and Linking Format) 파일의 특정 섹션에 그 위치를 저장함을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템.
2. The system of claim 1,
And storing the stored instruction in a specific section of an executable and linking format (ELF) file when the kernel source code is compiled.
제1항에 있어서, 상기 변환된 명령어는,
응용 어플리케이션이 시스템 콜을 호출하기 위해서 사용하고 트랩 발생이 가능한 소프트웨어 인터럽트(Software Interrupt, SWI) 명령어임을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템.
2. The method of claim 1,
Wherein the application program is a software interrupt (SWI) instruction that is used by an application to call a system call and generate a trap.
제1항에 있어서, 상기 기반 정책 모듈은,
상기 저장된 명령어의 가상 주소가 저장된 위치에 해당 명령어의 디폴트 바이너리를 저장함을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템.
2. The system of claim 1,
Wherein the default binary of the instruction word is stored in a location where the virtual address of the stored instruction word is stored.
제4항에 있어서, 상기 ELF 파일은,
상기 저장된 명령어에 대한 정보를 미리 컴파일된 커널의 파일임을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템.
The method according to claim 4,
Wherein the information about the stored command is a file of a precompiled kernel.
제1항에 있어서, 상기 기반 정책 모듈은,
상기 저장된 명령어를 가상 머신 동작을 위한 에뮬레이션(Emulation)을 수행함을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템.
2. The system of claim 1,
Wherein the emulation of the stored instructions is performed for a virtual machine operation.
제1항에 있어서, 상기 기반 정책 모듈은,
상기 게스트 운영체제 컴파일 시 특정 컴파일러를 스크립트 파일로 변환함을 특징으로하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 시스템.
2. The system of claim 1,
And the specific compiler is converted into a script file when the guest operating system is compiled.
ARM 기반 운영체제의 가상화를 위한 정책기반 제공 방법에 있어서,
게스트 운영체제를 컴파일하는 과정과,
상기 게스트 운영체제 컴파일 수행 도중 특정 모드에서 트랩이 발생되지 않는 가상화 민감 명령어를 검출하는 과정과,
커널 소스 코드를 컴파일하는 과정과,
상기 검출된 가상화 민감 명령어를 이엘에프(ELF, Executable and Linking Format) 파일의 특정 섹션에 그 위치를 저장하는 과정과,
상기 저장된 가상화 민감 명령어를 소프트웨어 인터럽트(Software Interrupt, SWI) 명령어 및 상기 특정 섹션의 오프셋으로 변환하는 과정과,
상기 게스트 운영체제를 가상화하여 상기 가상화된 게스트 운영체제를 수행하는 과정을 포함함을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 방법.
A policy-based provisioning method for virtualization of an ARM-based operating system,
The process of compiling the guest operating system,
Detecting a virtual sensitive command in which a trap is not generated in a specific mode while compiling the guest OS;
The process of compiling the kernel source code,
Storing the detected virtualization sensitive command in a specific section of an Executable and Linking Format (ELF) file;
Translating the stored virtualization sensitive instructions into Software Interrupt (SWI) instructions and offsets of the specific sections;
And virtualizing the guest operating system to perform the virtualized guest operating system.
제10항에 있어서, 상기 특정 모드는,
미리 할당된 주소 영역에만 접근 가능한 비 특권모드(Non-privileged mode)임을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 방법.
11. The method according to claim 10,
Wherein the non-privileged mode is a non-privileged mode accessible only to a pre-allocated address region.
제10항에 있어서, 상기 가상화 민감 명령어는,
응용 어플리케이션이 동작 가능한 유저 모드에서 수행 시 트랩이 발생하지 않음을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 방법.
11. The method of claim 10, wherein the virtualization-
A method for providing policy-based virtualization for an ARM-based operating system, characterized in that no trap occurs when the application is executed in a user mode in which the application is operable.
제10항에 있어서,
상기 저장된 가상화 민감 명령어의 가상 주소가 저장된 위치에 상기 가상화 민감 명령어의 디폴트 바이너리를 저장하는 과정을 더 포함함을 특징으로 하는 ARM 기반 운영체제의 가상화를 위한 정책기반 제공 방법.
The method of claim 10,
Further comprising the step of storing a default binary of the virtualization sensitive instruction in a location where the virtual address of the stored virtualization sensitive instruction is stored.
KR1020110116526A 2011-11-09 2011-11-09 System and method that provides policies for virtualizing arm based operating system KR101433644B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020110116526A KR101433644B1 (en) 2011-11-09 2011-11-09 System and method that provides policies for virtualizing arm based operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020110116526A KR101433644B1 (en) 2011-11-09 2011-11-09 System and method that provides policies for virtualizing arm based operating system

Publications (2)

Publication Number Publication Date
KR20130051271A true KR20130051271A (en) 2013-05-20
KR101433644B1 KR101433644B1 (en) 2014-08-27

Family

ID=48661324

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020110116526A KR101433644B1 (en) 2011-11-09 2011-11-09 System and method that provides policies for virtualizing arm based operating system

Country Status (1)

Country Link
KR (1) KR101433644B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190060109A (en) * 2017-11-24 2019-06-03 서울대학교산학협력단 Instruction-level data isolation method and apparatus

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7904903B2 (en) * 2005-06-30 2011-03-08 Intel Corporation Selective register save and restore upon context switch using trap
JP5245539B2 (en) * 2008-05-27 2013-07-24 富士通株式会社 Virtual machine I / O emulation mechanism
KR101640769B1 (en) * 2009-11-06 2016-07-19 삼성전자주식회사 Virtual system and instruction executing method thereof
JP2011123635A (en) * 2009-12-10 2011-06-23 Nec Corp Information processing apparatus, control method for the same and recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190060109A (en) * 2017-11-24 2019-06-03 서울대학교산학협력단 Instruction-level data isolation method and apparatus

Also Published As

Publication number Publication date
KR101433644B1 (en) 2014-08-27

Similar Documents

Publication Publication Date Title
US10191761B2 (en) Adaptive dynamic selection and application of multiple virtualization techniques
US10289435B2 (en) Instruction set emulation for guest operating systems
Iqbal et al. An overview of microkernel, hypervisor and microvisor virtualization approaches for embedded systems
US9454676B2 (en) Technologies for preventing hook-skipping attacks using processor virtualization features
KR101673435B1 (en) Creating an isolated execution environment in a co-designed processor
US8938723B1 (en) Use of GPU for support and acceleration of virtual machines and virtual environments
US8510756B1 (en) Guest operating system code optimization for virtual machine
Xiong et al. Libvmi: a library for bridging the semantic gap between guest OS and VMM
JP6458959B2 (en) Co-designed dynamic language accelerator for processors
WO2008144553A1 (en) Adaptive dynamic selection and application of multiple virtualization techniques
KR20060097597A (en) Systems and methods for multi-level intercept processing in a virtual machine environment
US10019275B2 (en) Hypervisor context switching using a trampoline scheme in processors having more than two hierarchical privilege levels
Lim et al. NEVE: Nested virtualization extensions for ARM
US11693722B2 (en) Fast memory mapped IO support by register switch
US8281296B2 (en) Cross-ISA inlining in a system virtual machine
KR20130134581A (en) Method and apparatus for supporting virtualization of loadable module
Oh et al. ViMo (virtualization for mobile): a virtual machine monitor supporting full virtualization for ARM mobile systems
Vahidi et al. VETE: Virtualizing the Trusted Execution Environment
Kanda et al. SIGMA system: A multi-OS environment for embedded systems
KR101433644B1 (en) System and method that provides policies for virtualizing arm based operating system
Baldin et al. Proteus, a hybrid virtualization platform for embedded systems
US9122549B2 (en) Method and system for emulation of instructions and hardware using background guest mode processing
CN113849397A (en) Execution engine, virtual machine, related apparatus and related methods
US20230350710A1 (en) Fast memory mapped io support by register switch
Tamberi et al. Semantics-driven introspection in a virtual environment

Legal Events

Date Code Title Description
A201 Request for examination
N231 Notification of change of applicant
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20180619

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20190814

Year of fee payment: 6