KR102660736B1 - Secure offloading of computations from trusted execution environment(tee) to accelerators - Google Patents

Secure offloading of computations from trusted execution environment(tee) to accelerators Download PDF

Info

Publication number
KR102660736B1
KR102660736B1 KR1020210091418A KR20210091418A KR102660736B1 KR 102660736 B1 KR102660736 B1 KR 102660736B1 KR 1020210091418 A KR1020210091418 A KR 1020210091418A KR 20210091418 A KR20210091418 A KR 20210091418A KR 102660736 B1 KR102660736 B1 KR 102660736B1
Authority
KR
South Korea
Prior art keywords
accelerator
data
offloading
environment
trusted execution
Prior art date
Application number
KR1020210091418A
Other languages
Korean (ko)
Other versions
KR20230010963A (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 KR1020210091418A priority Critical patent/KR102660736B1/en
Publication of KR20230010963A publication Critical patent/KR20230010963A/en
Application granted granted Critical
Publication of KR102660736B1 publication Critical patent/KR102660736B1/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/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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/22Microcontrol or microprogram arrangements
    • G06F9/28Enhancement of operational speed, e.g. by using several microcontrol devices operating in parallel
    • 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/45545Guest-host, i.e. hypervisor is an application program itself, e.g. VirtualBox
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • 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/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • 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/45558Hypervisor-specific management and integration aspects
    • G06F2009/45587Isolation or security of virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)

Abstract

신뢰실행환경(TEE)에서 안전하게 가속기로 연산을 오프로딩하는 기법이 개시된다. 일 실시예에 따른 오프로딩 시스템에 의해 수행되는 데이터 연산을 오프로딩하는 방법은, 가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 채널을 수립하는 단계; 및 상기 수립된 입출력 채널을 통해 상기 신뢰실행환경에서 상기 가속기로 연산을 오프로딩하는 단계를 포함할 수 있다. A technique for safely offloading computation to an accelerator in a trusted execution environment (TEE) is disclosed. A method of offloading a data operation performed by an offloading system according to an embodiment includes establishing an input/output channel between a trusted execution environment of a processor and an accelerator in an environment in which an accelerator is mounted; and offloading a computation from the trusted execution environment to the accelerator through the established input/output channel.

Figure R1020210091418
Figure R1020210091418

Description

신뢰실행환경(TEE)에서 안전하게 가속기로 연산을 오프로딩하는 기법{SECURE OFFLOADING OF COMPUTATIONS FROM TRUSTED EXECUTION ENVIRONMENT(TEE) TO ACCELERATORS}A technique for safely offloading computations from a trusted execution environment (TEE) to an accelerator {SECURE OFFLOADING OF COMPUTATIONS FROM TRUSTED EXECUTION ENVIRONMENT(TEE) TO ACCELERATORS}

아래의 설명은 신뢰실행환경에서 공공 서버 환경의 가속기로 안전하게 연산을 오프로딩하는 기술에 관한 것이다.The explanation below is about technology for safely offloading computation from a trusted execution environment to an accelerator in a public server environment.

클라우드 서비스 제공자(CSP)가 제공하는 클라우드 컴퓨팅 서비스는 근래 확장성, 편의성 등의 이유로 폭발적인 성장을 이루었다. 한편, 인공지능 분야에서 머신러닝(ML) 기술도 세간의 주목을 받으며 Machine Learning as a Service (MLaaS)은 데이터 과학자 및 인공지능 연구자들에게 매력적인 선택지가 되었다. 그러나 클라우드 환경은 보안, 특히 프라이버시 보호에 이상적인 환경은 아니다. CPU, 가속기 등의 하드웨어를 다른 유저들과 공유해야 하는 상황일 수도 있는데, 가속기를 공유하는 상황에서 데이터를 빼내는 공격은 여러 차례 제시된 적 있다. 이를 통해 머신러닝 모델, 알고리즘, 데이터 셋 등 인공지능 연구자의 자산이 유출될 가능성이 있다. 은행, 병원 등 다양한 기관에서 개인정보 관련 데이터를 다량 가지고 있으므로 머신러닝에서 이를 보호하고자 프라이버시 보호 머신러닝(Privacy Preserving Machine Learning, PPML) 기법이 생겨났다.Cloud computing services provided by cloud service providers (CSPs) have recently experienced explosive growth due to scalability and convenience. Meanwhile, in the field of artificial intelligence, machine learning (ML) technology is also receiving public attention, and Machine Learning as a Service (MLaaS) has become an attractive option for data scientists and artificial intelligence researchers. However, the cloud environment is not an ideal environment for security, especially privacy protection. There may be a situation where hardware such as CPU and accelerator must be shared with other users, and attacks that steal data in situations where accelerators are shared have been proposed several times. Through this, there is a possibility that artificial intelligence researchers' assets, such as machine learning models, algorithms, and data sets, may be leaked. Since various institutions such as banks and hospitals have a large amount of personal information-related data, Privacy Preserving Machine Learning (PPML) techniques have been developed to protect this in machine learning.

프라이버시 보호 머신러닝은 민감한 개인정보를 포함하는 모델을 트레이닝 하거나 모델을 이용해 예측할 때 다른 사용자로부터 해당 모델을 보호하는 기술이다. 하지만 기존의 기술은 정확성을 떨어뜨리거나, 고수준의 보안 지식이 필요하여 사용하기 어렵거나, 성능을 떨어뜨린다. 다자간 연산(Multi-Party Computation, MPC)이나 동형암호(Homomorphic Encryption, HE) 등은 암호 기반이므로 성능에 막대한 영향을 미친다. 하드웨어 기반 보안을 통한 머신러닝은 특수한 하드웨어를 사용하거나 기존 하드웨어 수정이 필요하여 호환성이 떨어진다. 차별화된 프라이버시(Differential Privacy, DP)의 경우 데이터에 노이즈를 추가하는데, 이는 정확성을 떨어뜨린다.Privacy protection machine learning is a technology that protects the model from other users when training a model containing sensitive personal information or making predictions using the model. However, existing technologies reduce accuracy, require high-level security knowledge, are difficult to use, or reduce performance. Multi-Party Computation (MPC) and Homomorphic Encryption (HE) are based on cryptography, so they have a huge impact on performance. Machine learning through hardware-based security uses special hardware or requires modification of existing hardware, making it less compatible. Differential Privacy (DP) adds noise to the data, which reduces accuracy.

Intel SGX를 비롯한 프로세서 기반 신뢰실행환경(Trusted Execution Environment, TEE)의 연구들이 대두됨에 따라 머신러닝 연산을 신뢰실행환경 안에서 하려는 연구들이 여럿 진행되었다. Intel SGX의 경우 많은 한계점을 가지고 있다. 예를 들어, SGX가 보호하는 메모리 영역인 enclave page cache (EPC)의 크기가 90MB밖에 되지 않는데, 이는 일반적인 모델이나 데이터 크기에 한참 미치지 못한다. 또한, 시스템 콜이 SGX 내부에서는 불가능하며 신뢰할 수 있는 I/O 기기와의 통신 채널이 존재하지 않으므로 가속기 등 주변 기기를 이용하는데 제약이 따른다.As research on processor-based Trusted Execution Environment (TEE), including Intel SGX, has emerged, several studies have been conducted to perform machine learning calculations within a trusted execution environment. Intel SGX has many limitations. For example, the size of the enclave page cache (EPC), a memory area protected by SGX, is only 90MB, which is far below the typical model or data size. Additionally, system calls are not possible inside SGX and there are no communication channels with reliable I/O devices, so there are restrictions on using peripheral devices such as accelerators.

최근 라이브러리 OS에 관련된 연구들은 이러한 제약을 해결하기 위해 SGX에서 시스템 콜을 가능하게 하거나 파이썬 코드를 실행되게 하는 등의 연구가 진행된 바 있다. 그러나 시스템 콜의 인자는 보호되지 않는다는 한계가 여전히 존재한다. SGXIO 연구에서는generic trusted I/O path를 SGX와 장치간의 수립하고자 하였는데, 이는 가속기 사용에 최적화 되어있지 않고 실제 인공지능 연구자가 보편적으로 사용하는 파이썬 코드를 실행하는 방법을 제시하지 않았다는 단점이 있다.Recently, research related to library OS has been conducted to solve these limitations by enabling system calls or executing Python code in SGX. However, there is still a limitation that system call arguments are not protected. The SGXIO study sought to establish a generic trusted I/O path between SGX and devices, but this has the disadvantage of not being optimized for accelerator use and not suggesting a method of executing Python code commonly used by actual artificial intelligence researchers.

머신러닝에 필요한 연산을 CPU만을 이용하여 수행하는 것은 가속기를 이용하는 것에 비하여 수백 배의 성능저하가 일어난다. 머신러닝에 필요한 연산은 병렬 연산이 많고, 바로 가속기가 병렬 연산에 최적화되어 있기 때문이다. 이에 따라 SGX에서 프로그램을 실행하다가 가속기에서 수행되어야 할 연산은 가속기로 오프로딩하는 기법의 필요성이 대두되고 있다.Performing the calculations required for machine learning using only the CPU results in performance degradation hundreds of times compared to using an accelerator. This is because many of the computations required for machine learning involve parallel computations, and accelerators are optimized for parallel computations. Accordingly, the need for a technique to offload calculations to be performed in the accelerator while executing a program in SGX to the accelerator is emerging.

가속기가 탑재된 환경에서 시스템(커널) 권한의 공격자로부터 가속기에 오프로딩하는 데이터를 안전하게 보호하는 방법 및 시스템을 제공할 수 있다. 즉, 프로세서의 신뢰실행환경(TEE)과 가속기 사이의 I/O 채널을 수립하고 보호한다.In an environment where an accelerator is installed, a method and system can be provided to safely protect data offloaded to the accelerator from an attacker with system (kernel) privileges. In other words, it establishes and protects the I/O channel between the processor's Trusted Execution Environment (TEE) and the accelerator.

가속기나 프로세서의 아키텍처를 수정하지 않고 일반적인 기존의 시스템에 적용하는 방법 및 시스템을 제공할 수 있다.It is possible to provide a method and system that can be applied to a general existing system without modifying the architecture of the accelerator or processor.

동형암호(HE)나 차별화된 프라이버시(DP)를 사용하지 않고 성능 및 정확성을 향상시키는 방법 및 시스템을 제공할 수 있다. A method and system that improves performance and accuracy can be provided without using homomorphic encryption (HE) or differentiated privacy (DP).

오프로딩 시스템에 의해 수행되는 데이터 연산을 오프로딩하는 방법은, 가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 채널을 수립하는 단계; 및 상기 수립된 입출력 채널을 통해 상기 신뢰실행환경에서 상기 가속기로 연산을 오프로딩하는 단계를 포함할 수 있다. A method of offloading a data operation performed by an offloading system includes establishing an input/output channel between a trusted execution environment of a processor and an accelerator in an environment in which an accelerator is mounted; and offloading a computation from the trusted execution environment to the accelerator through the established input/output channel.

상기 가속기가 탑재된 환경은, 가속기가 탑재된 클라우드 환경 또는 커널 코드가 분리되어 생성된 신뢰할 수 있는 영역을 포함하는 가속기가 탑재된 환경을 포함할 수 있다. The environment in which the accelerator is installed may include a cloud environment in which the accelerator is installed, or an environment in which the accelerator is installed, including a trusted area created by separating kernel code.

상기 오프로딩하는 단계는, 상기 가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 통신을 가능하게 하는 API remoting기법을 통해 연산이 요청된 데이터를 상기 신뢰실행환경에서 상기 가속기로 아웃소싱하는 단계를 포함할 수 있다. The offloading step involves outsourcing data requested for operation from the trusted execution environment to the accelerator through an API remoting technique that enables input/output communication between the trusted execution environment of the processor and the accelerator in an environment in which the accelerator is mounted. May include steps.

상기 API remoting 기법은, 게스트(guest) 환경에서 입출력 요청이 발생되면 로컬(local) 혹은 원격(remote)의 호스트(host)로 전달하여 상기 발생된 입출력 요청을 처리하는 것을 의미할 수 있다. The API remoting technique may mean that when an input/output request occurs in a guest environment, it is transmitted to a local or remote host to process the generated input/output request.

상기 게스트 환경은, VM 인스턴스(Instance)이고, 상기 호스트 환경은, 하이퍼바이저(Hypervisor)일 수 있다. The guest environment may be a VM instance, and the host environment may be a hypervisor.

상기 게스트 환경은, 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역(Untrusted part of kernel)이고, 상기 호스트 환경은, 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역(trusted part of kernel)일 수 있다. The guest environment may be an untrusted part of the kernel in which the kernel code is separated, and the host environment may be a trusted part of the kernel in which the kernel code is separated.

상기 오프로딩하는 단계는, 상기 신뢰실행환경의 엔클레이브에서 사용자와 VM 인스턴스(Instance) 간 채널을 통해 VM 인스턴스(Instance)에 업로드된 암호화 데이터를 복호화하는 단계를 포함하고, 상기 VM 인스턴스(Instance)에 업로드된 암호화 데이터는, 사용자로부터 코드, 데이터, 모델을 포함하는 데이터가 암호화된 것일 수 있다. The offloading step includes decrypting the encrypted data uploaded to the VM instance through a channel between the user and the VM instance in the enclave of the trusted execution environment, and the VM instance (Instance) The encrypted data uploaded to may be encrypted data including code, data, and models from the user.

상기 오프로딩하는 단계는, 상기 VM 인스턴스(Instance)와 하이퍼바이저 간의 채널을 통해 상기 신뢰실행환경의 라이브러리 운영체제(Library OS)에 의해 엔클레이브에서 상기 복호화된 데이터가 암호화되고, 상기 암호화된 데이터가 엔클레이브 밖으로 복사되고, 시스템 콜을 통해 프론트엔드 드라이버(Frontend Driver)가 호출됨에 따라 물리적으로 인접한 페이지(physically contiguous page)에 상기 암호화된 데이터를 복사하는 단계를 포함할 수 있다. In the offloading step, the decrypted data is encrypted in the enclave by the library operating system (Library OS) of the trusted execution environment through a channel between the VM instance and the hypervisor, and the encrypted data is stored in the enclave. It may include copying the encrypted data out of the clave and copying the encrypted data to a physically contiguous page as the front-end driver is called through a system call.

상기 오프로딩하는 단계는, 상기 하이퍼바이저에서 상기 암호화된 데이터를 읽으며 상기 하이퍼바이저의 메모리에 상기 암호화된 데이터를 복호화하고, 가속기 API를 호출하여 상기 복호화된 데이터에 대한 연산을 수행하는 단계를 포함할 수 있다. The offloading step may include reading the encrypted data from the hypervisor, decrypting the encrypted data in the memory of the hypervisor, and performing an operation on the decrypted data by calling an accelerator API. You can.

상기 오프로딩하는 단계는, 신뢰실행환경의 엔클레이브에서 사용자와 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역 간 채널을 통해 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역에 업로드된 암호화 데이터를 복호화하는 단계를 포함하고, 상기 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역에 업로드된 암호화 데이터는, 사용자로부터 코드, 데이터 셋, 모델을 포함하는 데이터가 암호화된 것일 수 있다. In the offloading step, the user and kernel code are separated in the enclave of the trusted execution environment, and the kernel code is separated through a channel between untrusted areas of the kernel to decrypt the encrypted data uploaded to the untrusted area of the kernel. The encrypted data including the step, where the kernel code is separated and uploaded to an untrusted area of the kernel, may be encrypted data including code, data set, and model from the user.

상기 오프로딩하는 단계는, 상기 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역과 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역(trusted part of kernel) 간의 채널을 통해 상기 신뢰실행환경의 라이브러리 운영체제(Library OS)에 의해 엔클레이브에서 데이터가 암호화되고, 상기 암호화된 데이터가 엔클레이브 밖으로 복사되고, 시스템 콜을 통해 프론트엔드 드라이버(Frontend Driver)가 호출됨에 따라 물리적으로 인접한 페이지(physically contiguous page)에 상기 암호화된 데이터를 복사하는 단계를 포함할 수 있다.In the offloading step, the kernel code is separated from the untrusted area of the kernel and the kernel code is separated, and the library operating system (Library) of the trusted execution environment is provided through a channel between the trusted part of the kernel. Data is encrypted in the enclave by the OS, the encrypted data is copied out of the enclave, and the front-end driver is called through a system call, thereby encrypting the encrypted data on a physically contiguous page. It may include the step of copying the data.

상기 오프로딩하는 단계는, 상기 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역에서 상기 암호화된 데이터를 읽으며 상기 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역의 메모리에 상기 암호화된 데이터를 복호화하고, 가속기 API를 호출하여 상기 복호화된 데이터에 대한 연산을 수행하는 단계를 포함할 수 있다. In the offloading step, the kernel code is separated and reads the encrypted data in a trusted area of the kernel, the kernel code is separated and decrypts the encrypted data in the memory of the trusted area of the kernel, and the accelerator It may include calling an API to perform an operation on the decrypted data.

상기 오프로딩하는 단계는, 상기 가속기에서 상기 연산이 요청된 데이터에 대한 연산을 수행함에 따라 획득된 결과값이 암호화되고, 상기 암호화된 결과값이 상기 신뢰실행환경의 엔클레이브로 반환되는 단계를 포함할 수 있다. The offloading step includes encrypting a result obtained by performing an operation on data for which the operation is requested in the accelerator, and returning the encrypted result to the enclave of the trusted execution environment. can do.

오프로딩 시스템에 의해 수행되는 데이터 연산을 오프로딩하는 방법을 실행시키기 위해 컴퓨터 판독 가능한 저장매체에 저장된 컴퓨터 프로그램은, 가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 채널을 수립하는 단계; 및 상기 수립된 입출력 채널을 통해 상기 신뢰실행환경에서 상기 가속기로 연산을 오프로딩하는 단계를 포함할 수 있다. A computer program stored in a computer-readable storage medium to execute a method of offloading a data operation performed by an offloading system includes establishing an input/output channel between the trusted execution environment of the processor and the accelerator in an environment equipped with an accelerator. ; and offloading a computation from the trusted execution environment to the accelerator through the established input/output channel.

오프로딩 시스템은, 가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 채널을 수립하는 채널 수립부; 및 상기 수립된 입출력 채널을 통해 상기 신뢰실행환경에서 상기 가속기로 연산을 오프로딩하는 오프로딩부를 포함할 수 있다. The offloading system includes a channel establishment unit that establishes an input/output channel between the trusted execution environment of the processor and the accelerator in an environment where the accelerator is mounted; and an offloading unit that offloads calculations from the trusted execution environment to the accelerator through the established input/output channel.

신뢰실행환경(TEE)을 이용함으로써 데이터 유출에 대한 위험성을 낮출 수 있다.The risk of data leakage can be reduced by using a trusted execution environment (TEE).

SGX enclave에서 병렬 연산을 가속기에 안전하게 오프로딩하여 프로세서를 사용하는 것보다 성능 향상을 꾀할 수 있다.In an SGX enclave, parallel computation can be safely offloaded to an accelerator to improve performance compared to using a processor.

특별한 하드웨어를 추가로 구매하거나 기존 하드웨어를 수정할 필요가 없이 기존에 존재하는 하드웨어(프로세서 및 가속기)와 호환이 가능하다. It is compatible with existing hardware (processors and accelerators) without the need to purchase additional special hardware or modify existing hardware.

인공지능 연구자 및 데이터 과학자들이 기존에 사용하던 하이 레벨 코드(high level code)를 그대로 사용할 수 있다.Artificial intelligence researchers and data scientists can use the same high-level code that they previously used.

도 1은 클라우드 환경에서 가속기 사용 동작을 설명하기 위한 도면이다.
도 2는 일 실시예에 있어서, 데이터 연산을 오프로딩하는 동작을 설명하기 위한 예이다.
도 3은 일 실시예에 있어서, 데이터 연산을 오프로딩하는 동작을 설명하기 위한 또 다른 예이다.
도 4는 일 실시예에 있어서, 데이터의 이동 동작을 설명하기 위한 도면이다.
도 5는 일 실시예에 따른 오프로딩 시스템의 구성을 설명하기 위한 블록도이다.
도 6은 일 실시예에 따른 오프로딩 시스템에서 데이터 연산을 오프로딩하는 방법을 설명하기 위한 흐름도이다.
Figure 1 is a diagram for explaining the operation of using an accelerator in a cloud environment.
Figure 2 is an example for explaining an operation of offloading a data operation, according to an embodiment.
Figure 3 is another example for explaining an operation of offloading a data operation, according to an embodiment.
Figure 4 is a diagram for explaining a data movement operation, according to one embodiment.
Figure 5 is a block diagram for explaining the configuration of an offloading system according to an embodiment.
FIG. 6 is a flowchart illustrating a method of offloading data operations in an offloading system according to an embodiment.

이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

도 1은 클라우드 환경에서 가속기 사용 동작을 설명하기 위한 도면이다. Figure 1 is a diagram for explaining the operation of using an accelerator in a cloud environment.

도 1은 기존 인공지능 연구자가 클라우드 환경에서 컴퓨팅 인스턴스를 활용하여 가속기를 사용할 때 데이터가 이동하는 동작을 나타낸 도면이다. 사용자(user)(101)의 PC에서 인스턴스로 코드, 데이터 셋, 모델 등의 데이터(110)가 업로드될 수 있다. 사용자(101)의 PC에서 인스턴스(비신뢰 시스템)(120)로 업로드된 코드, 데이터 셋, 모델 등에 대한 데이터 코드가 실행될 수 있다. 이때, 가속기(130)로 데이터(110)가 전달되고, 가속기(130)에서 데이터(110)에 대한 연산이 수행됨에 따라 획득된 연산 결과를 전달받을 수 있다. Figure 1 is a diagram showing the movement of data when an existing artificial intelligence researcher uses an accelerator using a computing instance in a cloud environment. Data 110 such as code, data set, and model may be uploaded from the user 101's PC to the instance. Data codes for codes, data sets, models, etc. uploaded from the user's 101 PC to the instance (untrusted system) 120 may be executed. At this time, the data 110 is transmitted to the accelerator 130, and the operation result obtained as the accelerator 130 performs an operation on the data 110 can be received.

이와 같이, 기존 시스템이 공격자에 의해 장악 당할 경우, 데이터가 유출될 수 있다. Likewise, if the existing system is taken over by an attacker, data may be leaked.

클라우드는 일반적인 가상 환경이므로, 클라우드 서비스 제공자(Cloud Service Provider; CSP)는 기존 가속기를 가상 환경에서 이용할 수 있는 기법인 가속기 패스스루 혹은 가속기 가상화를 통하여 사용자가 가속기를 활용할 수 있도록 한다.Since the cloud is a general virtual environment, a cloud service provider (CSP) allows users to utilize accelerators through accelerator pass-through or accelerator virtualization, a technique that allows existing accelerators to be used in a virtual environment.

현 상황에서 인스턴스가 공격자에게 해킹을 당할 경우, 데이터가 무방비하게 노출되어 중요한 자산이 유출되게 된다. 이에, 실시예에서는 데이터 보호 제어 영역을 이용하여 가속기가 탑재된 환경에서 시스템(커널) 권한의 공격자로부터 가속기에 오프로딩하는 데이터를 안전하게 보호하는 동작에 대하여 설명하기로 한다. 이때, 데이터 보호 제어 영역은 신뢰실행환경에서 보호하는 메모리 영역인 엔클레이브(Enclaves)를 의미할 수 있다. 예를 들면, 인텔의 SGX일 수 있다. 특정 애플리케이션 코드와 메모리의 데이터를 분리하는 하드웨어 기반 메모리 암호화를 제공한다. 사용자 레벨 코드가 높은 권한 수준에서 실행되는 프로세스로부터 보호되도록 설계된 엔클레이브라고 불리는 메모리의 개인 영역을 할당할 수 있도록 허용한다. In the current situation, if an instance is hacked by an attacker, data will be exposed without protection and important assets will be leaked. Accordingly, in the embodiment, an operation to safely protect data offloaded to the accelerator from an attacker with system (kernel) privileges in an environment where the accelerator is mounted using the data protection control area will be described. At this time, the data protection control area may refer to enclaves, which are memory areas protected in a trusted execution environment. For example, it could be Intel's SGX. Provides hardware-based memory encryption that separates data in memory from specific application code. It allows user-level code to allocate private areas of memory called enclaves, which are designed to be protected from processes running at high privilege levels.

도 2는 일 실시예에 있어서, 데이터 연산을 오프로딩하는 동작을 설명하기 위한 예이다. Figure 2 is an example for explaining an operation of offloading a data operation, according to an embodiment.

오프로딩 시스템은 신뢰실행환경을 활용하여 실행중인 데이터와 디스크에 저장되는 데이터를 보호하고, 가속기 연산이 필요한 데이터를 API remoting 기법(201)을 통해 가속기로 아웃소싱할 수 있다. 이때, API remoting 채널을 통해 송수신되는 민감한 데이터는 암호화하여 보호할 수 있다. The offloading system utilizes a trusted execution environment to protect running data and data stored on disk, and data that requires accelerator calculation can be outsourced to the accelerator through the API remoting technique (201). At this time, sensitive data transmitted and received through the API remoting channel can be encrypted and protected.

신뢰실행환경의 내부에서는 Library OS를 이용하여 파이썬 등 하이 레벨 코드(high level code)를 실행할 수 있도록 한다. Inside the trusted execution environment, high level code such as Python can be executed using the Library OS.

오프로딩 시스템은 가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 채널을 수립하고, 수립된 입출력 채널을 통해 신뢰실행환경에서 가속기로 연산을 오프로딩할 수 있다. The offloading system establishes an input/output channel between the processor's trusted execution environment and the accelerator in an environment equipped with an accelerator, and can offload calculations from the trusted execution environment to the accelerator through the established input/output channel.

도 2를 참고하면, 가속기가 탑재된 클라우드 환경(200)을 나타낸 도면이다. 오프로딩 시스템은 가속기(130)가 탑재된 클라우드 환경(200)에서 프로세서의 신뢰실행환경과 가속기(130) 사이의 입출력 통신을 가능하게 하는 API remoting기법(201)을 통해 연산이 요청된 데이터(110)를 신뢰실행환경에서 가속기(130)로 아웃소싱할 수 있다. 이때, API remoting 기법(201)은, 게스트(guest) 환경에서 입출력 요청이 발생되면 로컬(local) 혹은 원격(remote)의 호스트(host)로 전달하여 발생된 입출력 요청을 처리하는 것을 의미한다. 실시예에서 게스트 환경은, VM 인스턴스(Instance)이고, 호스트 환경은, 하이퍼바이저(Hypervisor)일 수 있다.Referring to FIG. 2, it is a diagram showing a cloud environment 200 equipped with an accelerator. The offloading system provides data 110 for which operation is requested through an API remoting technique 201 that enables input/output communication between the trusted execution environment of the processor and the accelerator 130 in a cloud environment 200 equipped with an accelerator 130. ) can be outsourced to the accelerator 130 in a trusted execution environment. At this time, the API remoting technique 201 means that when an input/output request occurs in a guest environment, it is transmitted to a local or remote host to process the generated input/output request. In an embodiment, the guest environment may be a VM instance, and the host environment may be a hypervisor.

오프로딩 시스템은 사용자(101)와 VM 인스턴스(Instance)(210) 간 채널을 통해 사용자(101)로부터 코드, 데이터 셋, 모델을 포함하는 데이터(110)를 암호화하여 VM 인스턴스(210)에 업로드하고, VM 인스턴스(210)에서 신뢰실행환경의 엔클레이브(220)에서 암호화된 데이터를 복호화할 수 있다. 오프로딩 시스템은 VM 인스턴스(210)와 하이퍼바이저(250) 간의 채널을 통해 신뢰실행환경의 라이브러리 운영체제(Library OS)에 의해 엔클레이브(220)에서 데이터를 암호화하고, 암호화된 데이터가 엔클레이브(220)의 밖으로 복사되고, 시스템 콜을 통해 프론트엔드 드라이버(Frontend Driver)(230)가 호출됨에 따라 물리적으로 인접한 페이지(physically contiguous page)에 암호화된 데이터를 복사할 수 있다. 이때, 프론트엔드 드라이버(230)에서 할당된 페이지들은 물리적으로 인접하여 하이퍼바이저(250)에 직접 접근이 가능하므로 데이터 복사가 필요없다. 오프로딩 시스템은 하이퍼바이저(250)에서 암호화된 데이터를 읽으며 메모리에 암호화된 데이터를 복호화하고, 가속기 API(예를 들면, CUDA API)를 호출하여 복호화된 데이터에 대한 연산을 수행할 수 있다. 오프로딩 시스템은 가속기 API(예를 들면, CUDA API)를 통해 가속기에게 복호화된 데이터의 연산을 수행하도록 복호화된 데이터를 전달할 수 있다. 오프로딩 시스템은 가속기에서 데이터에 대한 연산을 수행함에 따라 획득된 결과값이 암호화되고, 암호화된 결과값을 신뢰실행환경의 엔클레이브로 반환할 수 있다.The offloading system encrypts data 110 including code, data set, and model from the user 101 through a channel between the user 101 and the VM instance 210 and uploads it to the VM instance 210. , the VM instance 210 can decrypt data encrypted in the enclave 220 of the trusted execution environment. The offloading system encrypts data in the enclave 220 by the library operating system (Library OS) of the trusted execution environment through a channel between the VM instance 210 and the hypervisor 250, and the encrypted data is stored in the enclave 220. ), and as the front-end driver 230 is called through a system call, the encrypted data can be copied to a physically contiguous page. At this time, the pages allocated in the front-end driver 230 are physically adjacent and can be directly accessed by the hypervisor 250, so there is no need to copy data. The offloading system may read encrypted data from the hypervisor 250, decrypt data encrypted in memory, and perform operations on the decrypted data by calling an accelerator API (eg, CUDA API). The offloading system may transmit decrypted data to an accelerator through an accelerator API (eg, CUDA API) to perform an operation on the decrypted data. The offloading system encrypts the results obtained by performing operations on data in the accelerator, and returns the encrypted results to the enclave of the trusted execution environment.

예를 들면, 사용자는 클라우드의 컴퓨팅 서비스(예를 들면, Amazon EC2)를 사용할 때 가속기가 포함된 인스턴스를 이용할 수 있다. 클라우드는 일반적으로 가상 환경을 사용하여 사용자는 하드웨어를 타인과 공유하게 될 확률이 높은데, 이는 공격자에게 더 많은 공격 벡터를 제공하므로 보안에 위협이 될 수 있다. 이때, 실시예에서 제안된 동작을 사용함으로써 인스턴스가 공격자에게 장악 당하더라도 인스턴스에서 사용하던 데이터는 유출을 막을 수 있다. For example, users can use instances that include accelerators when using cloud computing services (e.g., Amazon EC2). Clouds generally use a virtual environment, so users are likely to share their hardware with others, which can pose a security threat as it provides more attack vectors for attackers. At this time, by using the operation proposed in the embodiment, even if the instance is taken over by an attacker, data used in the instance can be prevented from being leaked.

실시예에 따르면, 클라우드 환경에 적용되기 매우 용이하나, 클라우드 환경에 국한되는 것은 아니다. 하이퍼바이저 방식과 유사하게 커널 코드를 분리하여 신뢰할 수 있는 부분을 생성할 수 있다면(예를 들면, SKEE, Nested kernel 등) 앞서 설명한 방식을 적용할 수 있다. 이는 소프트웨어 수정만을 통해 충분히 가능하므로 가상화가 적용 가능한 환경이 아니더라도 이용될 수 있다. 이에 대한 설명을 도 3에서 설명하기로 한다.According to the embodiment, it is very easy to apply to a cloud environment, but is not limited to the cloud environment. Similar to the hypervisor method, if it is possible to separate kernel code and create a reliable part (for example, SKEE, Nested kernel, etc.), the method described above can be applied. This is fully possible through software modification, so it can be used even if virtualization is not applicable. This will be explained in Figure 3.

도 3을 참고하면, 커널 코드가 분리되어 생성된 신뢰할 수 있는 영역을 포함하는 가속기(130)가 탑재된 환경을 나타낸 도면이다. 오프로딩 시스템은 커널 코드가 분리되어 생성된 신뢰할 수 있는 영역(310)을 포함하는 가속기(130)가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기(130) 사이의 입출력 통신을 가능하게 하는 API remoting기법(201)을 통해 연산이 요청된 데이터를 신뢰실행환경에서 가속기(130)로 아웃소싱할 수 있다. 이때, API remoting 기법(201)은, 게스트(guest) 환경에서 입출력 요청이 발생되면 로컬(local) 혹은 원격(remote)의 호스트(host)로 전달하여 발생된 입출력 요청을 처리하는 것을 의미한다. 실시예에서 게스트 환경은, 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역(Untrusted part of kernel)(310)이고, 호스트 환경은, 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역(trusted part of kernel)(320)일 수 있다.Referring to FIG. 3, it is a diagram showing an environment in which the accelerator 130 is installed, including a trusted area created by separating kernel code. The offloading system is an API remoting system that enables input/output communication between the trusted execution environment of the processor and the accelerator 130 in an environment equipped with the accelerator 130, which includes a trusted area 310 created by separating the kernel code. Through the technique 201, data for which calculations have been requested can be outsourced to the accelerator 130 in a trusted execution environment. At this time, the API remoting technique 201 means that when an input/output request occurs in a guest environment, it is transmitted to a local or remote host to process the generated input/output request. In the embodiment, the guest environment is an untrusted part of the kernel 310 in which the kernel code is separated, and the host environment is an untrusted part of the kernel in which the kernel code is separated. It may be (320).

오프로딩 시스템은 사용자(101)와 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역(비신뢰 영역)(310) 간 채널을 통해 사용자로부터 코드, 데이터 셋, 모델을 포함하는 데이터(110)를 암호화하여 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역(310)에 업로드하고, 신뢰실행환경의 엔클레이브(220)에서 암호화된 데이터를 복호화할 수 있다. 오프로딩 시스템은 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역과 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역(trusted part of kernel) 간 채널 간의 채널을 통해 신뢰실행환경의 라이브러리 운영체제(Library OS)에 의해 엔클레이브에서 데이터를 암호화하고, 암호화된 데이터가 엔클레이브 밖으로 복사되고, 시스템 콜을 통해 프론트엔드 드라이버(Frontend Driver)가 호출됨에 따라 물리적으로 인접한 페이지(physically contiguous page)에 암호화된 데이터를 복사할 수 있다. 이때, 프론트엔드 드라이버에서 할당된 페이지들은 물리적으로 인접하여 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역에 직접 접근이 가능하므로 데이터 복사가 필요없다. 오프로딩 시스템은 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역에서 암호화된 데이터를 읽으며 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역의 메모리에 암호화된 데이터를 복호화하고, 가속기 API(예를 들면, CUDA API)를 호출하여 복호화된 데이터에 대한 연산을 수행할 수 있다. 오프로딩 시스템은 가속기 API(예를 들면, CUDA API)를 통해 가속기에게 복호화된 데이터의 연산을 수행하도록 복호화된 데이터를 전달할 수 있다. 오프로딩 시스템은 가속기에서 데이터에 대한 연산을 수행함에 따라 획득된 결과값이 암호화되고, 암호화된 결과값을 신뢰실행환경의 엔클레이브로 반환할 수 있다. The offloading system separates the user 101 from the kernel code and encrypts the data 110 including the code, data set, and model from the user through a channel between the untrusted area (310) of the kernel. The kernel code can be separated and uploaded to the untrusted area 310 of the kernel, and the encrypted data can be decrypted in the enclave 220 of the trusted execution environment. In the offloading system, the kernel code is separated from the untrusted area of the kernel and the kernel code is separated into the library operating system (Library OS) of the trusted execution environment through a channel between the trusted area of the kernel (trusted part of the kernel). data is encrypted in the enclave, the encrypted data is copied out of the enclave, and the frontend driver is called through a system call to copy the encrypted data to a physically contiguous page. You can. At this time, the pages allocated in the front-end driver are physically adjacent, so the kernel code is separated and can directly access the trusted area of the kernel, so there is no need to copy data. The offloading system decouples kernel code to read encrypted data from a trusted region of the kernel, decrypts data encrypted in memory from a trusted region of the kernel, and uses accelerator APIs (e.g., CUDA). You can perform operations on decrypted data by calling API). The offloading system may transmit decrypted data to an accelerator through an accelerator API (eg, CUDA API) to perform an operation on the decrypted data. The offloading system encrypts the results obtained by performing operations on data in the accelerator, and returns the encrypted results to the enclave of the trusted execution environment.

도 4는 일 실시예에 있어서, 데이터의 이동 동작을 설명하기 위한 도면이다. Figure 4 is a diagram for explaining a data movement operation, according to one embodiment.

프론트엔드 드라이버 및 백엔드 드라이버 사이에 데이터가 이동되는 동작을 설명하기 위한 도면이다. PyTorch 코드가 실행되는 중 가속기 API(예를 들면, CUDA API)가 호출될 수 있다. 도 4에서는 가속기 API 중 CUDA API를 예를 들어 설명하기로 한다. 이때, 커스텀 라이브러리가 호출된 CUDA API를 인터셉트(intercept) 할 수 있다. 커스텀 라이브러리는 호출된 CUDA API를 프론트엔드 드라이버로 전달하기 위하여 ioctl() 시스템 콜을 호출할 수 있다. 이러한 시스템 콜은 라이브러리 운영체제(Library OS)에서 처리하게 되고 ocall을 통해 구현될 수 있다. 보호되지 않은 메모리(unprotected memory)로 나온 암호화된 인자들을 guest VM의 커널에 로드된 프론트엔드 드라이버로 전달할 수 있다.This diagram is intended to explain the operation of data movement between the front-end driver and the back-end driver. While PyTorch code is running, an accelerator API (e.g., CUDA API) may be called. In Figure 4, the CUDA API among the accelerator APIs will be explained as an example. At this time, the custom library can intercept the called CUDA API. The custom library can call the ioctl() system call to transfer the called CUDA API to the front-end driver. These system calls are processed by the library operating system (Library OS) and can be implemented through ocall. Encrypted arguments from unprotected memory can be passed to the front-end driver loaded in the kernel of the guest VM.

프론트엔드 드라이버는guest VM에 /dev 파일시스템에 가상 디바이스 형태로 인터페이스를 제공할 수 있다.The front-end driver can provide an interface to the guest VM in the form of a virtual device to the /dev file system.

프론트엔드 드라이버는 데이터 연산 요청을 받고 암호화된 데이터를 물리적으로 연결된 페이지에 복사한 뒤 백엔드 드라이버로 요청을 전달할 수 있다. 예를 들면, 하이퍼바이저에 위치한 백엔드 드라이버로 요청을 전달할 수 있다. 이때 공격자가 프론트엔드 드라이버를 장악하더라도 암호화된 데이터만 볼 수 있다.The front-end driver can receive a data operation request, copy the encrypted data to a physically connected page, and then forward the request to the back-end driver. For example, requests can be forwarded to a backend driver located on the hypervisor. At this time, even if an attacker takes control of the front-end driver, only encrypted data can be seen.

백엔드 드라이브는 데이터 연산 요청을 수신함에 따라 실제 CUDA 런타임(CUDA runtime) API와 CUDA driver API를 이용하여 가속기에 명령을 전달할 수 있다. 가속기에서 데이터 연산을 수행할 수 있다. 연산을 통해 획득된 결과값은 암호화되어 신뢰실행환경의 엔클레이브로 돌아간다. As the backend drive receives a data operation request, it can transmit commands to the accelerator using the actual CUDA runtime API and CUDA driver API. Data operations can be performed in the accelerator. The result obtained through the operation is encrypted and returned to the enclave of the trusted execution environment.

도 4에서 설명한 동작은 클라우드 환경에 한정되는 것은 아니며, 커널 코드를 분리하는 신뢰할 수 있는 영역에서도 적용될 수 있다. The operation described in FIG. 4 is not limited to a cloud environment and can also be applied in a trusted area that separates kernel code.

도 5는 일 실시예에 따른 오프로딩 시스템의 구성을 설명하기 위한 블록도이고, 도 6은 일 실시예에 따른 오프로딩 시스템에서 데이터 연산을 오프로딩하는 방법을 설명하기 위한 흐름도이다. FIG. 5 is a block diagram for explaining the configuration of an offloading system according to an embodiment, and FIG. 6 is a flowchart for explaining a method of offloading data operations in an offloading system according to an embodiment.

오프로딩 시스템(500)의 프로세서는 채널 수립부(510) 및 오프로딩부(520)를 포함할 수 있다. 이러한 프로세서의 구성요소들은 오프로딩 시스템에 저장된 프로그램 코드가 제공하는 제어 명령에 따라 프로세서에 의해 수행되는 서로 다른 기능들(different functions)의 표현들일 수 있다. 프로세서 및 프로세서의 구성요소들은 도 6의 데이터 연산을 오프로딩하는 방법이 포함하는 단계들(610 내지 620)을 수행하도록 오프로딩 시스템을 제어할 수 있다. 이때, 프로세서 및 프로세서의 구성요소들은 메모리가 포함하는 운영체제의 코드와 적어도 하나의 프로그램의 코드에 따른 명령(instruction)을 실행하도록 구현될 수 있다.The processor of the offloading system 500 may include a channel establishment unit 510 and an offloading unit 520. These processor components may be expressions of different functions performed by the processor according to control instructions provided by program codes stored in the offloading system. The processor and its components may control the offloading system to perform steps 610 to 620 included in the method for offloading data operations in FIG. 6 . At this time, the processor and its components may be implemented to execute instructions according to the code of an operating system included in the memory and the code of at least one program.

프로세서는 데이터 연산을 오프로딩하는 방법을 위한 프로그램의 파일에 저장된 프로그램 코드를 메모리에 로딩할 수 있다. 예를 들면, 오프로딩 시스템에서 프로그램이 실행되면, 프로세서는 운영체제의 제어에 따라 프로그램의 파일로부터 프로그램 코드를 메모리에 로딩하도록 오프로딩 시스템을 제어할 수 있다. 이때, 채널 수립부(510) 및 오프로딩부(520) 각각은 메모리에 로딩된 프로그램 코드 중 대응하는 부분의 명령을 실행하여 이후 단계들(610 내지 620)을 실행하기 위한 프로세서의 서로 다른 기능적 표현들일 수 있다.The processor may load program code stored in a program file into memory for a method of offloading data operations. For example, when a program is executed in an offloading system, the processor can control the offloading system to load program code from the program file into memory under the control of the operating system. At this time, the channel establishment unit 510 and the offloading unit 520 each execute instructions of the corresponding part of the program code loaded into the memory, and each has a different functional expression of the processor for executing the subsequent steps 610 to 620. You can take it in.

단계(610)에서 채널 수립부(510)는 가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 채널을 수립할 수 있다. In step 610, the channel establishment unit 510 may establish an input/output channel between the trusted execution environment of the processor and the accelerator in an environment where the accelerator is mounted.

단계(620)에서 오프로딩부(520)는 수립된 입출력 채널을 통해 신뢰실행환경에서 가속기로 연산을 오프로딩할 수 있다. 오프로딩부(520)는 가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 통신을 가능하게 하는 API remoting기법을 통해 연산이 요청된 데이터를 신뢰실행환경에서 가속기로 아웃소싱할 수 있다. 이때, 가속기가 탑재된 환경은, 가속기가 탑재된 클라우드 환경 또는 커널 코드가 분리되어 생성된 신뢰할 수 있는 영역을 포함하는 가속기가 탑재된 환경을 포함할 수 있다. 또한, API remoting 기법은, 게스트(guest) 환경에서 입출력 요청이 발생되면 로컬(local) 혹은 원격(remote)의 호스트(host)로 전달하여 발생된 입출력 요청을 처리하는 것을 의미한다. 여기서, 게스트 환경은, VM 인스턴스(Instance)이고, 호스트 환경은, 하이퍼바이저(Hypervisor)일 수 있다. 또는, 게스트 환경은, 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역(Untrusted part of kernel)이고, 호스트 환경은, 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역(trusted part of kernel)일 수 있다. 일례로, 사용자와 VM 인스턴스(Instance) 간 채널을 통해 사용자로부터 코드, 데이터 셋, 모델을 포함하는 암호화 데이터가 VM 인스턴스(Instance)에 업로드될 수 있다. 오프로딩부(520)는 신뢰실행환경의 엔클레이브에서 암호화 데이터를 복호화할 수 있다. 오프로딩부(520)는 VM 인스턴스(Instance)와 하이퍼바이저 간의 채널을 통해 신뢰실행환경의 라이브러리 운영체제(Library OS)에 의해 엔클레이브에서 데이터가 암호화되고, 암호화된 데이터가 엔클레이브 밖으로 복사되고, 시스템 콜을 통해 프론트엔드 드라이버(Frontend Driver)가 호출됨에 따라 물리적으로 인접한 페이지(physically contiguous page)에 암호화된 데이터를 복사할 수 있다. 오프로딩부(520)는 하이퍼바이저에서 암호화된 데이터를 읽으며 하이퍼바이저의 메모리에 암호화된 데이터를 복호화하고, 가속기 API를 호출하여 복호화된 데이터에 대한 연산을 수행할 수 있다. 이때, 가속기 API는 CUDA API, AMD GPU API 등을 포함할 수 있다. In step 620, the offloading unit 520 may offload the computation to the accelerator in the trusted execution environment through the established input/output channel. The offloading unit 520 can outsource data for which an operation has been requested from the trusted execution environment to the accelerator through an API remoting technique that enables input/output communication between the trusted execution environment of the processor and the accelerator in an environment equipped with an accelerator. At this time, the environment in which the accelerator is installed may include a cloud environment in which the accelerator is installed, or an environment in which the accelerator is installed, including a trusted area created by separating the kernel code. Additionally, the API remoting technique means that when an input/output request occurs in a guest environment, it is transmitted to a local or remote host to process the generated input/output request. Here, the guest environment may be a VM instance, and the host environment may be a hypervisor. Alternatively, the guest environment may be an untrusted part of the kernel with separate kernel code, and the host environment may be a trusted part of the kernel with separate kernel code. For example, encrypted data including code, data sets, and models can be uploaded from a user to a VM instance through a channel between the user and the VM instance. The offloading unit 520 can decrypt encrypted data in the enclave of the trusted execution environment. The offloading unit 520 encrypts data in the enclave by the library operating system (Library OS) of the trusted execution environment through a channel between the VM instance and the hypervisor, copies the encrypted data out of the enclave, and As the frontend driver is called through a call, encrypted data can be copied to a physically contiguous page. The offloading unit 520 may read encrypted data from the hypervisor, decrypt the data encrypted in the memory of the hypervisor, and perform operations on the decrypted data by calling an accelerator API. At this time, the accelerator API may include CUDA API, AMD GPU API, etc.

다른 예로서, 사용자와 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역 간 채널을 통해 사용자로부터 코드, 데이터 셋, 모델을 포함하는 암호화 데이터가 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역에 업로드될 수 있다. 오프로딩부(520)는 신뢰실행환경의 엔클레이브에서 암호화 데이터를 복호화할 수 있다. 오프로딩부(520)는 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역과 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역(trusted part of kernel) 간의 채널을 통해 신뢰실행환경의 라이브러리 운영체제(Library OS)에 의해 엔클레이브에서 데이터가 암호화되고, 암호화된 데이터가 엔클레이브 밖으로 복사되고, 시스템 콜을 통해 프론트엔드 드라이버(Frontend Driver)가 호출됨에 따라 물리적으로 인접한 페이지(physically contiguous page)에 암호화된 데이터를 복사할 수 있다. 오프로딩부(520)는 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역에서 암호화된 데이터를 읽으며 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역의 메모리에 암호화된 데이터를 복호화하고, 가속기 API를 호출하여 복호화된 데이터에 대한 연산을 수행할 수 있다. As another example, encrypted data, including code, datasets, and models, from users can be uploaded to an untrusted region of the kernel through a channel between user and kernel code, which is separated from the kernel code. there is. The offloading unit 520 can decrypt encrypted data in the enclave of the trusted execution environment. The offloading unit 520 operates the library operating system (Library OS) of the trusted execution environment through a channel between the untrusted area of the kernel in which the kernel code is separated and the trusted part of the kernel in which the kernel code is separated. Data is encrypted in the enclave, the encrypted data is copied out of the enclave, and the frontend driver is called through a system call, copying the encrypted data to a physically contiguous page. can do. The offloading unit 520 reads encrypted data from a trusted area of the kernel where the kernel code is separated, decrypts data encrypted in the memory of a trusted area of the kernel where the kernel code is separated, and calls the accelerator API. Operations can be performed on decrypted data.

오프로딩부(520)는 가속기에서 연산이 요청된 데이터에 대한 연산을 수행함에 따라 획득된 결과값이 암호화되고, 암호화된 결과값을 신뢰실행환경의 엔클레이브로 반환할 수 있다. The offloading unit 520 may encrypt the result obtained as the accelerator performs an operation on data for which an operation has been requested, and return the encrypted result to the enclave of the trusted execution environment.

실시예에 따르면, 클라우드 서비스 제공자나 인공지능 연구소와 같은 가속기를 필수적으로 사용하는 기업 입장에서는 사용하던 시스템의 변경을 최소화하면서 보안을 향상시키고 데이터 유출에 대한 위험성을 줄일 수 있다. According to the embodiment, companies that essentially use accelerators, such as cloud service providers or artificial intelligence research institutes, can improve security and reduce the risk of data leakage while minimizing changes to the system in use.

실시예에 따르면, 기업 혹은 개인이 실시하는데 추가적인 장비를 구매할 필요없이 기존 시스템에 하이퍼바이저를 설치하거나 커널을 신뢰하는 영역과 커널을 비신뢰하는 영역으로 나누는 등 소프트웨어적인 조치를 통해 적은 비용으로 데이터 연산 오프로딩을 수행할 수 있다. 하이퍼바이저를 설치할 경우, KVM/QEMU 등 널리 이용되고 있는 오픈소스 하이퍼바이저를 차용할 수 있다.According to the embodiment, it is performed by companies or individuals, and data operation is performed at low cost through software measures such as installing a hypervisor in an existing system or dividing the kernel into a trusted area and an untrusted area without the need to purchase additional equipment. Offloading can be performed. When installing a hypervisor, you can borrow a widely used open source hypervisor such as KVM/QEMU.

실시예에 따르면, 가속기가 사용되는 사업군에 두루 사용될 수 있다. 인공지능을 연구하는 기업군인 은행, 카드회사, 병원, 보험, IT기업, 그리고 심지어 정부의 각종 부처에서도 사용할 수 있다. 또한, 클라우드 서비스를 제공하는 각종 CSP나 IDC에도 적용 가능하다. According to the embodiment, the accelerator can be used throughout the business group in which it is used. It can be used by companies researching artificial intelligence such as banks, credit card companies, hospitals, insurance, IT companies, and even various government ministries. Additionally, it can be applied to various CSPs and IDCs that provide cloud services.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The device described above may be implemented with hardware components, software components, and/or a combination of hardware components and software components. For example, devices and components described in embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), etc. , may be implemented using one or more general-purpose or special-purpose computers, such as a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. A processing device may execute an operating system (OS) and one or more software applications that run on the operating system. Additionally, a processing device may access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, a single processing device may be described as being used; however, those skilled in the art will understand that a processing device includes multiple processing elements and/or multiple types of processing elements. It can be seen that it may include. For example, a processing device may include a plurality of processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are possible.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or may be processed independently or collectively. You can command the device. Software and/or data may be used on any type of machine, component, physical device, virtual equipment, computer storage medium or device to be interpreted by or to provide instructions or data to a processing device. It can be embodied in . Software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc., singly or in combination. Program instructions recorded on the medium may be specially designed and configured for the embodiment or may be known and available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -Includes optical media (magneto-optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, etc. Examples of program instructions include machine language code, such as that produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited examples and drawings, various modifications and variations can be made by those skilled in the art from the above description. For example, the described techniques are performed in a different order than the described method, and/or components of the described system, structure, device, circuit, etc. are combined or combined in a different form than the described method, or other components are used. Alternatively, appropriate results may be achieved even if substituted or substituted by an equivalent.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents of the claims also fall within the scope of the claims described below.

Claims (15)

오프로딩 시스템에 의해 수행되는 데이터 연산을 오프로딩하는 방법에 있어서,
가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 채널을 수립하는 단계; 및
상기 수립된 입출력 채널을 통해 상기 신뢰실행환경에서 상기 가속기로 연산을 오프로딩하는 단계
를 포함하고,
상기 오프로딩하는 단계는,
상기 신뢰실행환경에서 머신러닝(machine learning)에 필요한 연산을 상기 가속기로 오프로딩하는 것으로,
상기 가속기가 탑재된 환경에서 상기 신뢰실행환경과 상기 가속기 사이의 입출력 통신을 가능하게 하는 API remoting 기법을 통해 연산이 요청된 데이터로서 사용자 컴퓨터로부터 업로드된 코드와 데이터 셋 및 모델을 포함하는 데이터를 상기 신뢰실행환경에서 상기 가속기로 아웃소싱하는 단계
를 포함하고,
상기 가속기로 아웃소싱하는 단계는,
상기 API remoting 기법을 통해 송수신되는 데이터를 암호화하고 시스템 콜(system call)을 통해 프론트엔드 드라이버(Frontend Driver)가 호출됨에 따라 물리적으로 인접한 페이지(physically contiguous page)에 상기 암호화된 데이터를 복사하는 단계
를 포함하고,
커스텀 라이브러리가 가속기 API를 인터셉트(intercept)하여 상기 프론트엔드 드라이버로 전달하기 위해 라이브러리 운영체제(Library OS)에서 처리되는 시스템 콜을 호출하고,
보호되지 않은 시스템 콜의 인자는 암호화되어 상기 프론트엔드 드라이버로 전달되고,
백엔드 드라이버(Backend Driver)는 상기 프론트엔드 드라이버로부터 데이터 연산 요청을 수신함에 따라 가속기 런타임 API와 가속기 드라이버 API를 이용하여 상기 가속기에 해당 명령을 전달하는 것
을 특징으로 하는 오프로딩 방법.
In a method for offloading data operations performed by an offloading system,
Establishing an input/output channel between the trusted execution environment of the processor and the accelerator in an environment where the accelerator is mounted; and
Offloading computation from the trusted execution environment to the accelerator through the established input/output channel.
Including,
The offloading step is,
By offloading the calculations required for machine learning in the trusted execution environment to the accelerator,
In an environment in which the accelerator is mounted, the data including the code, data set, and model uploaded from the user computer is data requested for operation through an API remoting technique that enables input/output communication between the trusted execution environment and the accelerator. Step of outsourcing to the accelerator in a trusted execution environment
Including,
The outsourcing step to the accelerator is,
Encrypting data transmitted and received through the API remoting technique and copying the encrypted data to a physically contiguous page as the frontend driver is called through a system call.
Including,
The custom library intercepts the accelerator API and calls a system call processed in the library operating system (Library OS) to deliver it to the front-end driver,
The arguments of the unprotected system call are encrypted and delivered to the front-end driver,
The backend driver receives a data operation request from the front-end driver and transmits the corresponding command to the accelerator using the accelerator runtime API and accelerator driver API.
An offloading method characterized by .
제1항에 있어서,
상기 가속기가 탑재된 환경은 가속기가 탑재된 클라우드 환경 또는 커널 코드가 분리되어 생성된 신뢰할 수 있는 영역을 포함하는 가속기가 탑재된 환경을 포함하는 것
을 특징으로 하는 오프로딩 방법.
According to paragraph 1,
The environment equipped with the accelerator includes a cloud environment equipped with the accelerator or an environment equipped with the accelerator including a trusted area created by separating the kernel code.
An offloading method characterized by .
삭제delete 제1항에 있어서,
상기 API remoting 기법은, 게스트(guest) 환경에서 입출력 요청이 발생되면 로컬(local) 혹은 원격(remote)의 호스트(host)로 전달하여 상기 발생된 입출력 요청을 처리하는 것을 의미하는 것
을 특징으로 하는 오프로딩 방법.
According to paragraph 1,
The API remoting technique means that when an input/output request occurs in a guest environment, it is transmitted to a local or remote host to process the generated input/output request.
An offloading method characterized by .
제4항에 있어서,
상기 게스트 환경은, VM 인스턴스(Instance)이고, 상기 호스트 환경은, 하이퍼바이저(Hypervisor)인 것
을 특징으로 하는 오프로딩 방법.
According to paragraph 4,
The guest environment is a VM instance, and the host environment is a hypervisor.
An offloading method characterized by .
제4항에 있어서,
상기 게스트 환경은, 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역(Untrusted part of kernel)이고, 상기 호스트 환경은, 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역(trusted part of kernel)인 것
을 특징으로 하는 오프로딩 방법.
According to paragraph 4,
The guest environment is an untrusted part of the kernel in which the kernel code is separated, and the host environment is a trusted part of the kernel in which the kernel code is separated.
An offloading method characterized by .
제1항에 있어서,
상기 가속기로 아웃소싱하는 단계는,
상기 신뢰실행환경의 엔클레이브에서 사용자와 VM 인스턴스(Instance) 간 채널을 통해 VM 인스턴스(Instance)에 업로드된 암호화 데이터를 복호화하는 단계
를 포함하는 오프로딩 방법.
According to paragraph 1,
The outsourcing step to the accelerator is,
Decrypting the encrypted data uploaded to the VM instance through a channel between the user and the VM instance in the enclave of the trusted execution environment.
An offloading method including.
제7항에 있어서,
상기 VM 인스턴스(Instance)와 하이퍼바이저 간의 채널을 통해 상기 신뢰실행환경의 라이브러리 운영체제(Library OS)에 의해 엔클레이브에서 상기 복호화된 데이터가 암호화되고, 상기 암호화된 데이터가 엔클레이브 밖으로 복사되는 것
을 특징으로 하는 오프로딩 방법.
In clause 7,
The decrypted data is encrypted in the enclave by the library operating system (Library OS) of the trusted execution environment through a channel between the VM instance and the hypervisor, and the encrypted data is copied out of the enclave.
An offloading method characterized by .
제8항에 있어서,
상기 가속기로 아웃소싱하는 단계는,
상기 하이퍼바이저에서 상기 암호화된 데이터를 읽으며 상기 하이퍼바이저의 메모리에 상기 암호화된 데이터를 복호화하고, 가속기 API를 호출하여 상기 복호화된 데이터에 대한 연산을 수행하는 단계
를 포함하는 오프로딩 방법.
According to clause 8,
The outsourcing step to the accelerator is,
Reading the encrypted data from the hypervisor, decrypting the encrypted data in the memory of the hypervisor, and calling an accelerator API to perform an operation on the decrypted data.
An offloading method including.
제1항에 있어서,
상기 가속기로 아웃소싱하는 단계는,
상기 신뢰실행환경의 엔클레이브에서 사용자와 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역 간 채널을 통해 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역에 업로드된 암호화 데이터를 복호화하는 단계
를 포함하는 오프로딩 방법.
According to paragraph 1,
The outsourcing step to the accelerator is,
A step of separating the user and kernel code in the enclave of the trusted execution environment and decrypting the encrypted data uploaded to the untrusted area of the kernel through a channel between untrusted areas of the kernel.
An offloading method including.
제10항에 있어서,
상기 커널 코드가 분리되어 커널의 신뢰할 수 없는 영역과 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역(trusted part of kernel) 간의 채널을 통해 상기 신뢰실행환경의 라이브러리 운영체제(Library OS)에 의해 엔클레이브에서 상기 복호화된 데이터가 암호화되고, 상기 암호화된 데이터가 엔클레이브 밖으로 복사되는 것
을 특징으로 하는 오프로딩 방법.
According to clause 10,
The kernel code is separated from the untrusted area of the kernel and the kernel code is separated from the enclave by the library operating system (Library OS) of the trusted execution environment through a channel between the trusted part of the kernel. The decrypted data is encrypted, and the encrypted data is copied out of the enclave.
An offloading method characterized by .
제11항에 있어서,
상기 가속기로 아웃소싱하는 단계는,
상기 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역에서 상기 암호화된 데이터를 읽으며 상기 커널 코드가 분리되어 커널의 신뢰할 수 있는 영역의 메모리에 상기 암호화된 데이터를 복호화하고, 가속기 API를 호출하여 상기 복호화된 데이터에 대한 연산을 수행하는 단계
를 포함하는 오프로딩 방법.
According to clause 11,
The outsourcing step to the accelerator is,
The kernel code is separated and reads the encrypted data from the trusted area of the kernel, and the kernel code is separated to decrypt the encrypted data in the memory of the trusted area of the kernel, and calls the accelerator API to retrieve the decrypted data. Steps to perform operations on data
An offloading method including.
제1항에 있어서,
상기 오프로딩하는 단계는,
상기 가속기에서 상기 연산이 요청된 데이터에 대한 연산을 수행함에 따라 획득된 결과값이 암호화되고, 상기 암호화된 결과값이 상기 신뢰실행환경의 엔클레이브로 반환되는 단계
를 포함하는 오프로딩 방법.
According to paragraph 1,
The offloading step is,
Encrypting the result obtained as the accelerator performs an operation on the data for which the operation is requested, and returning the encrypted result to the enclave of the trusted execution environment.
An offloading method including.
오프로딩 시스템에 의해 수행되는 데이터 연산을 오프로딩하는 방법을 실행시키기 위해 컴퓨터 판독 가능한 저장매체에 저장된 컴퓨터 프로그램에 있어서,
상기 오프로딩 시스템에 의해 수행되는 데이터 연산을 오프로딩하는 방법은,
가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 채널을 수립하는 단계; 및
상기 수립된 입출력 채널을 통해 상기 신뢰실행환경에서 상기 가속기로 연산을 오프로딩하는 단계
를 포함하고,
상기 오프로딩하는 단계는,
상기 신뢰실행환경에서 머신러닝(machine learning)에 필요한 연산을 상기 가속기로 오프로딩하는 것으로,
상기 가속기가 탑재된 환경에서 상기 신뢰실행환경과 상기 가속기 사이의 입출력 통신을 가능하게 하는 API remoting 기법을 통해 연산이 요청된 데이터로서 사용자 컴퓨터로부터 업로드된 코드와 데이터 셋 및 모델을 포함하는 데이터를 상기 신뢰실행환경에서 상기 가속기로 아웃소싱하는 단계
를 포함하고,
상기 가속기로 아웃소싱하는 단계는,
상기 API remoting 기법을 통해 송수신되는 데이터를 암호화하고 시스템 콜(system call)을 통해 프론트엔드 드라이버(Frontend Driver)가 호출됨에 따라 물리적으로 인접한 페이지(physically contiguous page)에 상기 암호화된 데이터를 복사하는 단계
를 포함하고,
커스텀 라이브러리가 가속기 API를 인터셉트(intercept)하여 상기 프론트엔드 드라이버로 전달하기 위해 라이브러리 운영체제(Library OS)에서 처리되는 시스템 콜을 호출하고,
보호되지 않은 시스템 콜의 인자는 암호화되어 상기 프론트엔드 드라이버로 전달되고,
백엔드 드라이버(Backend Driver)는 상기 프론트엔드 드라이버로부터 데이터 연산 요청을 수신함에 따라 가속기 런타임 API와 가속기 드라이버 API를 이용하여 상기 가속기에 해당 명령을 전달하는 것,
을 특징으로 하는 컴퓨터 판독 가능한 저장매체에 저장된 컴퓨터 프로그램.
A computer program stored in a computer-readable storage medium for executing a method of offloading a data operation performed by an offloading system, comprising:
A method of offloading data operations performed by the offloading system includes:
Establishing an input/output channel between the trusted execution environment of the processor and the accelerator in an environment where the accelerator is mounted; and
Offloading computation from the trusted execution environment to the accelerator through the established input/output channel.
Including,
The offloading step is,
By offloading the calculations required for machine learning in the trusted execution environment to the accelerator,
In an environment in which the accelerator is mounted, the data including the code, data set, and model uploaded from the user computer is data requested for operation through an API remoting technique that enables input/output communication between the trusted execution environment and the accelerator. Step of outsourcing to the accelerator in a trusted execution environment
Including,
The outsourcing step to the accelerator is,
Encrypting data transmitted and received through the API remoting technique and copying the encrypted data to a physically contiguous page as the frontend driver is called through a system call.
Including,
The custom library intercepts the accelerator API and calls a system call processed in the library operating system (Library OS) to deliver it to the front-end driver,
The arguments of the unprotected system call are encrypted and delivered to the front-end driver,
The backend driver receives a data operation request from the front-end driver and transmits the corresponding command to the accelerator using the accelerator runtime API and the accelerator driver API.
A computer program stored on a computer-readable storage medium, characterized by:
오프로딩 시스템에 있어서,
가속기가 탑재된 환경에서 프로세서의 신뢰실행환경과 가속기 사이의 입출력 채널을 수립하는 채널 수립부; 및
상기 수립된 입출력 채널을 통해 상기 신뢰실행환경에서 상기 가속기로 연산을 오프로딩하는 오프로딩부
를 포함하고,
상기 오프로딩부는,
상기 신뢰실행환경에서 머신러닝(machine learning)에 필요한 연산을 상기 가속기로 오프로딩하는 것으로,
상기 가속기가 탑재된 환경에서 상기 신뢰실행환경과 상기 가속기 사이의 입출력 통신을 가능하게 하는 API remoting 기법을 통해 연산이 요청된 데이터로서 사용자 컴퓨터로부터 업로드된 코드와 데이터 셋 및 모델을 포함하는 데이터를 상기 신뢰실행환경에서 상기 가속기로 아웃소싱하고,
상기 API remoting 기법을 통해 송수신되는 데이터를 암호화하고 시스템 콜(system call)을 통해 프론트엔드 드라이버(Frontend Driver)가 호출됨에 따라 물리적으로 인접한 페이지(physically contiguous page)에 상기 암호화된 데이터를 복사하고,
커스텀 라이브러리가 가속기 API를 인터셉트(intercept)하여 상기 프론트엔드 드라이버로 전달하기 위해 라이브러리 운영체제(Library OS)에서 처리되는 시스템 콜을 호출하고,
보호되지 않은 시스템 콜의 인자는 암호화되어 상기 프론트엔드 드라이버로 전달되고,
백엔드 드라이버(Backend Driver)는 상기 프론트엔드 드라이버로부터 데이터 연산 요청을 수신함에 따라 가속기 런타임 API와 가속기 드라이버 API를 이용하여 상기 가속기에 해당 명령을 전달하는 것
을 특징으로 하는 오프로딩 시스템.
In the offloading system,
a channel establishment unit that establishes an input/output channel between the trusted execution environment of the processor and the accelerator in an environment where the accelerator is mounted; and
An offloading unit that offloads calculations from the trusted execution environment to the accelerator through the established input/output channel.
Including,
The offloading unit,
By offloading the calculations required for machine learning in the trusted execution environment to the accelerator,
In an environment in which the accelerator is mounted, the data including the code, data set, and model uploaded from the user computer is data requested for operation through an API remoting technique that enables input/output communication between the trusted execution environment and the accelerator. Outsourcing to the accelerator in a trusted execution environment,
Encrypts data transmitted and received through the API remoting technique and copies the encrypted data to a physically contiguous page as the front-end driver is called through a system call,
The custom library intercepts the accelerator API and calls a system call processed in the library operating system (Library OS) to deliver it to the front-end driver,
The arguments of the unprotected system call are encrypted and delivered to the front-end driver,
The backend driver receives a data operation request from the front-end driver and transmits the corresponding command to the accelerator using the accelerator runtime API and accelerator driver API.
An offloading system characterized by .
KR1020210091418A 2021-07-13 2021-07-13 Secure offloading of computations from trusted execution environment(tee) to accelerators KR102660736B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210091418A KR102660736B1 (en) 2021-07-13 2021-07-13 Secure offloading of computations from trusted execution environment(tee) to accelerators

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210091418A KR102660736B1 (en) 2021-07-13 2021-07-13 Secure offloading of computations from trusted execution environment(tee) to accelerators

Publications (2)

Publication Number Publication Date
KR20230010963A KR20230010963A (en) 2023-01-20
KR102660736B1 true KR102660736B1 (en) 2024-04-26

Family

ID=85108671

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210091418A KR102660736B1 (en) 2021-07-13 2021-07-13 Secure offloading of computations from trusted execution environment(tee) to accelerators

Country Status (1)

Country Link
KR (1) KR102660736B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200257794A1 (en) * 2019-02-13 2020-08-13 Nec Laboratories America, Inc. Graphics processing unit accelerated trusted execution environment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005533438A (en) * 2002-07-12 2005-11-04 イングリアン ネットワークス インコーポレーテッド Encryption associated with the network
US11126757B2 (en) * 2018-10-19 2021-09-21 Microsoft Technology Licensing, Llc Peripheral device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200257794A1 (en) * 2019-02-13 2020-08-13 Nec Laboratories America, Inc. Graphics processing unit accelerated trusted execution environment

Also Published As

Publication number Publication date
KR20230010963A (en) 2023-01-20

Similar Documents

Publication Publication Date Title
Ahmad et al. OBLIVIATE: A Data Oblivious Filesystem for Intel SGX.
CN112005237B (en) Secure collaboration between processors and processing accelerators in a secure zone
US20230034410A1 (en) Secure Execution Support for A.I. Systems (and other Heterogeneous Systems)
Quoc et al. Securetf: A secure tensorflow framework
US20230244798A1 (en) Systems and Methods of Performing Computation Operations Using Secure Enclaves
US9983894B2 (en) Method and system for providing secure system execution on hardware supporting secure application execution
JP6347831B2 (en) Method, data processing program, computer program product, and data processing system for handling guest events in a system controlled by a hypervisor
US9830208B2 (en) Processing a guest event in a hypervisor-controlled system
Vasiliadis et al. GPU-assisted malware
US11755753B2 (en) Mechanism to enable secure memory sharing between enclaves and I/O adapters
US20210374232A1 (en) Data distribution using a trusted execution environment in an untrusted device
CN110874468B (en) Application program security protection method and related equipment
KR20190142910A (en) Heterogeneous isolated execution for commodity gpus
US11947659B2 (en) Data distribution across multiple devices using a trusted execution environment in a mobile device
Liu et al. Trusted-DNN: A TrustZone-based adaptive isolation strategy for deep neural networks
US11783055B2 (en) Secure application execution in a data processing system
KR102660736B1 (en) Secure offloading of computations from trusted execution environment(tee) to accelerators
Chen Confidential High-Performance Computing in the Public Cloud
KR102584506B1 (en) State information protection for virtual machines
Wang et al. SEGIVE: A practical framework of secure GPU execution in virtualization environment
Babar et al. Trusted Deep Neural Execution—A Survey
Bouché et al. Attacking the cloud from an insider perspective
Dessouky et al. AI Utopia or Dystopia-On Securing AI Platforms
Kang et al. Practical Deep Neural Network Protection for Unmodified Applications in Intel Software Guard Extension Environments
Deyannis et al. Andromeda: Enabling secure enclaves for the Android ecosystem

Legal Events

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