JP2008250387A - Information processor - Google Patents
Information processor Download PDFInfo
- Publication number
- JP2008250387A JP2008250387A JP2007087388A JP2007087388A JP2008250387A JP 2008250387 A JP2008250387 A JP 2008250387A JP 2007087388 A JP2007087388 A JP 2007087388A JP 2007087388 A JP2007087388 A JP 2007087388A JP 2008250387 A JP2008250387 A JP 2008250387A
- Authority
- JP
- Japan
- Prior art keywords
- processor
- instruction
- fetch
- instructions
- access
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000001514 detection method Methods 0.000 claims abstract description 116
- 238000004891 communication Methods 0.000 claims abstract description 104
- 230000010365 information processing Effects 0.000 claims description 16
- 230000015654 memory Effects 0.000 abstract description 137
- 230000004224 protection Effects 0.000 abstract description 124
- 230000006870 function Effects 0.000 abstract description 35
- 230000001681 protective effect Effects 0.000 abstract description 2
- 230000003213 activating effect Effects 0.000 abstract 1
- 238000007726 management method Methods 0.000 description 104
- 238000000034 method Methods 0.000 description 100
- 238000012545 processing Methods 0.000 description 98
- 230000008569 process Effects 0.000 description 56
- 238000005259 measurement Methods 0.000 description 39
- 238000012986 modification Methods 0.000 description 16
- 230000004048 modification Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 13
- 230000007704 transition Effects 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 9
- 238000012790 confirmation Methods 0.000 description 7
- 230000007246 mechanism Effects 0.000 description 7
- 230000002265 prevention Effects 0.000 description 6
- 238000012546 transfer Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000005764 inhibitory process Effects 0.000 description 2
- 230000007257 malfunction Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30181—Instruction operation extension or modification
- G06F9/30189—Instruction operation extension or modification according to execution mode, e.g. mode flag
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3854—Instruction completion, e.g. retiring, committing or graduating
- G06F9/3858—Result writeback, i.e. updating the architectural state or memory
- G06F9/38585—Result writeback, i.e. updating the architectural state or memory with result invalidation, e.g. nullification
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
Description
この発明は、複数のソフトウェアが搭載されている情報処理装置に関するものである。 The present invention relates to an information processing apparatus equipped with a plurality of software.
従来から、データベースシステムやミッションクリティカルな処理を実行するサーバマシンにおいては、その処理の重要性や内部で保持するデータの機密度などの要因から、信頼性やセキュリティが重要視されていた。しかし近年では、これら汎用計算機等に限らず、組込み機器等の様々な装置において信頼性やセキュリティを確保することが重要となっている。 Conventionally, in a server machine that executes a database system or mission-critical processing, reliability and security have been regarded as important due to factors such as the importance of the processing and the sensitivity of data held inside. However, in recent years, it has become important to ensure reliability and security in various devices such as embedded devices as well as these general-purpose computers.
組込み機器では、一つの機器内で複数の機能を同時に実行したり、新しい機能をダウンロードして機能を追加するなど、機能の複雑化が進んでいる。このような複数の機能を実行可能な機器の開発または運用では、単機能の機器と比較すると、新たな問題が発生している。 In embedded devices, functions are becoming more complex, such as executing multiple functions at the same time within a single device, or downloading new functions and adding functions. In the development or operation of such a device capable of executing a plurality of functions, a new problem has occurred as compared with a single-function device.
例えば、ある機能に不具合が含まれていた場合、それがごく一部の機能であったとしても機器全体が停止するという障害が発生するケースがある。また、ダウンロードして、機器に対して追加した機能が悪意のある不正なプログラムである場合、秘密を保持すべき情報、またはプログラムが外部に漏洩したり、破壊や改竄されるケースがある。このように、組み込み機器等においても信頼性及びセキュリティが問題となっている。 For example, when a malfunction is included in a certain function, there is a case where a failure occurs in which the entire device stops even if it is a very small part of the function. In addition, when a function downloaded and added to a device is a malicious and malicious program, there is a case where information or a program that should be kept secret or the program leaks to the outside, or is destroyed or falsified. Thus, reliability and security are also a problem in embedded devices and the like.
上記の問題を解決するには、各機能を実現するプログラムに割り当てられたリソースへのアクセスを制御する必要がある。例えば、あるプログラムに割り当てたリソースへの他のプログラムや機能からのアクセスを禁止したり、複数の機能やプログラムから共有されるリソースへのアクセスを排他制御して管理する方法等が挙げられる。さらに、アクセス制御機構や制御情報自体も自由に操作できないように保護する必要がある。 In order to solve the above problems, it is necessary to control access to resources allocated to programs that implement each function. For example, a method of prohibiting access from other programs or functions to a resource allocated to a program, or managing by exclusive control of access to a resource shared by a plurality of functions or programs can be cited. Furthermore, it is necessary to protect the access control mechanism and the control information itself so that they cannot be freely operated.
これらの保護を実現し、複数の機能を隔離して信頼性やセキュリティを高める手段として、計算機の仮想化技術が提案されている。この仮想化技術の実装には様々な形態が存在する。仮想化技術の例としては、ハードウェアとOS(Operating System)の間に仮想化層を設けて、当該仮想化層上に複数のOS(ゲストOS)を動作させる形態がある。この仮想化層は、一般にハイパーバイザ層と呼ばれている。このハイパーバイザ層は、メモリやデバイス及び割込み等のリソースを管理し、個々のゲストOSに対して割り当てたリソースで構成される仮想計算機を提供する。これにより複数のゲストOSが互いに干渉せず隔離された状態での実行が実現できる。このハイパーバイザ層の機能をソフトウェアで実現する場合、当該ソフトウェアはハイパーバイザと呼ばれている。 Computer virtualization technology has been proposed as a means of realizing these protections and isolating multiple functions to increase reliability and security. There are various forms of implementation of this virtualization technology. As an example of the virtualization technology, there is a form in which a virtualization layer is provided between hardware and an OS (Operating System), and a plurality of OSs (guest OSs) are operated on the virtualization layer. This virtualization layer is generally called a hypervisor layer. This hypervisor layer manages resources such as memory, devices, and interrupts, and provides a virtual machine composed of resources allocated to each guest OS. As a result, execution in a state where a plurality of guest OSs are isolated without interfering with each other can be realized. When the functions of the hypervisor layer are realized by software, the software is called a hypervisor.
汎用計算機に使用されるプロセッサでは、プロセッサ自体に仮想化をサポートするハードウェア機構が用意されている。例としては、非特許文献1に示したIntel(登録商標)社が提唱する技術が存在する。この技術を実装したプロセッサでは、実行中のプログラムの権限を示す特権モードを多数用意し、特定の命令の実行時に、より上位の特権モードへ移行するように設定することが可能となる。これにより、ゲストOSから共有リソースへのアクセスをハードウェアで監視し、アクセス時により上位の特権モードを付与したソフトウェアでそのアクセス内容をチェックすることが可能になる。
In a processor used for a general-purpose computer, a hardware mechanism that supports virtualization is prepared in the processor itself. As an example, there is a technology proposed by Intel (registered trademark) shown in Non-Patent
他の例としては、Advanced Micro Devices社が提唱する技術(Pacifica)がある。当該技術(Pacifica)を実装したプロセッサでは、割込みをインターセプトする機構と、ソフトウェアから仮想割込みを発生させる機能とが用意されている。これにより、ハイパーバイザで割込みを一旦インターセプトした上で、その割込みを必要とするゲストOSへの割込み配送を管理することができる。また、ゲストOSによるアドレス変換テーブルへのアクセスを監視する機構が用意される。これにより、ゲストOSが自由にアドレス変換テーブルを書き換えて、他のゲストOSに割り当てられたメモリ領域をアクセスすることを防ぐことができる。 As another example, there is a technology (Pacifica) proposed by Advanced Micro Devices. A processor equipped with the technology (Pacifica) has a mechanism for intercepting an interrupt and a function for generating a virtual interrupt from software. As a result, once the interrupt is intercepted by the hypervisor, the interrupt delivery to the guest OS that needs the interrupt can be managed. A mechanism for monitoring access to the address conversion table by the guest OS is also prepared. As a result, it is possible to prevent the guest OS from freely rewriting the address conversion table and accessing a memory area allocated to another guest OS.
しかしながら、汎用計算機に使用されるような高機能なプロセッサと異なり、組込用に用いられる一般的なプロセッサには仮想化をサポートする機構が実装されていない。通常これらプロセッサでは、特権モードが少ないため、当該プロセッサで複数のゲストOSを実行した場合、各ゲストOSが最上位の特権モードで動作する。したがって、任意のゲストOSが、他のゲストOSに割り当てられたメモリ領域やデバイスを不正に参照・変更可能という問題がある。また、当該プロセッサでは、割込みの管理する割込みベクタテーブルを保護する機構がないため、ハイパーバイザが確実に割込みのインターセプトおよび配送を行えるという保証がないという問題がある。 However, unlike a high-performance processor used in a general-purpose computer, a general processor used for embedding does not have a mechanism for supporting virtualization. Usually, these processors have few privileged modes, so when a plurality of guest OSs are executed by the processor, each guest OS operates in the highest privileged mode. Therefore, there is a problem that an arbitrary guest OS can illegally refer to or change a memory area or a device assigned to another guest OS. Further, since the processor does not have a mechanism for protecting the interrupt vector table managed by the interrupt, there is a problem that there is no guarantee that the hypervisor can reliably intercept and deliver the interrupt.
本発明は、上記に鑑みてなされたものであって、プロセッサが仮想化サポート機能を有するか否かにかかわらず、安全性を向上させる情報処理装置を提供することを目的とする。 The present invention has been made in view of the above, and an object thereof is to provide an information processing apparatus that improves safety regardless of whether or not a processor has a virtualization support function.
上述した課題を解決し、目的を達成するために、本発明にかかる情報処理装置は、プロセッサと、第1のアクセス範囲へ前記プロセッサをアクセスさせる特権ソフトウェアを記憶する第1の記憶部と、前記第1のアクセス範囲よりも狭い第2のアクセス範囲へ前記プロセッサをアクセスさせるソフトウェアを記憶する第2の記憶部と、前記第1の記憶部と前記プロセッサとを接続し、前記特権ソフトウェアを前記プロセッサで実行するために必要なデータの通信を行う通信路と、前記プロセッサが前記通信路を介して、前記特権ソフトウェアに含まれる命令であって当該特権ソフトウェアを起動させる際に実行される複数の命令のうち、最初の命令が格納された格納アドレスへのフェッチを検出するフェッチ検出手段と、前記プロセッサが前記通信路を介して、前記プロセッサにより前記複数の命令のうちの特定の命令が実行されたことを検出する検出手段と、前記プロセッサが前記ソフトウェアを実行しているときに前記フェッチ検出手段により前記格納アドレスへのフェッチを検出してから、前記検出手段が前記特定の命令が実行されたことを検出するまでに、所定の時間が経過したか否かを判断する時間判断手段と、前記所定の時間が経過していないと判断した場合に、前記プロセッサが前記特定の命令を実行した結果から、前記プロセッサへの割り込みを禁止しているか否かを判断する判断手段と、前記実行判断手段が前記プロセッサへの割り込みを禁止していると判断した場合に、前記プロセッサに対して前記第1のアクセス範囲のアクセスを開放する制御手段と、を備えることを特徴とする。 In order to solve the above-described problems and achieve the object, an information processing apparatus according to the present invention includes a processor, a first storage unit that stores privileged software that causes the processor to access a first access range, A second storage unit that stores software that causes the processor to access a second access range narrower than the first access range; and the first storage unit and the processor are connected, and the privileged software is transmitted to the processor. And a plurality of instructions executed when the processor activates the privileged software via the communication path and a communication path for performing communication of data necessary for execution by the processor. Fetch detecting means for detecting a fetch to a storage address where the first instruction is stored, and the processor Detecting means for detecting that a specific instruction of the plurality of instructions has been executed by the processor via the communication path; and storing by the fetch detecting means when the processor is executing the software. Time determination means for determining whether or not a predetermined time has elapsed from detection of a fetch to an address until the detection means detects that the specific instruction has been executed; and the predetermined time A determination means for determining whether or not an interrupt to the processor is prohibited based on a result of the processor executing the specific instruction, and the execution determination means includes the processor Control means for releasing access in the first access range to the processor when it is determined that interrupting to the processor is prohibited. And wherein the Rukoto.
また、本発明にかかる情報処理装置は、プロセッサと、第1のアクセス範囲へ前記プロセッサをアクセスさせる特権ソフトウェアを記憶する第1の記憶部と、前記第1のアクセス範囲よりも狭い第2のアクセス範囲へ前記プロセッサをアクセスさせるソフトウェアを記憶する第2の記憶部と、前記第1の記憶部と前記プロセッサとを接続し、前記特権ソフトウェアを前記プロセッサで実行するために必要なデータの通信を行う通信路と、前記プロセッサが前記通信路を介して、前記特権ソフトウェアに含まれる命令であって当該特権ソフトウェアを起動させる際に実行される複数の命令のうち、最初の命令が格納された第1格納アドレスへのフェッチを検出する第1フェッチ検出手段と、前記プロセッサが前記通信路を介して、前記第1の記憶部に記憶される前記特権ソフトウェアに含まれる前記複数の命令のうち特定の命令が格納された第2格納アドレスへのフェッチを検出する第2フェッチ検出手段と、前記プロセッサが前記ソフトウェアを実行しているときに前記第1フェッチ検出手段により前記第1格納アドレスへのフェッチを検出してから、前記第2フェッチ検出手段により前記第2格納アドレスへのフェッチを検出するまでに、所定の時間が経過したか否かを判断する時間判断手段と、前記所定の時間が経過していないと判断した場合に、前記プロセッサに対して前記第1のアクセス範囲のアクセスを開放する制御手段と、を備えることを特徴とする。 The information processing apparatus according to the present invention includes a processor, a first storage unit that stores privileged software that causes the processor to access the first access range, and a second access that is narrower than the first access range. A second storage unit that stores software that allows the processor to access the range, and the first storage unit and the processor are connected to communicate data necessary for executing the privileged software on the processor. A communication path, and a first instruction storing a first instruction among a plurality of instructions that are included in the privileged software and executed when the processor starts the privileged software via the communication path First fetch detection means for detecting a fetch to a storage address; and the processor sends the first description via the communication path. Second fetch detection means for detecting a fetch to a second storage address storing a specific instruction among the plurality of instructions included in the privileged software stored in a section, and the processor executing the software A predetermined time elapses from when the first fetch detection means detects a fetch to the first storage address until the second fetch detection means detects a fetch to the second storage address. Time determining means for determining whether or not the predetermined time has elapsed, and control means for releasing access of the first access range to the processor when it is determined that the predetermined time has not elapsed. It is characterized by.
また、本発明にかかる情報処理装置は、プロセッサと、第1のアクセス範囲へ前記プロセッサをアクセスさせる特権ソフトウェアを記憶する第1の記憶部と、前記第1のアクセス範囲よりも狭い第2のアクセス範囲へ前記プロセッサをアクセスさせるソフトウェアを記憶する第2の記憶部と、前記第1の記憶部と前記プロセッサとを接続し、前記特権ソフトウェアを前記プロセッサで実行するために必要なデータの通信を行う通信路と、前記プロセッサが前記通信路を介して、前記特権ソフトウェアに含まれる命令であって当該特権ソフトウェアを起動させる際に実行される複数の命令へのフェッチを検出するフェッチ検出手段と、前記プロセッサが前記ソフトウェアを実行しているときに、検出したフェッチ先のアドレスから、前記複数の命令を構成する各命令が格納された格納アドレスへのフェッチが、命令順に行われているか否かを判断するフェッチ判断手段と、前記複数の命令のフェッチが命令順に行われたと判断した場合に、前記プロセッサにより前記複数の命令うちの特定の命令が実行されたことを検出する検出手段と、検出した前記複数の命令の実行結果から、前記プロセッサへの割り込み禁止されているか否かを判断する判断手段と、割り込み禁止されていると判断した場合に、前記プロセッサに対して前記第1のアクセス範囲のアクセスを開放する制御手段と、を備えることを特徴とする。 The information processing apparatus according to the present invention includes a processor, a first storage unit that stores privileged software that causes the processor to access the first access range, and a second access that is narrower than the first access range. A second storage unit that stores software that allows the processor to access the range, and the first storage unit and the processor are connected to communicate data necessary for executing the privileged software on the processor. A fetch detection means for detecting fetches to a plurality of instructions that are executed when the processor starts up the privileged software that is included in the privileged software via the communication path; When the processor is executing the software, from the detected fetch destination address, the plurality of Fetch determination means for determining whether or not the fetch to the storage address storing each instruction constituting the instruction is performed in the order of instructions, and when determining that the fetch of the plurality of instructions is performed in the order of instructions, Detection means for detecting that a specific instruction of the plurality of instructions has been executed by the processor, and determination for determining whether or not an interrupt to the processor is prohibited from the detected execution result of the plurality of instructions And a control means for releasing the access in the first access range to the processor when it is determined that the interrupt is prohibited.
また、本発明にかかる情報処理装置は、プロセッサと、第1のアクセス範囲へ前記プロセッサをアクセスさせる特権ソフトウェアを記憶する第1の記憶部と、前記第1のアクセス範囲よりも狭い第2のアクセス範囲へ前記プロセッサをアクセスさせるソフトウェアを記憶する第2の記憶部と、前記第1の記憶部と前記プロセッサとを接続し、前記特権ソフトウェアを前記プロセッサで実行するために必要なデータの通信を行う通信路と、前記プロセッサが前記通信路を介して、前記特権ソフトウェアに含まれる命令であって当該特権ソフトウェアを起動させる際に実行される複数の命令へのフェッチを検出するフェッチ検出手段と、前記プロセッサが前記ソフトウェアを実行しているときに、検出したフェッチ先のアドレスから、前記複数の命令を構成する各命令が格納された格納アドレスへのフェッチが行われているか否かを判断するフェッチ判断手段と、前記複数の命令のフェッチが命令順に行われたと判断した場合に、前記プロセッサに対して前記第1のアクセス範囲のアクセスを開放する制御手段と、を備えることを特徴とする。 The information processing apparatus according to the present invention includes a processor, a first storage unit that stores privileged software that causes the processor to access the first access range, and a second access that is narrower than the first access range. A second storage unit that stores software that allows the processor to access the range, and the first storage unit and the processor are connected to communicate data necessary for executing the privileged software on the processor. A fetch detection means for detecting fetches to a plurality of instructions that are executed when the processor starts up the privileged software that is included in the privileged software via the communication path; When the processor is executing the software, from the detected fetch destination address, the plurality of A fetch determination means for determining whether or not a fetch to a storage address storing each instruction constituting the instruction is performed; and when determining that the plurality of instructions are fetched in order of instructions, And control means for releasing access in the first access range.
本発明によれば、エントリコードが複数命令で構成される特権ソフトウェアを実行する際に、他のソフトウェアによる不正な割り込みを防止して、安全性を向上させるという効果を奏する。 According to the present invention, when privileged software whose entry code is composed of a plurality of instructions is executed, an illegal interruption by other software is prevented and safety is improved.
以下に添付図面を参照して、この発明にかかる情報処理装置の最良な実施の形態を詳細に説明する。また、後述する実施の形態においては、情報処理装置をシステムLSIに適用した例について説明する。なお、情報処理装置は、システムLSIに限らず、どのような装置に適用しても良い。 Exemplary embodiments of an information processing apparatus according to the present invention will be explained below in detail with reference to the accompanying drawings. In the embodiments described later, an example in which the information processing apparatus is applied to a system LSI will be described. The information processing apparatus is not limited to the system LSI and may be applied to any apparatus.
(第1の実施の形態)
図1に示すように、システムLSI100は、メモリ150と、デバイス160とを接続している。また、システムLSI100は、プロセッサ101と、動作モード管理回路102と、メモリアクセス制御部103と、第1HV(Hyper Viser)領域保護回路104と、デバイスアクセス制御部105と、第2HV領域保護回路106と、保護メモリ107とを備える。
(First embodiment)
As shown in FIG. 1, the system LSI 100 connects a
メモリ150は、第1メモリ領域154と、第2メモリ領域155と、第3メモリ領域156と、第2のゲストOS格納領域152と、第3のゲストOS格納領域153とを備えている。そして、第1メモリ領域154は、第1のゲストOS格納領域151を保持している。
The
また、第1のゲストOS格納領域151には第1のゲストOSのバイナリコードが、第2のゲストOS格納領域152には第2のゲストOSのバイナリコードが、第3のゲストOS格納領域153には第3のゲストOSのバイナリコードが格納されている。また、第1メモリ領域154、第2メモリ領域155及び第3メモリ領域156は、メモリアクセス制御部103により読み込み及び書き込みが制限される記憶領域とする。また、ゲストOSを格納する領域は、第1のゲストOS格納領域151のように、読み込み及び書き込みが制限される記憶領域内に確保されていても良い。
The first guest
デバイス160は、システムLSI100に接続され、システムLSI100に含まれるプロセッサ101により制御が行われるデバイスとする。また、デバイス160は、後述するデバイスアクセス制御部105によりアクセスが制限される。また、デバイス160は、システムLSI100の内部に備えるものでも、システムLSI100の外部に備えるものでもよい。なお、システムLSI100に接続されるデバイスの数について特に制限を設けるものではない。
The
また、デバイス160の例としては、メモリモジュール、ハードディスクドライブ等の大容量外部記憶装置、ネットワークインターフェース等の外部通信装置、キーボードやマウスなど利用者が入力に用いる入力装置、さらにはディスプレイ等の外部出力装置が考えられるが、これらに限るものではない。
Examples of the
そして、本実施の形態にかかるシステムLSI100の内部では、第1〜第6通信路が配接されている。これら通信路は、プロセッサ101とメモリ/デバイス等の間でデータを伝える媒体である。少なくとも、アクセス先のアドレスと読み書きされるデータが通信路を介して伝送される。また、通信路はどのような形態でも良く、本実施の形態ではバスを用いることとする。このバスの例としては、アドレスのビット幅分のアドレスバス、データのビット幅分のデータバス、読み出し/書き込みを示す信号線から構成されることが考えられる。また、別の実施例としては、シリアルバスのように、アドレスやデータ等の区別なく少数の信号線で構成して、その信号線上に所定のプロトコルでプロセッサからのアクセス要求とメモリからの応答とを伝送してもよい。
The first to sixth communication paths are arranged inside the
本実施の形態にかかるシステムLSI100では、プロセッサ101上で特権ソフトウェアが動作している場合に、当該システムLSI100が管理している最上位の動作モードで動作するように設定を行っている。そして、当該最上位の動作モードに限りHV保護領域に対する所定のアクセスを開放している。
In the
また、特権ソフトウェアとは、システムLSI100で動作するソフトウェアのうち真に信頼できるソフトウェアをいう。特権ソフトウェアの信頼性を保証する機構は、どのような手法で実現しても良い。本実施の形態では、読み込み及び書き込みが制限されている保護メモリ107に格納することで信頼性を保証している。また、本実施の形態は、特権ソフトとしてハイパーバイザを用いた例とする。当該ハイパーバイザでは、後述するHV保護領域に含まれるアクセス先全てがアクセスさせる範囲となる。そして、当該ハイパーバイザのバイナリコードを「HVコード」と呼ぶ。また、上記の最上位の動作モードを、「HVモード」と呼ぶ。
Further, privileged software refers to software that can be truly trusted among software that operates on the
HVコード格納領域112は、HVコードを格納している。また、当該HVコード格納領域112に格納されたHVコードは、ゲストOS等のソフトウェアから修正されてはならない。なお、HVコード格納領域112の詳細については後述する。
The HV
図2に示すようにHVコードは、エントリ部に命令1“move SR to R0”201と、命令2“store R0 to CheckAdr”202とをエントリコードとして保持し、脱出コードに“return”203を保持する。このエントリ部では、HVコードの実行時に他プログラムにより割り込みが行われないように、プロセッサ101が割り込み禁止であるか確認を行う処理を実行する。また、エントリ部は、プロセッサ101がハイパーバイザを起動する際に実行する、HVコード内に格納されている複数の命令とする。そして、割り込み禁止であることが確認された場合には、プロセッサ101のHVコード実行時には、安全であることが保証される。
As shown in FIG. 2, the HV code holds the
図2に示すように、HVコードのエントリ部は、ムーブ命令とストア命令とで構成されている。そして、これら各命令はプロセッサ101が提供する機械語の1命令に相当する。命令1に含まれている‘SR’は、プロセッサ101の状態を表す値が格納されているレジスタ(ステータスレジスタ)を示す。この‘SR’の値には、プロセッサ101が現在割込み禁止状態かどうかを示す情報が含まれている。そして、‘RO’は、汎用レジスタとする。
As shown in FIG. 2, the entry portion of the HV code is composed of a move instruction and a store instruction. Each of these instructions corresponds to one machine language instruction provided by the
また、このように本実施の形態でエントリ部が複数命令したのは、本実施の形態にかかる後述するプロセッサ101では、命令セットにSRの内容をメモリに書込む命令が存在せず、SRの内容は汎用レジスタ(R0)との間に限り転送が可能なためである。 Also, in this embodiment, the plurality of entry units instructed in this way because the processor 101 (to be described later) according to this embodiment does not have an instruction to write the contents of the SR to the memory in the instruction set. This is because the contents can be transferred only to the general-purpose register (R0).
そこで、本実施の形態にかかるエントリ部は、命令1において、プロセッサ101の状態を示す値が格納されたレジスタ‘SR’の内容を、汎用レジスタ‘R0’に転送している。さらに命令2において、汎用レジスタ‘R0’の内容をCheckAdrに書込んでいる。この2個の命令で、プロセッサ101が割り込み禁止であることがチェックできる。
Therefore, in the
この命令に含まれる‘CheckAdr’は‘SR’の値を書き込むアドレスとする。‘CheckAdr’は、プロセッサ101が制御するメモリやデバイスのアドレスとは異なる、実際には存在しないアドレスを選択することが望ましい。この場合、後述するプロセッサ101が通信路に対して、存在しないアドレス‘CheckAdr’へのアクセス要求を伝送するが、当該通信路を介して接続されるメモリやデバイスは、伝送されたアクセス要求に応答して実際に読み書きを行うことがない。
'CheckAdr' included in this instruction is an address for writing the value of 'SR'. It is preferable to select an address that does not actually exist as “CheckAdr”, which is different from the address of the memory or device controlled by the
また、‘CheckAdr’に実際に存在するアドレスを選択する場合であっても、ハイパーバイザ及びゲストOSを含む全てのプログラムが使用しないアドレスを選択する必要がある。仮に‘CheckAdr’で示されたアドレスにデバイスが存在する場合、当該命令によってデータ書き込み処理が行われることになる。この結果、デバイスの誤動作を引き起こす可能性がある。このため、実際に使用されているアドレスを選択しないように留意する必要がある。 Further, even when an address that actually exists in 'CheckAdr' is selected, it is necessary to select an address that is not used by all programs including the hypervisor and the guest OS. If a device exists at the address indicated by 'CheckAdr', data write processing is performed according to the instruction. As a result, the device may malfunction. Therefore, care must be taken not to select an address that is actually used.
また、本実施の形態とは異なるが、HVコードのエントリ部が2個以上の命令で構成されていても良い。図3に示すように、HVコードのエントリ部がn個で構成されている場合等も考えられる。図3で示した例では、汎用レジスタの値をメモリに書き込む際に、別のベースレジスタを使用してアドレスを指定する必要がある場合である。この例では、命令1で、状態レジスタSRの内容を汎用レジスタR0に転送し、命令2以降で、R1の値をCheckAdrに設定し、最後の命令nでR1をベースレジスタに使用して、汎用レジスタR0の内容をCheckAdrに書込みを行っている。そして、これらの命令の後にプロセッサが割込み禁止状態であることをチェックするものとする。このようなn個で構成されている場合も途中で他のコードに割り込まれる可能性がある。
Further, although different from the present embodiment, the entry portion of the HV code may be composed of two or more instructions. As shown in FIG. 3, the case where the entry part of HV code | symbol is comprised by n piece etc. is also considered. In the example shown in FIG. 3, when writing the value of the general-purpose register into the memory, it is necessary to specify an address using another base register. In this example, the
つまり、HVコードのエントリ部が複数命令で構成されている場合にセキュリティをどのように保持するのか課題となる。 That is, it is a problem how to maintain security when the entry part of the HV code is composed of a plurality of instructions.
次に、従来から存在する組み込み機器において、単にハイパーバイザが動作している時に最上位の動作モードとなるように設計をしたために、ハイパーバイザ以外に不正ユーザコードが最上位の動作モードで実行されてしまう例について説明する。 Next, in the existing embedded device, since it was designed to be in the highest operating mode when the hypervisor is operating, unauthorized user code is executed in the highest operating mode in addition to the hypervisor. An example will be described.
図4に示すように、左側の不正ユーザコードが不正な処理を行うソフトウェアコードであり、右側のバイナリコードがハイパーバイザのバイナリコード(以下、HVコードという)である。まず、不正な処理を行うソフトウェアでは、“enable interrupt”により割込み許可に設定する。その後、不正ユーザコードは、エントリ部の命令1にジャンプする。命令1の実行後に何らかの割込みを発生させ、不正ユーザコードの割込みハンドラで‘R0’に偽のSRの値を読み込ませる。その後、エントリ部の命令2に復帰する。これと同時に、動作モードが最上位の動作モードに変更される。
As shown in FIG. 4, the unauthorized user code on the left side is software code for performing unauthorized processing, and the binary code on the right side is a hypervisor binary code (hereinafter referred to as HV code). First, in software that performs illegal processing, “enable interrupt” is set to enable interrupts. Thereafter, the unauthorized user code jumps to the
また、1回の命令フェッチで同時に読み出される命令の範囲(以下、命令フェッチ単位と呼ぶ)は、プロセッサに依存して様々である。この命令フェッチ単位は、1回の命令フェッチによって同時に読み出される命令数と、命令フェッチ単位の先頭のアドレス境界で規定される。例えば、組込み用のPowerPC(登録商標)405プロセッサでは、命令長は32ビットであるが、オンチップバスに接続されたメモリから命令をフェッチする場合には、1回の命令フェッチで64ビット境界(=2命令境界)に配置された2命令が同時に読み出される。 Also, the range of instructions that are simultaneously read by one instruction fetch (hereinafter referred to as an instruction fetch unit) varies depending on the processor. This instruction fetch unit is defined by the number of instructions that are simultaneously read by one instruction fetch and the head address boundary of the instruction fetch unit. For example, in an embedded PowerPC (registered trademark) 405 processor, the instruction length is 32 bits. However, when fetching an instruction from a memory connected to an on-chip bus, a 64-bit boundary ( = 2 instructions arranged at the boundary of 2 instructions) are read out simultaneously.
この組込み用のPowerPC(登録商標)405プロセッサの例では、命令フェッチ単位に含まれる命令のうち1番目の命令(すなわち64ビット境界に配置された命令)から順に実行する場合、命令フェッチ要求で指定されるアドレスは命令フェッチ単位の先頭アドレスとなり、その命令フェッチ単位に含まれる2命令が同時に読み出される。1番目の命令の実行時には2番目の命令はバッファに記憶され、2番目の命令の実行時にはその命令に対する命令フェッチは発生しない。 In the example of the built-in PowerPC (registered trademark) 405 processor, when executing sequentially from the first instruction (that is, an instruction arranged on a 64-bit boundary) among the instructions included in the instruction fetch unit, it is designated by an instruction fetch request. The address to be used is the head address of the instruction fetch unit, and two instructions included in the instruction fetch unit are read simultaneously. When the first instruction is executed, the second instruction is stored in the buffer, and when the second instruction is executed, an instruction fetch for the instruction does not occur.
また、本実施の形態では、命令フェッチ単位を、1命令毎の例とする。しかしながら、以下の説明の「命令」を「命令フェッチ単位」と置き換えることにより、命令フェッチ単位が複数命令の場合にも適用可能である。 In this embodiment, the instruction fetch unit is an example for each instruction. However, by replacing “instruction” in the following description with “instruction fetch unit”, the present invention can be applied to a case where the instruction fetch unit is a plurality of instructions.
そして、プロセッサ101では、ハイパーバイザのエントリ部の命令が終了した後、ハイパーバイザの他の命令を実行する。そして、ハイパーバイザ実行時に、実際には割り込みが禁止されていないため、不正ユーザコードはハイパーバイザに対して割り込むことができる。
The
なお、図4に示した例では、エントリ部の命令については命令順に行われている場合を示している。つまり、フェッチ検出部121が、仮にハイパーバイザのエントリ部の最初から最後までの命令を命令順にフェッチしたことを確認しても、本実施の形態に示したシステムLSI100では第1通信経路を介した命令フェッチを確認できない。このため、例えば第6通信経路を介して他のユーザコードの命令フェッチが行われたとしても動作モード管理回路102は、当該他のユーザコードの命令フェッチを検出できない。そこで、本実施の形態では、エントリ部の処理に要する時間を計測して割り込みが行われたか否か判断することとしている。
In the example shown in FIG. 4, the instructions in the entry part are executed in the order of instructions. That is, even if the fetch
仮に、汎用計算機に使用されるプロセッサのように割込みベクタテーブルや割込み処理ルーチンを完全に保護できる場合には、このような割込み処理ルーチンへのジャンプが行われても、再びHVコードに戻るように記述しておけば問題ない。しかしながら、組込み向け機器に用いられるプロセッサでは、割込みベクタテーブルや割込み処理ルーチンを完全にハイパーバイザの保護下に置くことができない。このため、割込み発生時に不正ユーザコードを、動作モードが最上位の動作モードで実行されてしまう可能性がある。 If the interrupt vector table and the interrupt processing routine can be completely protected as in a processor used in a general-purpose computer, even if a jump to such an interrupt processing routine is performed, the program returns to the HV code again. There is no problem if it is described. However, in a processor used for an embedded device, the interrupt vector table and the interrupt processing routine cannot be completely under the protection of the hypervisor. For this reason, there is a possibility that an illegal user code is executed in the highest operation mode when an interrupt occurs.
そこで、本実施の形態では、後述する動作モード管理回路102と、第1HV領域保護回路104と、第2HV領域保護回路106とが、不正ユーザコードによる最上位動作モードで動作することを禁止するように制御を行う。
Therefore, in the present embodiment, the operation
図1に戻り、プロセッサ101は、第1のゲストOS等のOS及びハイパーバイザなどのソフトウェアに従って処理又は演算等を行う。また、本実施の形態にかかるプロセッサ101は、仮想化を支援する機能を内蔵していないプロセッサとするが、実用上は仮想化を支援する機能を内蔵しているプロセッサであってもよいことはいうまでもない。
Returning to FIG. 1, the
また、プロセッサ101は、メモリ(メモリ150及び保護メモリ107)から命令を順次読み出し、読み出した命令を実行する。また、プロセッサ101は、読み出した命令に応じて、各通信路に接続されたメモリやデバイスに対してデータの読み出し/書き込みを行う。
The
ところで、一般的なプロセッサでは、より上位の特権モードに移行するときは、システムコール命令に代表される特定の命令の実行によって行われる。このシステムコール命令の実行後、特権モードへの移行とともに、例外が発生してOSのカーネルコードへジャンプし、割込み禁止状態として、安全性を確保している。本実施形態にかかるプロセッサは、動作モードが少なく、アプリケーションに割り当てるユーザモードとOSに割り当てる特権モードの2個程度しか動作モードがないものとする。この場合、ハイパーバイザの動作に割り当てる動作モードがなく、OSとハイパーバイザの動作を区別できない。 By the way, in a general processor, the transition to the higher privilege mode is performed by executing a specific instruction represented by a system call instruction. After execution of this system call instruction, with the transition to the privileged mode, an exception occurs and jumps to the kernel code of the OS to ensure safety by setting an interrupt disabled state. The processor according to the present embodiment has a small number of operation modes, and has only two operation modes: a user mode assigned to an application and a privilege mode assigned to an OS. In this case, there is no operation mode assigned to the operation of the hypervisor, and the operation of the OS and the hypervisor cannot be distinguished.
そこで、本実施の形態では、プロセッサ101自体が持つ動作モードよりも上位のアクセス権限を有する動作モードであるHVモードを導入している。このため、プロセッサ101の外部に配置されたハードウェアでHVモードに切り替えることになる。この場合、プロセッサ101上で動作するソフトウェアの指示によるHVコードへのジャンプや割込み禁止状態への移行等は、プロセッサ内部の動作のため、外部に配置されたハードウェアからは制御できない。
Therefore, in the present embodiment, an HV mode, which is an operation mode having an access authority higher than the operation mode of the
そこで、本実施の形態にかかるシステムLSI100では、HVコードへのジャンプや割込み禁止状態への移行はプロセッサ101上で動作するソフトウェア(例えば第1のゲストOS等)に任せ、プロセッサ101の外部のハードウェアで、適切にHVコードへジャンプしているか及び適切に割込み禁止状態になっているかチェックする。次に、このようなチェックを行う動作モード管理回路102について説明する。
Therefore, in the
動作モード管理回路102は、フェッチ検出部121と、フェッチ判断部122と、時間計測部123と、命令検出部124と、時間判断部125と、実行判断部126と、モード切替部127とを備え、プロセッサ101と第2HV領域保護回路106とを接続する第1通信路に流れるデータを監視して、必要に応じて動作モードの切替を行う。
The operation
また、動作モード管理回路102は、動作モードとして少なくともHVモードと通常モードの2個の状態を保持する状態遷移回路とする。動作モード管理回路102は、第1通信路に流れる信号を監視して、所定の条件が満たされた場合にHVモード/通常モードの状態遷移を起こす。また、動作モード管理回路102は、HVモード/通常モードの状態に応じて、モード情報信号を第1HV領域保護回路104及び第2HV領域保護回路106に出力する。これにより、第1HV領域保護回路104及び第2HV領域保護回路106は、動作モードに応じたアクセス制御を行うことができる。なお、動作モード管理回路102の動作に関する詳細については後述する。
The operation
また、HVモードに遷移できる条件について説明する。上述から動作モード管理回路102が動作モードをHVモードに切り替えるために必要な処理は、HVコードのエントリ部に適切に実行を移す処理(つまりエントリ部の命令が適切に実行されたことを保証する必要がある)、及び割込み禁止にする処理(つまり割込み禁止状態であることを保証する必要がある)とする。そして動作モード管理回路102は、これら2つの処理の実行を保証した上で、動作モードをHVモードに設定する処理を行うことができる。つまり、これら3つの処理が不可分に行われることが必要となる。なお、処理が不可分に行われるとは、これらの処理の間に別の処理が行われることがないことを意味する。また、当然ながら、HVコードは、ゲストOS等の他のソフトウェアから修正できないように保護される必要がある。
In addition, the conditions that allow transition to the HV mode will be described. From the above, the processing necessary for the operation
また、本実施の形態にかかるHVコードのエントリ部が適切に実行された場合、プロセッサ101の状態が割り込み禁止であるか否かが確認できる。このため、エントリ部が上述したように不正ユーザコードに割り込まれず、適切に実行されたか否かがポイントとなる。そこで、本実施の形態にかかる動作モード管理回路102では、エントリ部の実行時間を測定することにより、2命令以上のエントリ部を不可分に実行したことを保証することとする。
Further, when the entry portion of the HV code according to the present embodiment is appropriately executed, it can be confirmed whether or not the state of the
動作モード管理回路102が、2命令以上のエントリ部が不可分に実行されたか否かに基づいて、動作モードをHVモードにするか否かが決定される。これにより、動作モード管理回路102がHVモードに切り替えたときには、割り込み不可能な状態でHVコードのみ実行されていることが保証される。
The operation
そして、本実施の形態にかかる動作モード管理回路102は、上述した割り込みの偽装を防ぐために、エントリ部の実行時間を測定することで、2命令以上のエントリ部を不可分に実行したことを保証する。なお、詳細な処理手順については後述する。
Then, the operation
ところで、HVコードに実行を移す処理、及び割込み禁止にする処理は、プロセッサ101上で動作するソフトウェアで行われる。そして、動作モード管理回路102がこれらの処理の実行要求又は実行結果の検出を行う。この検出チェック方法として、本実施の形態にかかる動作モード管理回路102は、プロセッサ101と保護メモリ107とを接続する第1通信路で送受信されるアクセス要求の種類や、アドレス、データを監視する。次に、動作モード管理回路102の各構成について説明する。
By the way, the process of transferring execution to the HV code and the process of disabling interrupts are performed by software operating on the
フェッチ検出部121は、プロセッサ101と第2HV領域保護回路106とを接続する第1通信路を介して、命令フェッチの検出を行う。そして、フェッチ検出部121は、システムLSI起動時の初期化終了した後、又はゲストOS等のソフトウェアがプロセッサ101上で実行されている時に、HVコード格納領域112に格納されたHVコードのエントリ部の命令フェッチを検出することになる。
The fetch
フェッチ判断部122は、フェッチ検出部121が検出した命令フェッチが、後述する保護メモリ107のHVコード格納領域112に格納されたHVコードのエントリ部の最初の命令(例えば図2に示した命令1)のアドレスであるか否かを判断する。なお、詳細な判断手法については後述する。
The fetch
また、フェッチ判断部122は、フェッチ検出部121が検出した命令フェッチが、後述する保護メモリ107のHVコード格納領域112に格納されたHVコードの脱出部に含まれている脱出命令のアドレス(例えば図2に示した“return”203のアドレス)であるか否かを判断する。
In addition, the fetch
時間計測部123は、フェッチ判断部122がHVコードのエントリ部の最初の命令(例えば図2に示した命令1)に対するフェッチが行われたと判断した場合、時間の計測を開始する。また、時間計測部123が計測する時間は、システムLSI100内で使用される何らかのクロック信号をカウントすることで得られる時間とする。また、プロセッサ101における命令実行時間を計測することが目的であるので、時間計測として用いるクロック信号はプロセッサ101の動作進行の基準となるクロック信号であることが望ましい。
When the fetch
命令検出部124は、プロセッサ101がHVコードのエントリ部の最後の命令(例えば図2に示した命令2)の実行を検出する。本実施の形態にかかる命令検出部124では、プロセッサ101からのデータ書き込み要求の検出を行う。なお、命令検出部124は、図2に示したようにエントリ部の命令が2個の場合には命令2の検出を行うが、エントリ部がn個の命令で構成されている場合にはn番目の命令の検出を行うことになる。なお、本実施の形態とは異なるが、命令検出部124が、実行を検出する命令は、最後の命令に制限するものではなく、割り込みが禁止されていることが確認できる特定の命令であればよいものとする。
The
時間判断部125は、時間計測部123が時間の計測を開始してから所定の時間が経過したか否かを判断する。この所定の時間は、エントリ部の全ての命令を行うために要する時間に基づいて定められる。これにより、時間判断部125が所定の時間が経過したと判断したときに、命令検出部124が命令を検出できないのであれば、他のソフトウェアにより割り込みが行われたと判断できる。
The
実行判断部126は、命令検出部124が検出した命令の実行結果から、割り込み禁止となっているか否か判断する。本実施の形態にかかる実行判断部126は、プロセッサ101からのアドレスCheckAdrに対する書き込み要求で指定された値が、割り込み禁止を表す値であるか否か判断する。これにより、プロセッサ101が割り込み禁止状態であるか否か判断できる。
The
モード切替部127は、実行判断部126の判断結果に従って、動作モードの切替を行う。例えば、モード切替部127は、実行判断部126が割り込み禁止であると判断した場合、モード切替部127は、割り込み禁止状態でハイパーバイザがプロセッサ101上で動作するとみなして、動作モードをHVモードに切り替える。
The
そして、後述するHV保護領域においては、後述する第1HV領域保護回路104及び第2HV領域保護回路106が、当該動作モードに基づいて、メモリ150、保護メモリ107上のアドレス、又はデバイス160においてアクセス範囲を変更する処理を行う。なお、アクセス範囲とは、プロセッサ101にアクセスが開放されたアクセス先の範囲を示すものとする。
Then, in the HV protection area described later, the first HV
これにより、割り込み不可能な状態でHVコードが実行された時に限り、HV保護領域に含まれる全てのアクセス先にアクセスが開放される。そして、通常モードの場合には、第1のゲストOS等はHV保護領域に含まれる全てのアクセス先(範囲)よりも狭い範囲のアクセス範囲に対してアクセスが開放される。 Thus, access is released to all access destinations included in the HV protection area only when the HV code is executed in a state in which interruption is impossible. In the normal mode, the first guest OS or the like is opened to an access range narrower than all access destinations (ranges) included in the HV protection area.
また、フェッチ判断部122が脱出命令のアドレスだと判断した場合、モード切替部127は、第1のゲストOS等のソフトウェアがプロセッサ101上で動作するとみなして、動作モードを通常モードに切り替える。なお、詳細な切り替え条件等については後述する。
When the fetch
本実施の形態では、システムLSI100内部において、プロセッサ101上で動作するソフトウェアに応じてアクセスさせる範囲の変更等が行われる領域を、HV(ハイパーバイザ)保護領域とする。図1に示すようにHV保護領域には、メモリアクセス制御部103と、デバイスアクセス制御部105と、保護メモリ107と、第1HV(ハイパーバイザ)領域保護回路104と、第2HV領域保護回路106とを含むものとする。
In the present embodiment, an area in the
このHV保護領域に格納された構成(メモリ又は回路)は、プロセッサ101からのアクセス(読出し/書込み)に対して所定の制限が設けられている。これにより、HV保護領域に格納されたメモリやデバイスの制御情報、ゲストOSの管理情報等が、HVコードのみがアクセス又は書き込み可能となり、ゲストOS等による不正な処理から保護することができる。
The configuration (memory or circuit) stored in the HV protection area has predetermined restrictions on access (read / write) from the
なお、本実施の形態では、HV保護領域に上述した構成を含むものとするが、このような構成に制限するものではない。変形例として、システムLSIのHV保護領域に、HV領域保護回路とメモリアクセス制御部のみ含むものでも良いし、HV領域保護回路とデバイスアクセス制御部のみ含むものでも良いし、HV領域保護回路と保護メモリのみ含むものでも良いし、これらの2つ以上の組み合わせでも良い。なお、他の組み合わせの詳細な例については後述する。 In the present embodiment, the above-described configuration is included in the HV protection region, but is not limited to such a configuration. As a modification, the HV protection area of the system LSI may include only the HV area protection circuit and the memory access control unit, or may include only the HV area protection circuit and the device access control unit, or the HV area protection circuit and the protection. Only the memory may be included, or a combination of two or more of these may be used. Detailed examples of other combinations will be described later.
保護メモリ107は、HVコード格納領域112を格納する。また、保護メモリ107は、通常モードの場合は書き込み禁止とする。
The
本実施の形態では、HVコード格納領域112が、HV保護領域内に備えた保護メモリ107内に設けられている。そして、HVコード格納領域112は、後述する第2HV領域保護回路106により、動作モードがHVモード以外の時には書込みが禁止されている。これにより、ゲストOSからHVコードに対する修正を抑止することができる。なお、本実施の形態では、HVコード格納領域112をHV保護領域内部に設けたが、HV保護領域内部に制限するものではなく、ゲストOSからの修正を抑止できるのであればどこに設けても良く、例えばメモリ150内に設けても良い(ただし、メモリ150内に設けた場合、動作モード管理回路102は通信路6に接続する必要がある)。
In the present embodiment, the HV
本実施の形態では、後述する第2HV領域保護回路106により保護されることとするが、他の実施例としてはプロセッサ101から書換え不可能なROM(read only memory)上にHVコード格納領域112を設けても良い。
In this embodiment, protection is performed by a second HV
さらに、第2HV領域保護回路106は、HVコード格納領域112に対する書込みを禁止するだけではなく、HVコードのエントリ部を除いたHVコード本体のアドレスへの操作を全て禁止するように制御を行ってもよい。第2HV領域保護回路106がこのように制御を行うことで、通常モードにおいてHVコード本体の読み出しを抑止することも可能となる。これにより、HVコードの処理内容をゲストOSから隠蔽することができ、安全性をいっそう向上させることもできる。
Further, the second HV
次に、HVコード格納領域112に格納されたハイパーバイザと、第1のゲストOS格納領域151に格納された第1のゲストOSと、第2のゲストOS格納領域152に格納された第2のゲストOSと、第3のゲストOS格納領域153に格納された第3のゲストOSと、について説明する。
Next, the hypervisor stored in the HV
図5に示すように、本実施の形態にかかるシステムLSI100では、ハードウェア上にソフトウェアの最下層としてハイパーバイザ504が配置されている。さらに、そのハイパーバイザ504の上に第1のゲストOS501と、第2のゲストOS502と、第3のゲストOS503とが配置された構成となっている。なお、図5では説明を容易にするために、ハードウェアの構成としてメモリ150内部の第1メモリ領域154と、第2メモリ領域155と、第3メモリ領域156と、HV保護領域111のメモリアクセス制御部103及びデバイスアクセス制御部105内に格納された制御情報とを示したが、これら以外の構成に対しても、同様の制御が行われるものとする。
As shown in FIG. 5, in the
そして、ハイパーバイザは、これらゲストOSの切り替え機能を提供する。システムLSI100では、ゲストOSの切替え時に、任意のゲストOSからハイパーバイザに処理を戻してから、現在のゲストOSの状態の保存、及び次のゲストOSの状態の復帰を行う。
The hypervisor provides a guest OS switching function. In the
また、ゲストOSからハイパーバイザに処理が移ったときに、動作モードがHVモードとなる。この時、ハイパーバイザは、メモリアクセス制御部103及びデバイスアクセス制御部105が制御を行うときに参照する制御情報を更新することができる。そこで、ハイパーバイザは、次のゲストOSに対して割り当てられたメモリ及びデバイスのみアクセスできるように制御情報を更新する。このように、HVモードで動作しているハイパーバイザは、HV保護領域に含まれる全てのハードウェア(アクセス先)にアクセスすることができる。
Further, when the processing is transferred from the guest OS to the hypervisor, the operation mode becomes the HV mode. At this time, the hypervisor can update the control information referred to when the memory
そして、ハイパーバイザから次のゲストOSに処理が移った段階で、動作モードが通常モードになる。この通常モードでは、制御情報に対して更新を行うことができない。これにより、後述するメモリアクセス制御部103は、更新された制御情報に従って、第1のゲストOS501に対して第1メモリ領域154のみアクセスを開放し、第2メモリ領域155及び第3メモリ領域156に対してアクセスを禁止することができる。これにより、本実施の形態にかかるシステムLSI100では、不正なゲストOSが、他のゲストOSに割り当てられたメモリやデバイスにアクセスすることを抑止することができる。本実施の形態にかかるシステムLSI100のソフトウェア構成では、このように複数のゲストOSを互いに隔離して動作させることとする。
Then, the operation mode becomes the normal mode when the processing is transferred from the hypervisor to the next guest OS. In this normal mode, the control information cannot be updated. Accordingly, the memory
図1に戻り、第2HV領域保護回路106は、保護メモリ107とプロセッサ101との間に配置され、保護メモリ107を保護するための処理を行う。本実施の形態では、プロセッサ101と第2HV領域保護回路106とを第1通信路で接続し、第2HV領域保護回路106と保護メモリ107とを第3通信路で接続する。そして、第2HV領域保護回路106は、動作モード管理回路102から動作モードを示すモード情報信号が入力される。
Returning to FIG. 1, the second HV
第2HV領域保護回路106は、第2制御部132を備え、第1通信路を介してプロセッサ101からのアクセス要求を受け付ける。そして、第2HV領域保護回路106は、動作モード管理回路102から入力されたモード情報信号がHVモードを示す値の場合、受け付けたアクセス要求を保護メモリ107に、第3通信路を介して出力する。
The second HV
そして、第2制御部132は、動作モードがHVモードである旨の入力された場合に、保護メモリ107に対してアクセス要求を許可する制御を行う。また動作モードが通常モードである旨の入力がされた場合に、保護メモリ107に対してアクセス要求を禁止する制御を行う。
Then, the
これにより、第2HV領域保護回路106は、入力されたモード情報信号がHVモード以外を示す値の場合、受け付けたアクセス要求を保護メモリ107に出力することを抑止される。この保護メモリ107に対するアクセスに対する制限の例としては、保護メモリ107のアドレスの一部に対してアクセスを禁止する例や、書き込みのみ禁止する例等がある。また、これらの制限を組み合わせてもよい。このような制限は、保護メモリ107の一部のみ通常モード時のアクセスを制限する場合や、一部の操作を禁止する(書込みのみ禁止等)場合に有効である。
Thus, the second HV
また、第2HV領域保護回路106は、HVコードの隠蔽を行う場合には、HVコード格納領域112のうちHVコードのエントリ部に対応するアドレスのみ常に読み出し可能にしておく。そして、HVコードの本体に対応するアドレスは、HVモードの時のみ読み出し可能にする。また、HVコード実行時に動作モードをHVモードに変更する手順については後述する。このような処理を行うことで、安全性をさらに向上させることができる。
Further, the second HV
また、本実施の形態では、保護メモリ107と第2HV領域保護回路106とが別構成となる例について説明したが、これらの機能を1つの構成としてシステムLSI100に配置しても良い。
In the present embodiment, the example in which the
第1HV領域保護回路104は、第1制御部131を備え、第1通信路を介してプロセッサ101からのアクセス要求を受け付ける。そして、第1HV領域保護回路104は、メモリアクセス制御部103及びデバイスアクセス制御部105とを第2通信路で接続する。また、第1HV領域保護回路104は、動作モード管理回路102からモード情報信号が入力される。
The first HV
そして、メモリアクセス制御部103とメモリ150とを第4通信路で接続し、デバイス160とデバイスアクセス制御部105とを第5通信路で接続する。
Then, the memory
メモリアクセス制御部103は、メモリ150に対するアクセスを制御する。また、本実施の形態にかかるシステムLSI100では、プロセッサ101とメモリアクセス制御部103を接続する通信路として第6通信路を備え、プロセッサ101からメモリアクセス制御部103の制御情報にアクセスするための通信路として第1通信路及び第2通信路を用意した。これにより、メモリ150へのアクセス要求は、第6通信路を介して出力される。また、デバイスアクセス制御部105についても同様の通信路を備えることにした。
The memory
また、メモリアクセス制御部103は、プロセッサ101から第1通信路及び第1HV領域保護回路104を介して、制御情報の所定のアドレスに対するアクセス(少なくとも書込み、あるいは書込み/読出しの両方)を受け付ける。本実施の形態にかかるメモリアクセス制御部103では、保護対象となるのはこの制御情報とする。
In addition, the memory
メモリアクセス制御部103は、プロセッサ101から第6通信路を介して伝送されたメモリ150へのアクセス要求を、第4通信路を介してメモリ150に伝送する。このとき、メモリアクセス制御部103は、予め設定された制御情報に従い、メモリ150に伝送するアクセス要求に制限を加える。
The memory
また、メモリアクセス制御部103に設定される制御情報には様々な形態で実現できる。例えば、<開始アドレス,終了アドレス>の組を複数設定する。メモリへのアクセス要求のアドレスが、それらの組が表すアドレスの範囲内であれば、第4通信路へアクセス要求を伝える。そして、このようなアドレスの組をHVモードの場合に限り、編集することを可能とする。
The control information set in the memory
メモリアクセス制御部103は、第1HV領域保護回路104にHVモードを示すモード情報信号が入力されている場合に、制御情報の書込み/読出しに割り当てられたアドレスに対するアクセスを受け付ける。そして、メモリアクセス制御部103は、第1HV領域保護回路104にHVモード以外のモードを示すモード情報信号が入力されている場合に、制御情報の書込み/読出しに割り当てられたアドレスに対するアクセスを受け付けない。
When the mode information signal indicating the HV mode is input to the first HV
また、本実施の形態では、プロセッサ101とメモリアクセス制御部103を接続する経路として、第6通信路と、プロセッサ101から第1通信路、第1HV領域保護回路104及び第2通信路を経由する通信路との2つの経路を備えている。しかしながら、本実施の形態は、このような複数の経路を備えているものに制限するものではなく、例えばプロセッサ101から第1通信路、第1HV領域保護回路104及び第2通信路を経由する通信路のみとしてもよい。
Further, in the present embodiment, as a path for connecting the
メモリアクセス制御部103は、このようにHVモードに限り制御情報の書き込み/読み出しが行われることで、ゲストOSを動作を切り替える際に、ハイパーバイザが当該にメモリアクセス制御部103の制御情報を切り替え先のゲストOSに適した設定を行うことで、次に動作するゲストOSのデータのみアクセス可能にすることができる。
The memory
そして、第1制御部131は、動作モードがHVモードである旨の入力された場合に、メモリアクセス制御部103及びデバイスアクセス制御部105が有する制御情報に対するアクセスを開放する制御を行う。また動作モードが通常モードである旨の入力がされた場合に、メモリアクセス制御部103及びデバイスアクセス制御部105が有する制御情報に対するアクセスを禁止する制御を行う。
Then, the
そして、通信路をこのような構成としたことで、第1HV領域保護回路104は、メモリアクセス制御部103及びデバイスアクセス制御部105の制御情報の書込み/読出し以外のアクセス要求に対する処理を行わなくてよい。
Since the communication path has such a configuration, the first HV
また、第1HV領域保護回路104は、プロセッサ101からメモリアクセス制御部103の制御情報の書込み/読出しに割り当てられたアドレスへのアクセス要求を受け付けた時、動作モード管理回路102から入力されるモード情報信号がHVモードを表す値の場合、当該アクセス要求を、第2通信路を介してメモリアクセス制御部103に出力する。また、第1HV領域保護回路104は、動作モード管理回路102から入力されるモード情報信号がHVモード以外を表す値の場合、当該アクセス要求を、メモリアクセス制御部103に出力するのを抑止する。
The first HV
なお、本実施の形態では、メモリアクセス制御部103の制御情報に対するアクセス要求を第1通信路及び第2通信路を介してデータの送受信を行い、制御情報以外のメモリアクセス制御部103に対するアクセス要求を第6通信路を介してデータの送受信を行うこととした。しかしながら、本実施の形態とは異なるが、これら別々となっている通信路を、第1HV領域保護回路104を介した1つの通信路で構成しても良い。この場合、メモリ150に対するアクセス要求も第1HV領域保護回路104を介してアクセス要求が行われることになる。また、第1HV領域保護回路104は、メモリアクセス制御部103の制御情報に対する書き込み/読み込みは上述したような制御を行うが、これら以外のアクセス要求(例えば、メモリ150に対するアクセス要求)については全てメモリアクセス制御部103に出力する。
In this embodiment, the access request for the control information of the memory
デバイスアクセス制御部105は、デバイス160に対するアクセスを制御する。また、デバイスアクセス制御部105は、上記のメモリアクセス制御部103と同様に第1HV領域保護回路104を介して、デバイスアクセス制御部105が有する制御情報に対するアクセス要求を受け付ける。なお、デバイスアクセス制御部105で行われる処理は、メモリアクセス制御部103と同様なので説明を省略する。
The device
また、デバイスアクセス制御部105に設定される制御情報には様々な形態で実現できる。例えば、<開始アドレス,終了アドレス>の組を複数設定する。デバイスへのアクセス要求のアドレスが、それらの組が表すアドレスの範囲内であれば、第5通信路へアクセス要求を伝える。そして、このようなアドレスの組をHVモードの場合に限り、編集することを可能とする。
The control information set in the device
また制御情報の別の形態としては、複数のデバイスを接続されている場合、各デバイスに対応する<開始アドレス,終了アドレス>の組をあらかじめ設定しておき、さらに、当該アドレスに対してアクセスを開放するか否かを1ビットのビットマスクとして設定してもよい。この形態では、デバイスへのアクセス要求のアドレスが、ビットマスクが‘1’に対応するデバイスに割り当てられたアドレスの範囲内であれば、アクセス要求を出力する。 As another form of control information, when a plurality of devices are connected, a set of <start address, end address> corresponding to each device is set in advance, and access to the address is further performed. Whether or not to open may be set as a 1-bit bit mask. In this mode, if the address of the access request to the device is within the range of the address assigned to the device corresponding to the bit mask “1”, the access request is output.
本実施の形態では、例えばゲストOSを切り替える際に、ハイパーバイザがデバイスアクセス制御部105の制御情報の書き換えを行うことで、動作するゲストOSに割り当てられたデバイスにのみアクセスを開放することが可能となる。
In the present embodiment, for example, when the guest OS is switched, the hypervisor rewrites the control information of the device
次に動作モード管理回路102の処理について説明する。動作モード管理回路102が行う動作は、大きく分けると以下の2つの動作になる。
Next, processing of the operation
まず第1の動作として、動作モード管理回路102は、動作モードが通常モードの時、HVモードエントリのチェックを行い、所定の条件が満たされた時点で動作モードをHVモードに遷移させる。第2の動作として、動作モード管理回路102は、動作モードがHVモードの時、HVモード脱出のチェックを行い、所定の条件が満たされた時点で動作モードを通常モードへ遷移させる。
First, as a first operation, the operation
図6に示すように、まず、動作モード管理回路102は、システムLSI100全体の起動時に初期化を行う(ステップS611)。ここでは動作モードを通常モードにする。
As shown in FIG. 6, first, the operation
その後、動作モード管理回路102のフェッチ検出部121等が、第1通信路を監視して、HVコードのエントリ部が適切に行われたことを確認する(ステップS612)。また、ステップS612の処理は、所定時間毎にエントリ部が適切に行われたと判断されるまで繰り返し行われる。なお、詳細な処理手順については後述する。
Thereafter, the fetch
次に、モード切替部127が、動作モードをHVモードに切り替える処理を行う(ステップS613)。そして、動作モード管理回路102は、動作モードがHVモードであることを示すモード情報信号を、第1HV領域保護回路104及び第2HV領域保護回路106に対して出力する(ステップS614)。なお、本フローチャートでは説明を容易にするため、このタイミングでモード情報信号を出力しているが、実際には、動作モード管理回路102は所定間隔毎に常にモード情報信号を出力している。なお、動作モード管理回路102が、モード情報信号を常に信号線に出力していてもよい。いずれにしても、動作モード管理回路102が、モード変更のタイミングを第1HV領域保護回路104及び第2HV領域保護回路106に伝えることが可能である。以上までが、上記第1の動作となる。
Next, the
そして、第1HV領域保護回路104は、動作モード管理回路102からモード情報信号の入力を受け付け、動作モードがHVモードに変更されたことを認識する(ステップS601)。これにより、第1制御部131は、メモリアクセス制御部103及びデバイスアクセス制御部105が有する制御情報に対するアクセスを開放する制御を行う(ステップS602)。
Then, the first HV
同様に、第2HV領域保護回路106は、動作モード管理回路102からモード情報信号の入力を受け付けた場合、動作モードがHVモードに変更されたことを認識する(ステップS621)。これにより、第2制御部132は、保護メモリ107に対するアクセスを開放する制御を行う(ステップS622)。
Similarly, when receiving the input of the mode information signal from the operation
その後、動作モード管理回路102のフェッチ検出部121が、第1通信路を監視して、HVコードの脱出部が適切に行われたことを確認する(ステップS615)。なお、ステップS615の処理は、所定時間毎に脱出部が適切に行われたと判断されるまで繰り返し行われる。なお、詳細な処理手順については後述する。
Thereafter, the fetch
次に、モード切替部127が、動作モードを通常モードに切り替える処理を行う(ステップS616)。つまり、プロセッサ101上では、ステップS616の処理において他のソフトウェアのために通常モードに切り替えられ、ゲストOS等の他のソフトウェアが実行されることになる。
Next, the
このため、動作モード管理回路102は、動作モードが通常モードであることを示すモード情報信号を、第1HV領域保護回路104及び第2HV領域保護回路106に対して出力する(ステップS617)。以上までが、上記第2の動作となる。その後、他のソフトウェアが実行されているときに、再び動作モード管理回路102のフェッチ検出部121等が、第1通信路を監視して、HVコードのエントリ部が適切に行われたか否かを確認することになる(ステップS612)。
Therefore, the operation
また、第1HV領域保護回路104は、動作モード管理回路102からモード情報信号の入力を受け付けた場合、動作モードが通常モードに変更されたことを認識する(ステップS603)。これにより、第1制御部131は、直ちにメモリアクセス制御部103及びデバイスアクセス制御部105が有する制御情報に対するアクセスを禁止する制御を行う(ステップS604)。
Further, when receiving the input of the mode information signal from the operation
同様に、第2HV領域保護回路106は、動作モード管理回路102からモード情報信号の入力を受け付けた場合、動作モードが通常モードに変更されたことを認識する(ステップS623)。これにより、第2制御部132は、直ちに保護メモリ107に対するアクセスを禁止する制御を行う(ステップS624)。
Similarly, when receiving the input of the mode information signal from the operation
本実施の形態では、上述した処理を行うことで、動作モードに従って、HV保護領域に格納された構成を適切に保護することができる。 In the present embodiment, by performing the above-described processing, it is possible to appropriately protect the configuration stored in the HV protection area according to the operation mode.
次に、図6のステップS612で示したHVコードのエントリ部が適切に実行されたことの確認手順について説明する。HVコードのエントリ部のチェック手法は、HVコードのエントリ部の内容とシステムLSIの構成との組合せに応じて複数の形態が存在する。本実施の形態では複数存在する形態のうち一形態について説明する。なお、他の形態については、後述する実施形態で説明する。 Next, a procedure for confirming that the entry portion of the HV code shown in step S612 in FIG. 6 has been executed properly will be described. There are a plurality of methods for checking the entry portion of the HV code depending on the combination of the contents of the entry portion of the HV code and the configuration of the system LSI. In the present embodiment, one of a plurality of forms will be described. In addition, about another form, it demonstrates in embodiment mentioned later.
本実施の形態にかかるHVコードのエントリ部が適切に実行されたことを確認する手法としては、所定時間内にエントリ部が実行されたか否かを判断する手法とする。また、HVコードのエントリ部が実行された際に、プロセッサ101が割込み禁止であることを確認している。そこで、本実施の形態では、所定時間内にエントリ部が実行され、且つエントリ部の実行で割り込み禁止であることが確認できた場合に、HVモードに切り替えることとする。
As a method for confirming that the entry portion of the HV code according to the present embodiment has been properly executed, a method for determining whether or not the entry portion has been executed within a predetermined time is used. In addition, when the entry portion of the HV code is executed, it is confirmed that the
そして、HVコードのエントリ部が実行される時、プロセッサ101から第1通信路に以下の順序で信号が伝送される。
When the entry portion of the HV code is executed, signals are transmitted from the
まず、プロセッサ101から、HVコード格納領域112内のアドレス‘HVEntry’の命令1のアドレスに対して、命令フェッチの要求を伝送する。そして、HVコード格納領域112から命令1が伝送される。その後、プロセッサ101から命令2のアドレスに対して命令フェッチの要求が伝送される。そして、HVコード格納領域112から命令2が伝送される。なお、エントリ部にn個命令がある場合、この命令フェッチ要求及び命令の伝送がn回繰り返されることになる。
First, an instruction fetch request is transmitted from the
本実施の形態にかかる動作モード管理回路102は、命令1のアドレスに対する命令フェッチの要求を検出してから、命令2が実行されるまでの実行時間を計測し、当該実行時間が不正ユーザコードに割り込まれることなく連続して実行された場合の時間と等しい(または小さい)か否かを確認する。そして、動作モード管理回路102は、実行時間が等しい(または小さい)場合に、HVコードのエントリ部が不可分に実行されたことを保証する。さらに、命令2の実行内容を確認することで、割込み禁止状態であることを保証する。これらが保証されたことで、動作モード管理回路102が動作モードをHVモードに遷移させる条件が満たされたことになる。
The operation
図7に示すように、まず、フェッチ検出部121は、第1通信路を監視して、プロセッサ101から伝送されてくる命令フェッチの要求を検出したか否か判断する(ステップS701)。なお、当該処理は検出するまで繰り返される。
As shown in FIG. 7, first, the fetch
次に、フェッチ判断部122は、フェッチ検出部121が命令フェッチの要求を検出した場合(ステップS701:Yes)、当該命令フェッチの要求で指定されたアドレスがエントリ部の命令1のアドレスであるか否か判断する(ステップS702)。そして、フェッチ判断部122が、異なると判断した場合(ステップS702:No)、再びフェッチ検出部121による命令フェッチの検出を行う(ステップS701)。
Next, when the fetch
そして、フェッチ検出部121は、アドレスが命令1と一致すると判断した場合(ステップS702:Yes)、時間計測部123が時間の計測を開始する(ステップS703)。
When the fetch
次に、時間判断部125が、時間の計測を開始してから所定時間Tを経過したか否か判断する(ステップS704)。なお、所定時間Tは、命令1のフェッチを検出してから命令2が実行されるまでに要するものとして予め設定された時間とする。
Next, the
また、時間判断部125により所定時間Tを経過したと判断された場合(ステップS704:No)、時間計測部123は時間計測を終了し(ステップS709)、再びフェッチ検出部121による命令フェッチの検出を行う(ステップS701)。
If the
そして、時間判断部125により所定時間Tを経過していないと判断された場合(ステップS704:Yes)、命令検出部124は、第1通信路を監視して、プロセッサ101からのデータ書き込み要求を検出したか否かを判断する(ステップS705)。検出していないと判断した場合(ステップS705:No)、時間判断部125が所定時間Tを経過したか否かの判断から処理を開始する(ステップS704)。
If the
なお、所定時間Tは、エントリコードが先頭から連続して実行された際の実行時間であることが望ましい。このエントリコード実行時間は、プロセッサ101内部の動作をシミュレートして計算する、又は実際にプロセッサ上でエントリコードを実行させてプロセッサ101の出力信号を計測する等により、あらかじめ調べておく必要がある。ただし、エントリコードの実行時間にある程度の揺れが存在する場合、実行時間の最大値を所定時間Tとして用いる。
The predetermined time T is desirably an execution time when the entry code is continuously executed from the top. This entry code execution time needs to be checked in advance, for example, by simulating the internal operation of the
次に、命令検出部124がデータ書込みの要求を検出した場合(ステップS705:Yes)、時間計測部123が時間計測を終了する(ステップS706)。そして、命令検出部124が当該データ書き込み要求で指定されたアドレスが‘CheckAdr’と一致するか否か判断する(ステップS707)。そして、命令検出部124が、異なると判断した場合(ステップS707:No)、再びフェッチ検出部121による命令フェッチの検出を行う(ステップS701)。
Next, when the
そして、命令検出部124は、アドレスが‘CheckAdr’と一致すると判断した場合(ステップS707:Yes)、実行判断部126が書込み要求で指定されたデータと割込み禁止を表す‘SR’の値が一致するか否か判断する(ステップS708)。そして、実行判断部126が、異なると判断した場合(ステップS708:No)、再びフェッチ検出部121による命令フェッチの検出を行う(ステップS701)。
If the
次に、実行判断部126は、書込みデータと割込み禁止を表す‘SR’の値が一致すると判断した場合(ステップS707:Yes)、HVコードのエントリ部が適切に実行されたことを確認できたものとする。そして、図6に示したステップS613以降の処理が行われることになる。
Next, when the
なお、‘SR’が割込み禁止/許可のみを表す場合には、単純に書込みデータ全体を比較すれば良い。しかし、一般にはプロセッサ状態を表すレジスタは、割込み状態、アドレス変換モード、特権モードなどの異なる種類の状態をビット単位で表す場合が多い。このような場合、割込み状態に対応するビットのみを比較すれば良い。 When 'SR' indicates only interrupt prohibition / permission, the entire write data may be simply compared. However, in general, a register representing a processor state often represents different types of states such as an interrupt state, an address translation mode, and a privileged mode in units of bits. In such a case, only the bit corresponding to the interrupt state needs to be compared.
次に、図6のステップS615で示したHVモード脱出の検出手順について説明する。ハイパーバイザによる処理が終了したことを検出することで、動作モードをHVモードから切り替えられる。後述する例は、HVモード脱出のチェックの第一の形態として、HVモードで動作すべき処理が終了したことが保証される命令(以降、HVモード脱出命令と呼ぶ)が実行されたことが保証されたときに動作モードを通常モードに切り替えさせる例である。 Next, the detection procedure of HV mode escape shown by step S615 of FIG. 6 is demonstrated. By detecting the completion of processing by the hypervisor, the operation mode can be switched from the HV mode. In the example described later, as a first form of checking for HV mode exit, it is guaranteed that an instruction (hereinafter referred to as an HV mode exit instruction) that guarantees that processing to be operated in the HV mode has ended is executed. This is an example of switching the operation mode to the normal mode when the operation is performed.
HVモードで動作すべき処理が終了したことが保証される命令はHVコードに依存する。このため、当該命令は、HVコードに応じて様々な形態が存在する。例えば、図2で示したHVコードでは、符号203で示されるHVコードの最後の命令‘return’が呼び出された場合、HVコードによる処理が終了する。つまり、プロセッサ101が最後の命令203を呼び出して、実行されるソフトウェアをゲストOSに切り替える場合、これ以降の処理はHVモードで動作させる必要がない。そこで、図2に示すHVコードでは、当該最後の命令203を、HVモード脱出命令として用いる。なお、本実施の形態は、HVモード脱出命令をHVコードの最後の命令に制限するものではない。つまり、HVモードで動作すべき処理が終了したことが保証される命令であれば、HVコードの最後の命令より前の命令でも良い。
The instruction that guarantees that the process to be operated in the HV mode is completed depends on the HV code. Therefore, the instruction has various forms depending on the HV code. For example, in the HV code shown in FIG. 2, when the last instruction “return” of the HV code indicated by
そして、図2に示すHVモード脱出命令(最後の命令203)が実行される時、まず第1にプロセッサ101は、保護メモリ107のHVモード脱出命令が格納されているアドレス(以下、“HVExit”とする)に対して、命令フェッチの要求を伝送する。次に、保護メモリ107からHVコード格納領域112に格納されたデータ(“HVExit”に格納されている命令)をプロセッサ101に対して伝送する。
When the HV mode exit instruction (last instruction 203) shown in FIG. 2 is executed, first, the
そして、本実施の形態では、動作モード管理回路102は、HVモード脱出命令が格納されているアドレスに対するフェッチを検出した場合に、HVモードで動作すべき処理が終了したことを保証されたと判断し、動作モードを通常モードに切り替える。
In this embodiment, when the operation
図8に示すように、まず、フェッチ検出部121は、第1通信路を監視して、プロセッサ101から伝送されてくる命令フェッチの要求を検出する(ステップS801)。
As shown in FIG. 8, first, the fetch
次に、フェッチ検出部121は、命令フェッチの要求を検出した場合、フェッチ判断部122は、当該命令フェッチの要求で指定されたアドレスが脱出命令のアドレス(図2の符号203)と一致するか否か判断する(ステップS802)。そして、フェッチ判断部122が、異なると判断した場合(ステップS802:No)、再び命令フェッチの検出を行う(ステップS801)。
Next, when the fetch
次に、フェッチ検出部121は、当該命令フェッチの要求で指定されたアドレスが脱出命令のアドレス(図2符号203)と一致すると判断した場合(ステップS802:Yes)、HVモード脱出チェックが完了したものとする。そして、図6に示したステップS616以降の処理が行われることになる。
Next, when the fetch
上述した実施の形態では、システムLSI100のHVコード格納領域911を保護メモリ107内に設け、各ゲストOSの格納領域をメモリ150内に設けた。しかしながら、同一メモリ内にHVコード格納領域と各ゲストOSの格納領域とを設けても良い。この場合、HVコード格納領域は、メモリアクセス制御部等によりアクセスが制限されることになる。
In the embodiment described above, the HV
なお、HV保護領域の制限手法として、本実施の形態以外の制限手法を用いても良い。例えば、HVモード以外の動作モードの場合は、HV保護領域に格納された全てのメモリ及びデバイスの全てのアドレスに対して、全ての操作(読出し/書込み)を禁止してもよい。他の例としては、HV保護領域に格納されたうちアドレスの一部に対してのみアクセスや書き込みを禁止しても良い。また、これらの制限を組み合わせても良い。 Note that a limiting method other than the present embodiment may be used as a method for limiting the HV protection area. For example, in an operation mode other than the HV mode, all operations (read / write) may be prohibited for all addresses of all memories and devices stored in the HV protection area. As another example, access or writing to only a part of the address stored in the HV protection area may be prohibited. Moreover, you may combine these restrictions.
なお、通信路を流れるデータにおいて、命令フェッチとデータ読出しを区別する信号が存在しない場合、通信路と別経路でプロセッサ101が出力する命令フェッチを示す信号を動作モード管理回路に入力する必要がある。これにより、命令フェッチとデータ読み出しを区別することができる。
If there is no signal for distinguishing between instruction fetch and data read in the data flowing through the communication path, it is necessary to input a signal indicating the instruction fetch output by the
本実施の形態にかかるシステムLSI100を用いることで、プロセッサの仮想化サポート機能に依存することなく、HVコードの実行時にのみアクセス可能となる保護領域を確保することができる。この保護領域にメモリやデバイスのアクセス制御情報、ゲストOSの管理情報、HVコード本体といった情報を格納することにより、ゲストOSから不正にこれらの情報を読出し/書込みすることを抑止することができる。このように、確実にゲストOS間の隔離を実現することで、安全性を向上させることができる。
By using the
また、本実施の形態にかかるシステムLSI100では、HVコードのエントリ部が複数命令で構成されているが、当該エントリ部の実行時に時間を計測することで、エントリ部の複数命令が不可分に行われていることを保証するので、当該エントリ部の実行時に他のコードによる割り込みを防止することができる。これにより、安全性を向上させることができる。
In the
(第2の実施の形態)
第1の実施の形態にかかるシステムLSI100では、HVコード格納領域112に格納されたHVコードのエントリ部が、割り込み禁止であることを確認するための複数命令で構成された例について説明した。しかしながら、HVコードのエントリ部をこのような命令に制限するものではない。そこで、第2の実施の形態では、システムLSIのHVコード格納領域に、割り込み禁止するための複数命令で構成された例について説明する。
(Second Embodiment)
In the
図9は、第2の実施の形態に係るシステムLSI900の構成を示すブロック図である。上述した第1の実施の形態に係るシステムLSI100とは、動作モード管理回路102と処理が異なる動作モード管理回路901を備え、HVコード格納領域112とは格納しているバイナリコードが異なるHVコード格納領域911を保護メモリ107が備えている点のみ異なる。なお、本実施の形態のシステムLSI900の構成で、第1の実施の形態のシステムLSI100と共通な構成については説明を省略する。
FIG. 9 is a block diagram showing a configuration of a
まず、HVコード格納領域911は、HVコードを格納している。図10に示すようにHVコードは、エントリ部に命令1“load R0,=割り込み禁止”1001と、命令2“move R0 to SR”1002とを保持し、脱出コードは図2と同様に“return”1003を保持する。このエントリ部では、プロセッサ101の状態を保持する“SR”に割り込み禁止であることを示す値を設定する。つまり、第1の実施の形態にかかるシステムLSI100のようにアドレス“CheckAdr”に対して書き込まれたデータをチェックする必要がない。つまり、本実施の形態にかかるシステムLSI900は命令フェッチの確認を行うだけで、割り込み禁止を保証できる実施の形態である。
First, the HV
また、本実施の形態とは異なるが、HVコードのエントリ部が2個以上の命令で構成されていても良い。図11に示すように、HVコードのエントリ部がn個で構成されている場合等も考えられる。図11で示した例では、状態レジスタ‘SR’の3ビット目が‘1’の場合が書き込み禁止である例とする。このためにn個の命令を行うことで、SRの3ビット目を‘1’を設定している。このようなn個で構成されている場合も途中で他のコードに割り込まれる可能性がある。 Further, although different from the present embodiment, the entry portion of the HV code may be composed of two or more instructions. As shown in FIG. 11, the case where the entry part of HV code is comprised by n piece etc. is also considered. In the example shown in FIG. 11, it is assumed that writing is prohibited when the third bit of the status register “SR” is “1”. Therefore, by executing n instructions, “1” is set for the third bit of the SR. Even in the case of such n pieces, there is a possibility that another code will be interrupted.
また、このように本実施の形態でエントリ部が複数命令したのは、第1の実施の形態と同様に、プロセッサ101が有する命令セットの制限のためである。
In addition, the reason why the plurality of entry units instructed in this embodiment is because of the limitation of the instruction set of the
動作モード管理回路901は、第1の実施の形態にかかる動作モード管理回路102とは、フェッチ判断部122と処理が異なるフェッチ判断部921を備え、時間判断部125と処理が異なる時間判断部922を備え、命令検出部124と実行判断部126とを削除された点で異なる。
The operation
フェッチ判断部921は、フェッチ検出部121が備える機能の他に、後述する保護メモリ107のHVコード格納領域911に格納されたHVコードのエントリ部の最後の命令のアドレス(図10に示す命令2)であるか否かを判断する。なお、詳細な判断手法については後述する。
In addition to the function of the fetch
時間判断部922は、時間計測部123が時間の計測を開始してから所定の時間が経過したか否かを判断する。この所定の時間は、エントリ部の全ての命令をフェッチするまでに要する時間に基づいて定められる。これにより、時間判断部922が所定の時間が経過したと判断したときに、フェッチ判断部921がエントリ部の最後の命令を検出したと判断できなかった場合、他のソフトウェアにより割り込みが行われたと判断できる。
The
また、システムLSI900の処理は、システムLSI100の処理と異なる点として、動作モード管理回路911のフェッチ検出部121等が、第1通信路を監視して、HVコードのエントリ部が適切に行われたことを確認する処理手順が異なる。そこで、エントリ部が適切に行われたことを確認する処理手順について説明する。
The processing of the
図12に示すように、まず、フェッチ検出部121は、第1通信路を監視して、プロセッサ101から伝送されてくる命令フェッチの要求を検出したか否か判断する(ステップS1201)。なお、当該処理は検出するまで繰り返される。
As shown in FIG. 12, first, the fetch
次に、フェッチ判断部122は、フェッチ検出部121が命令フェッチの要求を検出した場合(ステップS1201:Yes)、当該命令フェッチの要求で指定されたアドレスがエントリ部の命令1のアドレスであるか否か判断する(ステップS1202)。そして、フェッチ判断部122が、異なると判断した場合(ステップS1202:No)、再びフェッチ検出部121による命令フェッチの検出を行う(ステップS1201)。
Next, when the fetch
そして、フェッチ判断部122は、アドレスが命令1と一致すると判断した場合(ステップS1202:Yes)、時間計測部123が時間の計測を開始する(ステップS1203)。
When the fetch
次に、時間判断部922が、時間の計測を開始してから所定時間Tを経過したか否か判断する(ステップS1204)。なお、所定時間Tは、命令1のフェッチを検出してから命令2をフェッチするまでに要するものとして予め設定された時間とする。
Next, the
また、時間判断部922により所定時間Tを経過したと判断された場合(ステップS1204:No)、時間計測部123は時間計測を終了し(ステップS1208)、再びフェッチ検出部121による命令フェッチの検出を行う(ステップS1201)。
If the
そして、時間判断部922により所定時間Tを経過していないと判断された場合(ステップS1204:Yes)、フェッチ検出部121は、第1通信路を監視して、プロセッサ101から伝送されてくる命令フェッチの要求を検出したか否か判断する(ステップS1205)。
If the
そして、フェッチ検出部121が命令フェッチを検出しなかった場合(ステップS1205:No)、時間判断部922が所定時間Tを経過したか否かの判断から処理を開始する(ステップS1204)。
If the fetch
そして、フェッチ検出部121が命令フェッチを検出した場合(ステップS1205:Yes)、フェッチ判断部921はフェッチアドレスが命令2のアドレスであるか否か判断する(ステップS1206)。そして、フェッチアドレスが命令2のアドレスではないと判断した場合(ステップS1206:No)、時間判断部922が所定時間Tを経過したか否かの判断から処理を開始する(ステップS1204)。
When the fetch
次に、フェッチ判断部921はフェッチアドレスが命令2のアドレスであると判断した場合(ステップS1206:Yes)、時間計測部123が時間計測を終了する(ステップS1207)。そして、図6に示したステップS613以降の処理が行われることになる。
Next, when the fetch
つまり、本実施の形態では、命令2のアドレスがフェッチされた以上、命令2により書き込み禁止状態にされる。これにより、プロセッサ101が書き込み禁止状態になることが保証される。つまり、第1の実施の形態のように実行結果を確認することなく、エントリ部の複数命令が不可分に行われていることを保証するので、安全性を確保することができる。
That is, in the present embodiment, as long as the address of the
(第3の実施の形態)
第1及び第2の実施の形態にかかるシステムLSIでは、時間を計測することで他のプログラムによる割り込みを防止する例について説明した。しかしながら、割り込み防止手法を時間計測に制限するものではない。そこで、第3の実施の形態では、HVコードのエントリ部の命令フェッチが命令順に行われていることを検出することで、割り込み禁止を防止する形態とする。
(Third embodiment)
In the system LSIs according to the first and second embodiments, the example in which interruption by another program is prevented by measuring time has been described. However, the interrupt prevention method is not limited to time measurement. Therefore, in the third embodiment, the prohibition of interrupt is prevented by detecting that the instruction fetch of the entry part of the HV code is performed in the order of instructions.
図13は、第3の実施の形態に係るシステムLSI1300の構成を示すブロック図である。上述した第1の実施の形態に係るシステムLSI100とは、動作モード管理回路102と処理が異なる動作モード管理回路1301と、第1HV領域保護回路104と処理が異なる第1HV領域保護回路1302とを備え、第2HV領域保護回路106が削除され、第1、2及び6通信路の接続先が変更されている点のみ異なる。なお、本実施の形態のシステムLSI1300の構成で、第1の実施の形態のシステムLSI100と共通な構成については説明を省略する。
FIG. 13 is a block diagram showing a configuration of a
また、本実施の形態で利用されるHVコードは、第1の実施の形態で示したHVコードと同様として説明を省略する。そして、このようなHVコードに対してエントリコードを2命令以上で実装する場合、その処理中に任意のユーザコードを実行されて、割込み禁止状態を偽装されるおそれがある。 The HV code used in the present embodiment is the same as the HV code shown in the first embodiment, and the description thereof is omitted. When an entry code is implemented with two or more instructions for such an HV code, an arbitrary user code may be executed during the process and the interrupt disabled state may be disguised.
図14は、図2に示したエントリコードにおいて、割込み禁止状態が偽装される処理を示した説明図である。図14に示す例では、エントリコードのエントリ部の途中から不正ユーザコードが進入して、プロセッサ101の状態を割込み禁止状態と偽装している。詳細には、不正ユーザコードは“enable interrupt”命令を実行することで、プロセッサ101の割込みを許可する。その後、不正ユーザコードは、“load R0, 偽SR値”命令を実行することで、汎用レジスタ“R0”に偽のSRの値を読み込ませる。その後、エントリコードの命令2にジャンプする。そして、プロセッサ101は、命令2を実行する際、実際には割込み許可状態であるにもかかわらず、割込み禁止を表す偽SR値をCheckAdrに書き込むことになる。これにより、動作モード管理部がCheckAdrの値を参照すると割り込み禁止状態と判断できるので、割込み許可状態でハイパーバイザが実行され、動作モードがHVモードに切り替えられることになる。ここで不正ユーザコードにより割込みが行われると、HVモードのまま不正ユーザコードの割込みハンドラにジャンプしてしまう。
FIG. 14 is an explanatory diagram showing a process for impersonating an interrupt disabled state in the entry code shown in FIG. In the example shown in FIG. 14, an unauthorized user code enters from the middle of the entry part of the entry code, and the state of the
また、図14で示した例では、HVコードのエントリ部を全て行わなくてよいので、不正ユーザコードで割り込まれたとしても、エントリ部の実行時間が短くなる場合が存在する。このため、第1の実施の形態で示した手法は用いることは難しい。 Further, in the example shown in FIG. 14, it is not necessary to perform the entire entry portion of the HV code. Therefore, even when interrupted by an unauthorized user code, the execution time of the entry portion may be shortened. For this reason, it is difficult to use the method shown in the first embodiment.
そこで、本実施の形態にかかる動作モード管理回路1301では、エントリ部の命令が命令順にフェッチされていることを確認して、割り込み禁止状態になっていることを保証することとしている。つまり、本実施の形態にかかる動作モード管理回路1301は、第1通信路を監視しているので、プロセッサ101から保護メモリ107へのフェッチ要求のみならず、メモリ150へのフェッチ要求も監視することができる。つまり、フェッチ要求が、エントリ部に対して命令順に行われていれば、ハイパーバイザコード以外のコードに対してフェッチ要求が行われていないことになる。したがって、動作モード管理回路1301は、他のコードによる割り込みが行われていないことを保証できる。
Therefore, in the operation mode management circuit 1301 according to the present embodiment, it is confirmed that the instructions in the entry section are fetched in the order of instructions, and the interrupt disabled state is guaranteed. That is, since the operation mode management circuit 1301 according to the present embodiment monitors the first communication path, not only the fetch request from the
図13に戻り、動作モード管理回路1301は、第1の実施の形態にかかる動作モード管理回路102とは、フェッチ検出部121と処理が異なるフェッチ検出部1311を備え、フェッチ判断部122と処理が異なるフェッチ判断部1312を備え、時間計測部123と時間判断部125とを削除された点で異なる。
Returning to FIG. 13, the operation mode management circuit 1301 includes a fetch
フェッチ検出部1311は、プロセッサ101とメモリアクセス制御部103と、デバイスアクセス制御部105と、保護メモリ107とを接続する第6通信路を介して、命令フェッチの検出を行う。
The fetch
フェッチ判断部1312は、フェッチ検出部121が検出した命令フェッチが、保護メモリ107のHVコード格納領域112に格納されたHVコードのエントリ部を構成する各命令のアドレスであるか否かを判断する。また、フェッチ判断部1312は、命令フェッチがエントリ部の命令順にフェッチを行っているか否かも判断する。
The fetch
第1HV領域保護回路1302は、第1制御部1321を備え、第1通信路を介してプロセッサ101からのアクセス要求を受け付ける。そして、第1HV領域保護回路1302は、メモリアクセス制御部103、デバイスアクセス制御部105及び保護メモリ107を第2通信路で接続する。また、第1HV領域保護回路1302は、動作モード管理回路1301からモード情報信号が入力される。
The first HV
第1制御部1321は、動作モードがHVモードである旨の入力された場合に、メモリアクセス制御部103及びデバイスアクセス制御部105が有する制御情報、並びに保護メモリ107に対するアクセスを開放する制御を行う。また動作モードが通常モードである旨の入力がされた場合に、メモリアクセス制御部103及びデバイスアクセス制御部105が有する制御情報、並びに保護メモリ107に対するアクセスを禁止する制御を行う。
The
また、システムLSI1300の処理は、システムLSI100の処理と異なる点として、動作モード管理回路1301のフェッチ検出部1311等が、第6通信路を監視して、HVコードのエントリ部が適切に行われたことを確認する処理手順が異なる。そこで、エントリ部が適切に行われたことを確認する処理手順について説明する。
Further, the processing of the
図15に示すように、まず、動作モード管理回路1301は、エントリチェックをするため、変数iに初期値として‘1’を設定する(ステップS1501)。次に、フェッチ検出部1311は、第6通信路を監視して、プロセッサ101から伝送されてくる命令フェッチの要求を検出したか否か判断する(ステップS1502)。なお、当該処理は検出するまで繰り返される。
As shown in FIG. 15, first, the operation mode management circuit 1301 sets ‘1’ as an initial value to a variable i in order to perform an entry check (step S <b> 1501). Next, the fetch
次に、フェッチ判断部1312は、フェッチ検出部1311が命令フェッチの要求を検出した場合(ステップS1502:Yes)、当該命令フェッチの要求で指定されたアドレスがエントリ部のi番目の命令(最初はi=‘1’)のアドレスであるか否か判断する(ステップS1503)。そして、フェッチ判断部1312が、異なると判断した場合(ステップS1503:No)、再び動作モード管理回路1301は、変数iに初期値として‘1’を設定する処理から開始する(ステップS1501)。
Next, when the fetch
そして、フェッチ判断部1312は、アドレスが命令iのアドレスと一致すると判断した場合(ステップS1503:Yes)、動作モード管理回路1301は、変数iに‘1’を追加する(ステップS1504)。そして、動作モード管理回路1301は、変数iが‘2’より大きいか否か判断する(ステップS1505)。つまり、HVコードのエントリ部に含まれている命令の数だけ、上述した処理を繰り返す。
If the fetch
なお、ステップS1505では、本実施の形態にかかるHVコードのエントリ部が2命令で構成されているため、変数iが‘2’より大きいか否か判断している。つまり、エントリ部がn命令で構成されている場合、変数iがnより大きいか否か判断すればよい。 In step S1505, since the entry portion of the HV code according to the present embodiment is composed of two instructions, it is determined whether or not the variable i is larger than “2”. In other words, if the entry part is composed of n instructions, it may be determined whether or not the variable i is larger than n.
動作モード管理回路1301は変数iが‘2’以下と判断した場合(ステップS1505:No)、フェッチ検出部1311がプロセッサ101から伝送されてくる命令フェッチの要求を検出したか否か判断を再び行う(ステップS1502)。
When the operation mode management circuit 1301 determines that the variable i is '2' or less (step S1505: No), the operation mode management circuit 1301 determines again whether or not the fetch
そして、動作モード管理回路1301は変数iが‘2’より大きいと判断した場合(ステップS1505:Yes)、命令検出部124は、第6通信路を監視して、プロセッサ101からのデータ書き込み要求を検出したか否かを判断する(ステップS1506)。検出していないと判断した場合(ステップS1506:No)、書き込み要求を検出するまで処理を繰り返す。
If the operation mode management circuit 1301 determines that the variable i is greater than “2” (step S1505: Yes), the
次に、命令検出部124がデータ書込みの要求を検出した場合(ステップS1506:Yes)、当該データ書き込み要求で指定されたアドレスが‘CheckAdr’と一致するか否か判断する(ステップS1507)。そして、命令検出部124が、異なると判断した場合(ステップS1507:No)、再び動作モード管理回路1301は、変数iに初期値として‘1’を設定する処理から開始する(ステップS1501)。
Next, when the
そして、命令検出部124は、アドレスが‘CheckAdr’と一致すると判断した場合(ステップS1507:Yes)、実行判断部126が書込み要求で指定されたデータと割込み禁止を表す‘SR’の値が一致するか否か判断する(ステップS1508)。そして、実行判断部126が、異なると判断した場合(ステップS1508:No)、再び動作モード管理回路1301は、変数iに初期値として‘1’を設定する処理から開始する(ステップS1501)。
If the
次に、実行判断部126は、書込みデータと割込み禁止を表す‘SR’の値が一致すると判断した場合(ステップS1508:Yes)、HVコードのエントリ部が適切に実行されたことを確認できたものとする。そして、図6に示したステップS613以降の処理が行われることになる。
Next, when the
本実施の形態にかかるシステムLSI1300では、HVコードのエントリ部の命令が順にフェッチされていることを確認することで、他のコードによる割り込みが行われていないことを確認できる。これにより、安全性を確保することができる。
In the
(第3の実施の形態の変形例)
第3の実施の形態では、命令フェッチの確認をループ処理(ステップS1502〜S1505)で行うこととしたが、命令数が少ない場合には上述した命令フェッチの確認のループ処理を展開しても良い。そこで、第3の実施の形態の変形例ではループ処理を展開した例について説明する。
(Modification of the third embodiment)
In the third embodiment, instruction fetch confirmation is performed by loop processing (steps S1502 to S1505). However, when the number of instructions is small, the above-described instruction fetch confirmation loop processing may be developed. . Therefore, in a modification of the third embodiment, an example in which loop processing is developed will be described.
実際にエントリコードをチェックするハードウェア回路を設計する際、エントリコードの命令数が少ない場合は、ループを展開した方が実装が簡潔になる。 When designing the hardware circuit that actually checks the entry code, if the number of instructions in the entry code is small, the implementation is simpler if the loop is expanded.
第3の実施の形態の図15に示した処理手順の命令フェッチの確認のループを、2回の命令フェッチの確認で展開した処理手順が図16である。図16のフローチャートでは、図15と比較して、変数iの演算を行うハードウェアの実装は不要であり、単純な状態遷移回路として設計可能となる。 FIG. 16 shows a processing procedure in which the instruction fetch confirmation loop of the processing procedure shown in FIG. 15 of the third embodiment is expanded by two instruction fetch confirmations. In the flowchart of FIG. 16, compared with FIG. 15, it is not necessary to implement hardware for performing the calculation of the variable i, and it can be designed as a simple state transition circuit.
図16に示すように、フェッチ検出部1311は、第6通信路を監視して、プロセッサ101から伝送されてくる命令フェッチの要求を検出したか否か判断する(ステップS1601)。なお、当該処理は検出するまで繰り返される。
As shown in FIG. 16, the fetch
次に、フェッチ判断部1312は、フェッチ検出部1311が命令フェッチの要求を検出した場合(ステップS1601:Yes)、当該命令フェッチの要求で指定されたアドレスがエントリ部の命令1のアドレスであるか否か判断する(ステップS1602)。そして、フェッチ判断部1312が、異なると判断した場合(ステップS1602:No)、再びフェッチ検出部1311による命令フェッチの要求を検出したか否か判断する処理を行う(ステップS1601)。
Next, when the fetch
そして、フェッチ判断部1312は、アドレスが命令1のアドレスと一致すると判断した場合(ステップS1602:Yes)、フェッチ検出部1311が、第6通信路を監視して、プロセッサ101から伝送されてくる命令フェッチの要求を検出したか否か判断する(ステップS1603)。なお、当該処理は検出するまで繰り返される。
When the fetch
次に、フェッチ判断部1312は、フェッチ検出部1311が命令フェッチの要求を検出した場合(ステップS1603:Yes)、当該命令フェッチの要求で指定されたアドレスがエントリ部の命令2のアドレスであるか否か判断する(ステップS1604)。そして、フェッチ判断部1312が、異なると判断した場合(ステップS1604:No)、再びフェッチ検出部1311による命令フェッチの要求を検出したか否か判断する処理を行う(ステップS1601)。
Next, when the fetch
そして、フェッチ判断部1312は、アドレスが命令2のアドレスと一致すると判断した場合(ステップS1604:Yes)、命令検出部124は、第6通信路を監視して、プロセッサ101からのデータ書き込み要求を検出したか否かを判断する(ステップS1605)。検出していないと判断した場合(ステップS1605:No)、書き込み要求を検出するまで処理を繰り返す。
When the fetch
次に、命令検出部124がデータ書込みの要求を検出した場合(ステップS1605:Yes)、当該データ書き込み要求で指定されたアドレスが‘CheckAdr’と一致するか否か判断する(ステップS1606)。そして、命令検出部124が、異なると判断した場合(ステップS1606:No)、再びフェッチ検出部1311による命令フェッチの要求を検出したか否か判断する処理を行う(ステップS1601)。
Next, when the
そして、命令検出部124は、アドレスが‘CheckAdr’と一致すると判断した場合(ステップS1606:Yes)、実行判断部126が書込み要求で指定されたデータと割込み禁止を表す‘SR’の値が一致するか否か判断する(ステップS1607)。そして、実行判断部126が、異なると判断した場合(ステップS1607:No)、再びフェッチ検出部1311による命令フェッチの要求を検出したか否か判断する処理を行う(ステップS1601)。
If the
次に、実行判断部126は、書込みデータと割込み禁止を表す‘SR’の値が一致すると判断した場合(ステップS1607:Yes)、HVコードのエントリ部が適切に実行されたことを確認できたものとして終了する。そして、図6に示したステップS613以降の処理が行われることになる。
Next, when the
上述した処理手順で行うことでハードウェア回路を簡潔することができる。なお、後述する実施の形態において、命令フェッチの確認をループ処理している場合も、上述したようにループ処理を展開しても良い。 The hardware circuit can be simplified by performing the processing procedure described above. In the embodiment described later, even when instruction fetch confirmation is loop-processed, the loop process may be developed as described above.
(第4の実施の形態)
第4の実施の形態では、第3の実施の形態と同様にHVコードのエントリ部の命令フェッチが命令順に行われていることを確認する。そして、第4の実施の形態は、第3の実施の形態と異なる点としてはHVコードのエントリ部の処理が割り込み禁止するための複数命令で構成された例とする。
(Fourth embodiment)
In the fourth embodiment, as in the third embodiment, it is confirmed that the instruction fetch of the entry part of the HV code is performed in the order of instructions. The fourth embodiment is different from the third embodiment in that the processing of the entry part of the HV code is composed of a plurality of instructions for prohibiting interrupts.
図17は、第4の実施の形態に係るシステムLSI1700の構成を示すブロック図である上述した第3の実施の形態に係るシステムLSI1300とは、動作モード管理回路1301と処理が異なる動作モード管理回路1701を備える点のみ異なる。なお、本実施の形態のシステムLSI1700の構成で、第3の実施の形態のシステムLSI1300と共通な構成については説明を省略する。
FIG. 17 is a block diagram showing the configuration of a
また、本実施の形態で利用されるHVコードは、第2の実施の形態で示したHVコードと同様として説明を省略する。そして、このようなHVコードに対してエントリコードを2命令以上で実装する場合、その処理中に任意のユーザコードを実行されて、割込み禁止状態を偽装されるおそれがある。 The HV code used in the present embodiment is the same as the HV code shown in the second embodiment, and the description thereof is omitted. When an entry code is implemented with two or more instructions for such an HV code, an arbitrary user code may be executed during the process and the interrupt disabled state may be disguised.
動作モード管理回路1701は、第3の実施の形態にかかる動作モード管理回路1301とは、命令検出部124と実行判断部126とを削除された点で異なる。
The operation mode management circuit 1701 is different from the operation mode management circuit 1301 according to the third embodiment in that the
システムLSI1700の処理は、システムLSI1300の処理と異なる点として、動作モード管理回路1701のフェッチ検出部1311等が、第6通信路を監視して、HVコードのエントリ部が適切に行われたことを確認する処理手順が異なる。そこで、エントリ部が適切に行われたことを確認する処理手順について説明する。
The processing of the
図18のステップS1801〜S1805までの処理は、図15のステップS1501〜S1805までの処理と同様として説明を省略する。そして、ステップS1805まで処理が行われた場合に終了する。つまり、図18で示した処理手順は、図15のステップS1805以降に行われるデータの書き込み検出及び割り込み禁止状態であるか否かの確認する処理が不要となる。 The processes from Steps S1801 to S1805 in FIG. 18 are the same as the processes from Steps S1501 to S1805 in FIG. Then, the process ends when the processing is performed up to step S1805. In other words, the processing procedure shown in FIG. 18 does not require processing for detecting data writing and checking whether or not an interrupt is disabled after step S1805 in FIG.
つまり、本実施の形態では、命令1、2の順にアドレスがフェッチされた以上、プロセッサ101がこれら命令を実行することで、プロセッサ101は書き込み禁止状態となる。これにより、プロセッサ101が書き込み禁止状態になることが保証される。また、エントリ部の複数命令が不可分に行われていることを保証できる。これにより、安全性を確保することができる。
In other words, in the present embodiment, as long as the addresses are fetched in the order of the
(第5の実施の形態)
第5の実施の形態では、第1の実施の形態で示した時間計測による割り込み防止と、第3の実施の形態で示したHVコードのエントリ部の命令フェッチが順に行われていることを検出する例とする。また、本実施の形態にかかるHVコードは、割り込み禁止状態であることを確認するエントリ部を有する図3で示したコードとする。
(Fifth embodiment)
In the fifth embodiment, it is detected that the interrupt prevention by the time measurement shown in the first embodiment and the instruction fetch of the entry part of the HV code shown in the third embodiment are sequentially performed. Let's take an example. The HV code according to the present embodiment is the code shown in FIG. 3 having an entry part for confirming that the interrupt is prohibited.
図19は、第5の実施の形態に係るシステムLSI1900の構成を示すブロック図である。上述した第1の実施の形態に係るシステムLSI100とは、動作モード管理回路102と処理が異なる動作モード管理回路1901を備え、HVコード格納領域112と格納しているHVコードが異なるHVコード格納領域1902を備えている点のみ異なる。また、なお、本実施の形態のシステムLSI1900の構成で、第1の実施の形態のシステムLSI100と共通な構成については説明を省略する。
FIG. 19 is a block diagram showing a configuration of a system LSI 1900 according to the fifth embodiment. The
HVコード格納領域1902は、図3に示したHVコードを格納している。図3に示すように、HVコードのエントリ部は、n個の命令で構成され、プロセッサ101が割り込み禁止状態であるか否かを確認している。
The HV
本実施の形態にかかるシステムLSI1900において、複数の割り込み防止を組み合わせたのは、エントリコードの命令数が大きい場合、例えば第1の実施の形態で示したようなエントリ部の実行時間を測定するだけでは、割込み禁止の状態を偽装される可能性がある。 In the system LSI 1900 according to the present embodiment, the combination of a plurality of interrupt preventions is only to measure the execution time of the entry unit as shown in the first embodiment, for example, when the number of instructions in the entry code is large. Then, there is a possibility that the interrupt disabled state is disguised.
図20に示すHVコードのエントリ部では、n個の命令を実行することで、SRが保持する値を、アドレス“CheckAdr”に書き込んでいる。 In the entry part of the HV code shown in FIG. 20, the value held by the SR is written to the address “CheckAdr” by executing n instructions.
これに対して、不正ユーザコードは、まず、汎用レジスタR2に偽のSRの値を書き込み、R3にCheckAdrの即値を読み込み、割込みを許可した後、エントリコードの命令1にジャンプする。そして、この命令1の実行後に何らかの割込みを発生させ、不正ユーザコードの割込みハンドラにジャンプし、R2の値をR3をベースレジスタとして“CheckAdr”に書き込んでいる。
On the other hand, the unauthorized user code first writes a false SR value into the general register R2, reads the immediate value of CheckAdr into R3, permits an interrupt, and then jumps to the
つまり、この不正ユーザコードは、HVコードのエントリ部の呼出し前に汎用レジスタに予め不正な値を設定した上で、1)命令1の実行、2)割込み発生、3)偽SRの値をCheckAdrへ書込みという3個の処理によって、割り込み禁止状態の偽装を実現している。これら3個の処理の実行時間は、HVコードのエントリ部のn個の命令の実行時間より小さいため、時間の計測のみでは不正な割り込みを検出することができない。
In other words, the illegal user code sets an illegal value in the general-purpose register in advance before calling the entry part of the HV code, and 1) executes the
さらに第5の実施形態にかかるシステムLSI1900は、第3の実施形態にかかるシステムLSI1300とは通信路の構成が異なるので、全ての命令フェッチを検出することができない。つまり、システムLSI1900では、HVコードのエントリ部が命令順にフェッチされるときに、不正ユーザコードの命令もフェッチしている可能性がある。
Furthermore, since the system LSI 1900 according to the fifth embodiment has a different communication path configuration from the
そこで、第5の実施の形態にかかるシステムLSI1900の動作モード管理回路1901では、第1の実施の形態で示した時間計測と、第3の実施の形態で示したHVコードのエントリ部の命令フェッチが順に行われていることの検出とを行うこととした。
Therefore, in the operation
図19に戻り、動作モード管理回路1901は、第1の実施の形態にかかる動作モード管理回路102とは、フェッチ検出部121と処理が異なるフェッチ検出部1311を備え、フェッチ判断部122と処理が異なるフェッチ判断部1312を備えた点で異なる。フェッチ検出部1311及びフェッチ判断部1312は、第3の実施の形態で示したので説明を省略する。
Returning to FIG. 19, the operation
また、システムLSI1900の処理は、システムLSI100の処理と異なる点として、動作モード管理回路1901のフェッチ検出部1311等が、第1通信路を監視して、HVコードのエントリ部が適切に行われたことを確認する処理手順が異なる。そこで、エントリ部が適切に行われたことを確認する処理手順について説明する。
Further, the processing of the system LSI 1900 differs from the processing of the
図21に示すように、まず、フェッチ検出部1311は、第1通信路を監視して、プロセッサ101から伝送されてくる命令フェッチの要求を検出したか否か判断する(ステップS2101)。なお、当該処理は検出するまで繰り返される。
As shown in FIG. 21, first, the fetch
次に、フェッチ判断部1312は、フェッチ検出部1311が命令フェッチの要求を検出した場合(ステップS2101:Yes)、当該命令フェッチの要求で指定されたアドレスがエントリ部の命令1のアドレスであるか否か判断する(ステップS2102)。そして、フェッチ判断部1312が、異なると判断した場合(ステップS2102:No)、再びフェッチ検出部1311による命令フェッチの検出を行う(ステップS2101)。
Next, when the fetch
そして、フェッチ検出部1311は、アドレスが命令1と一致すると判断した場合(ステップS2102:Yes)、時間計測部123が時間の計測を開始する(ステップS2103)。
When the fetch
次に、動作モード管理回路1901は、エントリチェックをするため、変数iに初期値として‘2’を設定する(ステップS2104)。
Next, the operation
次に、時間判断部125が、時間の計測を開始してから所定時間Tを経過したか否か判断する(ステップS2105)。なお、所定時間Tは、命令1のフェッチを検出してから命令nが実行されるまでに要するものとして予め設定された時間とする。
Next, the
また、時間判断部125により所定時間Tを経過したと判断された場合(ステップS2105:No)、時間計測部123は時間計測を終了し(ステップS2110)、再びフェッチ検出部1311による命令フェッチの検出を行う(ステップS2101)。
If the
そして、時間判断部125により所定時間Tを経過していないと判断された場合(ステップS2105:Yes)、次に、フェッチ検出部1311は、第1通信路を監視して、プロセッサ101から伝送されてくる命令フェッチの要求を検出したか否か判断する(ステップS2106)。なお、当該処理は検出するまで繰り返される。
If it is determined by the
次に、フェッチ判断部1312は、フェッチ検出部1311が命令フェッチの要求を検出した場合(ステップS2106:Yes)、当該命令フェッチの要求で指定されたアドレスがエントリ部のi番目の命令のアドレスであるか否か判断する(ステップS2107)。そして、フェッチ判断部1312が、異なると判断した場合(ステップS2107:No)、再びフェッチ検出部1311による命令フェッチの検出を行う(ステップS2101)。
Next, when the fetch
そして、フェッチ判断部1312は、アドレスが命令iのアドレスと一致すると判断した場合(ステップS2107:Yes)、動作モード管理回路1901は、変数iに‘1’を追加する(ステップS2108)。そして、動作モード管理回路1901は、変数iがnより大きいか否か判断する(ステップS2109)。つまり、HVコードのエントリ部に含まれている命令の数nだけ、上述した処理を繰り返す。
If the fetch
動作モード管理回路1901は変数iがn以下と判断した場合(ステップS2109:No)、時間判断部125が、時間の計測を開始してから所定時間Tを経過したか否か判断する処理から再び行う(ステップS2105)。
When the operation
次に、動作モード管理回路1901は変数iがnより大きいと判断した場合(ステップS2109:Yes)、時間判断部125が、時間の計測を開始してから所定時間Tを経過したか否か判断する(ステップS2111)。
Next, when the operation
そして、時間判断部125により所定時間Tを経過したと判断された場合(ステップS2111:No)、時間計測部123は時間計測を終了し(ステップS2110)、再びフェッチ検出部1311による命令フェッチの検出を行う(ステップS2101)。
When the
また、時間判断部125により所定時間Tを経過していないと判断された場合(ステップS2111:Yes)、命令検出部124は、第1通信路を監視して、プロセッサ101からのデータ書き込み要求を検出したか否かを判断する(ステップS2112)。検出していないと判断した場合(ステップS2112:No)、時間判断部125が所定時間Tを経過したか否かの判断から処理を開始する(ステップS2111)。
If the
次に、命令検出部124がデータ書込みの要求を検出した場合(ステップS2112:Yes)、時間計測部123が時間計測を終了する(ステップS2113)。そして、命令検出部124が当該データ書き込み要求で指定されたアドレスが‘CheckAdr’と一致するか否か判断する(ステップS2114)。そして、命令検出部124が、異なると判断した場合(ステップS2114:No)、再びフェッチ検出部121による命令フェッチの検出を行う(ステップS2101)。
Next, when the
そして、命令検出部124は、アドレスが‘CheckAdr’と一致すると判断した場合(ステップS2114:Yes)、実行判断部126が書込み要求で指定されたデータと割込み禁止を表す‘SR’の値が一致するか否か判断する(ステップS2115)。そして、実行判断部126が、異なると判断した場合(ステップS2115:No)、再びフェッチ検出部121による命令フェッチの検出を行う(ステップS2101)。
If the
次に、実行判断部126は、書込みデータと割込み禁止を表す‘SR’の値が一致すると判断した場合(ステップS2115:Yes)、HVコードのエントリ部が適切に実行されたことを確認できたものとする。そして、図6に示したステップS613以降の処理が行われることになる。
Next, when the
上述した実施の形態のシステムLSI1900によれば、時間計測による割り込み防止と、第3の実施の形態で示したHVコードのエントリ部の命令フェッチが順に行われていることを検出する処理とを組み合わせることとした。これにより、HVコードのエントリ部の命令が多い場合に、短時間で処理が行われたために時間計測のみでは検出できないという不正な割り込みを検出することができる。これにより、安全性が向上する。 According to the system LSI 1900 of the above-described embodiment, the interrupt prevention by time measurement is combined with the process of detecting that the instruction fetch of the entry part of the HV code shown in the third embodiment is sequentially performed. It was decided. As a result, when there are many instructions in the entry portion of the HV code, it is possible to detect an illegal interrupt that cannot be detected only by time measurement because the processing is performed in a short time. Thereby, safety is improved.
(第6の実施の形態)
第6の実施の形態では、第1の実施の形態で示した時間計測による割り込み防止と、第3の実施の形態で示したHVコードのエントリ部の命令フェッチが順に行われていることを検出する例とする。また、本実施の形態にかかるHVコードは、割り込み禁止状態を設定するエントリ部を有する図11で示したコードとする。
(Sixth embodiment)
In the sixth embodiment, it is detected that the interruption prevention by the time measurement shown in the first embodiment and the instruction fetch of the entry part of the HV code shown in the third embodiment are sequentially performed. Let's take an example. Further, the HV code according to the present embodiment is the code shown in FIG. 11 having an entry part for setting the interrupt disabled state.
図22は、第6の実施の形態に係るシステムLSI2200の構成を示すブロック図である上述した第2の実施の形態に係るシステムLSI900とは、動作モード管理回路901と処理が異なる動作モード管理回路2201を備え、HVコード格納領域911と格納しているHVコードが異なるHVコード格納領域2202を備えている点が異なる。なお、本実施の形態のシステムLSI2200の構成で、第2の実施の形態のシステムLSI900と共通な構成については説明を省略する。
FIG. 22 is a block diagram showing a configuration of a
HVコード格納領域2202は、図11に示したHVコードを格納している。図11に示すように、HVコードのエントリ部は、n個の命令で構成され、プロセッサ101が割り込み禁止状態に設定している。
The HV
動作モード管理回路2201は、第2の実施の形態にかかる動作モード管理回路901とは、フェッチ検出部121と処理が異なるフェッチ検出部1311を備え、フェッチ判断部921と処理が異なるフェッチ判断部1312を備えた点で異なる。なお、フェッチ検出部1311及びフェッチ判断部1312は、第3の実施の形態で示したので説明を省略する。
The operation mode management circuit 2201 includes a fetch
図23のステップS2301〜S2310までの処理は、図21のステップS2101〜S2110までの処理と同様として説明を省略する。そして、ステップS2309で変数iがエントリ部の命令数nより大きくなった場合に(ステップS2309:Yes)、すべての命令のフェッチを検出したとして、時間計測部123が時間計測を終了して(ステップS2311)、処理を終了する。つまり、図23で示した処理手順は、図21のステップS2111以降に行われるデータの書き込み検出及び割り込み禁止状態であるか否かの確認する処理が不要となる。
The processing from step S2301 to S2310 in FIG. 23 is the same as the processing from step S2101 to S2110 in FIG. Then, when the variable i becomes larger than the number of instructions n in the entry part in step S2309 (step S2309: Yes), the
つまり、本実施の形態では、n個の命令が命令順にアドレスがフェッチされた以上、プロセッサ101がこれら命令を実行することで、プロセッサ101は書き込み禁止状態となる。これにより、プロセッサ101が書き込み禁止状態になることが保証される。また、エントリ部の複数命令が不可分に行われていることを保証できる。これにより、安全性を確保することができる。
In other words, in the present embodiment, since the addresses of n instructions are fetched in the order of instructions, the
上述した実施の形態のシステムLSI2200によれば、時間計測による割り込み防止と、第3の実施の形態で示したHVコードのエントリ部の命令フェッチが順に行われていることを検出する処理とを組み合わせることとした。これにより、HVコードのエントリ部の命令が多い場合に、短時間で処理が行われたために時間計測のみでは検出できないという不正な割り込みを検出することができる。これにより、安全性が向上する。
According to the
(変形例)
また、上述した各実施の形態に限定されるものではなく、以下に例示するような種々の変形が可能である。
(Modification)
Moreover, it is not limited to each embodiment mentioned above, The various deformation | transformation which is illustrated below is possible.
(変形例1)
上述した第1〜6の実施の形態では、プロセッサ101の命令フェッチ単位が1命令毎の場合について説明した。しかしながら、上述した実施の形態は、命令フェッチ単位を1命令毎に制限するものではない。そこで、本変形例では2命令毎の例について説明する。
(Modification 1)
In the first to sixth embodiments described above, the case where the instruction fetch unit of the
本変形例にかかるシステムLSIでは、プロセッサが2命令毎に命令フェッチを行う。そして、命令フェッチの際にプロセッサが割り込み禁止状態であるか否かの確認手法は、上述した実施の形態と同様とする。 In the system LSI according to this modification, the processor fetches an instruction every two instructions. A method for confirming whether or not the processor is in an interrupt disabled state at the time of instruction fetch is the same as that in the above-described embodiment.
そして、命令フェッチ単位が複数命令の場合、HVコードのエントリ部における命令の配置によっては割込み禁止状態を偽装される可能性がある。そこで、HVコードのエントリ部で割り込み禁止状態が偽装される命令の配置について説明する。 When the instruction fetch unit is a plurality of instructions, there is a possibility that the interrupt disabled state is disguised depending on the arrangement of instructions in the entry part of the HV code. Therefore, the arrangement of instructions in which the interrupt disabled state is impersonated in the entry part of the HV code will be described.
図24に示した例では、HVコードのエントリ部が2命令の場合とする。そして、プロセッサの命令フェッチ単位の2命令毎とする。そして、エントリ部の命令1が命令フェッチ単位のアドレス境界に配置された場合、一回の命令フェッチでエントリ部の2命令が同時に読み出される。
In the example shown in FIG. 24, it is assumed that the entry part of the HV code is 2 instructions. Then, every two instructions in the instruction fetch unit of the processor. When the
そのため、第3、第4の実施の形態で示したような命令フェッチの確認を行った場合、命令フェッチの確認を1度しか行わない。この場合、次に示すような割込み禁止状態の偽装が考えられる。 For this reason, when instruction fetch confirmation as shown in the third and fourth embodiments is performed, instruction fetch confirmation is performed only once. In this case, the following disguise of interrupt disabled state can be considered.
図24に示すように、不正ユーザコードは、まずR0に偽のSRの値を読み込んだあと、割込みを許可する。その後、エントリ部の命令2にジャンプする。この時、命令フェッチは2命令単位で発生するため、命令1のアドレスに対して命令フェッチが発生する。そのため、動作モード管理回路が、正しくHVコードのエントリ部が呼び出されたと判断することになる。にもかかわらず、エントリ部の命令2は、割込み許可状態であるにもかかわらず、割込み禁止を表す偽SR値を、アドレス“CheckAdr”に書き込むことになる。
As shown in FIG. 24, the unauthorized user code first reads a fake SR value into R0 and then permits an interrupt. Thereafter, the process jumps to
これによりHVコードが割込み許可のまま実行される。そして、不正ユーザコードにより割込みが発生すると、動作モードがHVモードの状態で、不正ユーザコードの割込みハンドラにジャンプしてしまう。 As a result, the HV code is executed with the interrupt permitted. When an interrupt occurs due to an unauthorized user code, the operation mode is in the HV mode, and the routine jumps to an unauthorized user code interrupt handler.
そこで本変形例におけるシステムLSIのHVコード格納領域に以下に示すHVコードを格納することとした。 Therefore, the following HV codes are stored in the HV code storage area of the system LSI in this modification.
つまり、HVコードをHVコード格納領域に格納する際、上述した偽装を防ぐために、本来のエントリ部の先頭命令を、最初の命令フェッチ単位の最後に配置することとした。 In other words, when the HV code is stored in the HV code storage area, the head instruction of the original entry part is arranged at the end of the first instruction fetch unit in order to prevent the above-mentioned impersonation.
図25に示したHVコードでは、エントリ部に命令1、命令3を2命令境界に配置した。これにより、プロセッサからのフェッチ要求では、命令1と命令2、命令3と命令4がそれぞれ同時にフェッチされる。
In the HV code shown in FIG. 25,
そして、上述した偽装を防ぐために、本来のエントリ部の最初の命令であるmove命令は、最初の命令フェッチ単位の最後、つまり2命令目に配置される。そして、エントリ部の2番目の命令であるstore命令は、2番目の命令フェッチ単位の最初、つまり3命令目に配置される。これにより、不正ユーザコードが、上述した偽装を行おうとした場合、命令フェッチ単位1のフェッチ要求がなされず、命令フェッチ単位2がフェッチ要求なされることになり、動作モード管理回路は異常なフェッチ要求が行われたと判断することができる。
In order to prevent the above-mentioned impersonation, the move instruction which is the first instruction of the original entry part is arranged at the end of the first instruction fetch unit, that is, at the second instruction. The store instruction, which is the second instruction in the entry section, is arranged at the beginning of the second instruction fetch unit, that is, at the third instruction. As a result, when an unauthorized user code tries to perform the above-mentioned disguise, the fetch request for instruction fetch
また、命令フェッチ単位の命令数が複数命令の場合にも、上述した実施の形態で説明した処理は、ほぼそのまま適用可能である。 Further, even when the number of instructions in the instruction fetch unit is a plurality of instructions, the processing described in the above embodiment can be applied almost as it is.
そして、上述した実施の形態において、命令(例えばn個の命令)を命令フェッチ単位(例えばn個の命令フェッチ単位)に置き換え、変数iがエントリ部における何番目の命令としていたのを何番目の命令フェッチ単位に置き換え、命令のアドレスを命令フェッチ単位の先頭アドレスと置き換えることで、命令フェッチ単位の命令数が複数命令に対応できる。 In the above-described embodiment, an instruction (for example, n instructions) is replaced with an instruction fetch unit (for example, n instruction fetch units), and what number instruction the variable i has been set to in the entry part. By replacing with the instruction fetch unit and replacing the instruction address with the head address of the instruction fetch unit, the number of instructions in the instruction fetch unit can correspond to a plurality of instructions.
(変形例2)
上述した第1〜6の実施の形態では、プロセッサ101がプリフェッチ機能を有しない場合について説明した。しかしながら、上述した実施の形態は、プロセッサにプリフェッチ機能を有していない場合に制限するものではない。そこで、本変形例ではプリフェッチ機能を有する場合について説明する。
(Modification 2)
In the first to sixth embodiments described above, the case where the
システムLSIの備えられたプロセッサが命令のプリフェッチ機能を持つ場合、ある命令の実行中に、それ以降の命令の命令フェッチが行われる。そのため、ある命令に対する命令フェッチを検出したとしても、その命令が必ず実行されるとは限らない。 When the processor provided with the system LSI has an instruction prefetch function, instruction fetch of the subsequent instructions is performed during execution of a certain instruction. Therefore, even if an instruction fetch for an instruction is detected, the instruction is not always executed.
図2に示したHVコードのエントリ部では、命令2でSRの値をCheckAdrに書き込むことにより、割込み禁止状態であることを保証している。しかしながら、プロセッサが命令のプリフェッチ機能を持つ場合には、命令1の実行中に既に命令2がプリフェッチされてしまう。
In the entry portion of the HV code shown in FIG. 2, the SR value is written to CheckAdr by the
このような場合に対応するために、エントリ部の割込み禁止を保証する最終の命令(以下、保証命令と呼ぶ)までが正しく実行された時に、プリフェッチにより命令フェッチ要求が行われる命令の範囲をあらかじめ調べておき、エントリ部の命令フェッチの確認を行う際には、それらのプリフェッチ範囲も含めて命令フェッチを確認すればよい。 In order to cope with such a case, when the instruction up to the last instruction (hereinafter referred to as a guaranteed instruction) that guarantees prohibition of interrupt in the entry portion is correctly executed, the range of instructions for which an instruction fetch request is made by prefetching is determined in advance. It is sufficient to check the instruction fetch including the prefetch range when checking the instruction fetch in the entry part.
図26に示すように、命令2以降は、フェッチが行われた後、少し時間が経過してから実行が行われる。そして、エントリ部が2命令を実行する必要がある場合、2番目の命令が実行されている時に行われる命令フェッチも確認すればよい。図26に示した例では、命令4の命令フェッチを確認することで、命令2の命令の実行が保証される。
As shown in FIG. 26, the
そこで、上述した実施の形態で行った処理を、プリフェッチ機能付のプロセッサに対応させるには、HVコードのエントリ部に含まれている保証命令までの命令に加え、上記のプリフェッチ範囲の命令もエントリ部に含める必要がある。 Therefore, in order to make the processing performed in the above-described embodiment correspond to a processor with a prefetch function, in addition to the instructions up to the guarantee instruction included in the entry part of the HV code, the instructions in the prefetch range are also entered. It is necessary to include in the department.
まず、命令フェッチ単位の命令数=1の場合にプリフェッチ機能に対応する方法について説明する。図27に示すHVコードは、図3に示したHVコードと同様に、本来は2命令で割込み禁止状態をチェックするエントリ部を有する。 First, a method corresponding to the prefetch function when the number of instructions per instruction fetch unit = 1 is described. Like the HV code shown in FIG. 3, the HV code shown in FIG. 27 originally has an entry part for checking the interrupt disabled state with two instructions.
図27に示した例では、本来のエントリ部である命令1、命令2のフェッチ要求が行われた後、命令2が実行されることでアドレス‘CheckAdr’に書き込みが行われるまでに、以降の命令nまでがプリフェッチされる。なお、命令nの数は、プロセッサの性能に依存する。そこで、図27に示した例では、命令nまでnop命令(何もしない命令9を配置することとした。
In the example shown in FIG. 27, after the fetch request for the
なお、本変形例では、プリフェッチされる範囲に、説明のためにnop命令(何もしない命令)を配置してあるが、HVの処理コード本体を配置してもよい。 In this modification, a nop instruction (an instruction that does nothing) is arranged in the prefetched range for explanation, but an HV processing code body may be arranged.
つまり、本変形例において第1、第3又は第5の実施の形態で示した処理を適用する場合は、プリフェッチされる命令nは、命令1の実行時には未だプリフェッチされず、命令2の実行開始から‘CheckAdr’へのデータ書込みまでにプリフェッチされる命令であることが望ましい。
That is, when the processing shown in the first, third, or fifth embodiment is applied in this modification, the prefetched instruction n is not yet prefetched when the
なお、本変形例のHVコードと異なるが、第2、第4又は第6の実施の形態で示した処理に適用する場合は、命令2の実行中にプリフェッチされる命令であることが望ましい。
Although different from the HV code of this modification, when applied to the processing shown in the second, fourth, or sixth embodiment, it is desirable that the instruction be prefetched during the execution of the
このように、プリフェッチ範囲までを含めてHVコードのエントリ部に命令を備えることで、上述した実施の形態で示した処理手順を、プリフェッチ機能を有するプロセッサを備えるシステムLSIに適用できる。 In this way, by providing instructions in the entry portion of the HV code including the prefetch range, the processing procedure described in the above-described embodiment can be applied to a system LSI including a processor having a prefetch function.
同様に、命令フェッチ単位の命令数が複数の場合についても、プリフェッチ機能を持つプロセッサに対応することができる。 Similarly, even when the number of instructions per instruction fetch is plural, it is possible to deal with a processor having a prefetch function.
図28に示すHVコードは、図25と同様に、命令フェッチ単位が2命令毎に対応するエントリ部を有している。図28に示す例では、本来のエントリコードである命令2、命令3のフェッチ要求が行われ、命令3が実行されることでアドレス‘CheckAdr’への書き込みが行われるまで、命令5および命令6がプリフェッチされる例である。
As in FIG. 25, the HV code shown in FIG. 28 has an entry portion in which the instruction fetch unit corresponds to every two instructions. In the example shown in FIG. 28, instructions 5 and 6 are fetched until a fetch request is made for
上述したように、プリフェッチされる範囲までを含めてエントリ部を構成することで、上述した実施の形態で示した処理手順を、プリフェチ機能を有するプロセッサを備えたシステムLSIに適用できる。 As described above, by configuring the entry part including the prefetch range, the processing procedure described in the above embodiment can be applied to a system LSI including a processor having a prefetch function.
100、900、1300、1700、1900、2200 システムLSI
101 プロセッサ
102、901、1301、1701、1901、2201 動作モード管理回路
103 メモリアクセス制御部
104、1302 第1HV領域保護回路
105 デバイスアクセス制御部
106 第2HV領域保護回路
107 保護メモリ
112、911、1902、2202 HVコード格納領域
121、1311 フェッチ検出部
122、921、1312 フェッチ判断部
123 時間計測部
124 命令検出部
125、922 時間判断部
126 実行判断部
127 モード切替部
131、1321 第1制御部
132 第2制御部
150 メモリ
151 第1のゲストOS格納領域
152 第2のゲストOS格納領域
153 第3のゲストOS格納領域
154 第1メモリ領域
155 第2メモリ領域
156 第3メモリ領域
160 デバイス
100, 900, 1300, 1700, 1900, 2200 System LSI
101
Claims (7)
第1のアクセス範囲へ前記プロセッサをアクセスさせる特権ソフトウェアを記憶する第1の記憶部と、
前記第1のアクセス範囲よりも狭い第2のアクセス範囲へ前記プロセッサをアクセスさせるソフトウェアを記憶する第2の記憶部と、
前記第1の記憶部と前記プロセッサとを接続し、前記特権ソフトウェアを前記プロセッサで実行するために必要なデータの通信を行う通信路と、
前記プロセッサが前記通信路を介して、前記特権ソフトウェアに含まれる命令であって当該特権ソフトウェアを起動させる際に実行される複数の命令のうち、最初の命令が格納された格納アドレスへのフェッチを検出するフェッチ検出手段と、
前記プロセッサが前記通信路を介して、前記プロセッサにより前記複数の命令のうちの特定の命令が実行されたことを検出する検出手段と、
前記プロセッサが前記ソフトウェアを実行しているときに前記フェッチ検出手段により前記格納アドレスへのフェッチを検出してから、前記検出手段が前記特定の命令が実行されたことを検出するまでに、所定の時間が経過したか否かを判断する時間判断手段と、
前記所定の時間が経過していないと判断した場合に、前記プロセッサが前記特定の命令を実行した結果から、前記プロセッサへの割り込みを禁止しているか否かを判断する判断手段と、
前記実行判断手段が前記プロセッサへの割り込みを禁止していると判断した場合に、前記プロセッサに対して前記第1のアクセス範囲のアクセスを開放する制御手段と、
を備えることを特徴とする情報処理装置。 A processor;
A first storage unit for storing privileged software that allows the processor to access a first access range;
A second storage unit that stores software that causes the processor to access a second access range that is narrower than the first access range;
A communication path for connecting the first storage unit and the processor and performing communication of data necessary for executing the privileged software on the processor;
Of the plurality of instructions executed when the processor starts up the privileged software that is included in the privileged software via the communication path, the processor fetches the first instruction to the storage address. Fetch detection means for detecting;
Detecting means for detecting that a specific instruction of the plurality of instructions is executed by the processor via the communication path;
When the processor is executing the software, the fetch detection unit detects a fetch to the storage address, and the detection unit detects that the specific instruction has been executed. Time determination means for determining whether time has elapsed,
A determination means for determining whether or not interrupting to the processor is prohibited from a result of the processor executing the specific instruction when it is determined that the predetermined time has not elapsed;
Control means for releasing the access in the first access range to the processor when the execution determining means determines that the interrupt to the processor is prohibited;
An information processing apparatus comprising:
前記フェッチ検出手段は、前記格納アドレスとして、前記最初の命令を含む複数単位で命令の先頭アドレスのフェッチを検出すること、
を特徴とする請求項1に記載の情報処理装置。 The processor fetches instructions in a plurality of units,
The fetch detecting means detects a fetch of a head address of an instruction in a plurality of units including the first instruction as the storage address;
The information processing apparatus according to claim 1.
を特徴とする請求項2に記載の情報処理装置。 The first storage unit arranges a first instruction among the plurality of instructions at a tail end of a plurality of instructions fetched by the processor;
The information processing apparatus according to claim 2.
前記記憶部は、前記プロセッサが書き込み禁止状態であることを確認する命令を実行しているタイミングで前記プロセッサのフェッチ対象が存在する数で、前記複数の命令を構成すること、
を特徴とする請求項1に記載の情報処理装置。 The processor has a prefetch function for fetching instructions in advance before execution,
The storage unit constitutes the plurality of instructions by the number of fetch targets of the processor at a timing at which an instruction for confirming that the processor is in a write-protected state is executed;
The information processing apparatus according to claim 1.
第1のアクセス範囲へ前記プロセッサをアクセスさせる特権ソフトウェアを記憶する第1の記憶部と、
前記第1のアクセス範囲よりも狭い第2のアクセス範囲へ前記プロセッサをアクセスさせるソフトウェアを記憶する第2の記憶部と、
前記第1の記憶部と前記プロセッサとを接続し、前記特権ソフトウェアを前記プロセッサで実行するために必要なデータの通信を行う通信路と、
前記プロセッサが前記通信路を介して、前記特権ソフトウェアに含まれる命令であって当該特権ソフトウェアを起動させる際に実行される複数の命令のうち、最初の命令が格納された第1格納アドレスへのフェッチを検出する第1フェッチ検出手段と、
前記プロセッサが前記通信路を介して、前記第1の記憶部に記憶される前記特権ソフトウェアに含まれる前記複数の命令のうち特定の命令が格納された第2格納アドレスへのフェッチを検出する第2フェッチ検出手段と、
前記プロセッサが前記ソフトウェアを実行しているときに前記第1フェッチ検出手段により前記第1格納アドレスへのフェッチを検出してから、前記第2フェッチ検出手段により前記第2格納アドレスへのフェッチを検出するまでに、所定の時間が経過したか否かを判断する時間判断手段と、
前記所定の時間が経過していないと判断した場合に、前記プロセッサに対して前記第1のアクセス範囲のアクセスを開放する制御手段と、
を備えることを特徴とする情報処理装置。 A processor;
A first storage unit for storing privileged software that allows the processor to access a first access range;
A second storage unit that stores software that causes the processor to access a second access range that is narrower than the first access range;
A communication path for connecting the first storage unit and the processor and performing communication of data necessary for executing the privileged software on the processor;
Of the plurality of instructions that are executed when the processor starts up the privileged software that is included in the privileged software via the communication path, the first storage address storing the first instruction is stored. First fetch detection means for detecting a fetch;
The processor detects a fetch to a second storage address storing a specific instruction among the plurality of instructions included in the privileged software stored in the first storage unit via the communication path. Two fetch detection means;
When the processor is executing the software, the first fetch detection means detects a fetch to the first storage address, and then the second fetch detection means detects a fetch to the second storage address. Time determination means for determining whether or not a predetermined time has elapsed before
Control means for releasing access of the first access range to the processor when it is determined that the predetermined time has not elapsed;
An information processing apparatus comprising:
第1のアクセス範囲へ前記プロセッサをアクセスさせる特権ソフトウェアを記憶する第1の記憶部と、
前記第1のアクセス範囲よりも狭い第2のアクセス範囲へ前記プロセッサをアクセスさせるソフトウェアを記憶する第2の記憶部と、
前記第1の記憶部と前記プロセッサとを接続し、前記特権ソフトウェアを前記プロセッサで実行するために必要なデータの通信を行う通信路と、
前記プロセッサが前記通信路を介して、前記特権ソフトウェアに含まれる命令であって当該特権ソフトウェアを起動させる際に実行される複数の命令へのフェッチを検出するフェッチ検出手段と、
前記プロセッサが前記ソフトウェアを実行しているときに、検出したフェッチ先のアドレスから、前記複数の命令を構成する各命令が格納された格納アドレスへのフェッチが、命令順に行われているか否かを判断するフェッチ判断手段と、
前記複数の命令のフェッチが命令順に行われたと判断した場合に、前記プロセッサにより前記複数の命令うちの特定の命令が実行されたことを検出する検出手段と、
検出した前記複数の命令の実行結果から、前記プロセッサへの割り込み禁止されているか否かを判断する判断手段と、
割り込み禁止されていると判断した場合に、前記プロセッサに対して前記第1のアクセス範囲のアクセスを開放する制御手段と、
を備えることを特徴とする情報処理装置。 A processor;
A first storage unit for storing privileged software that allows the processor to access a first access range;
A second storage unit that stores software that causes the processor to access a second access range that is narrower than the first access range;
A communication path for connecting the first storage unit and the processor and performing communication of data necessary for executing the privileged software on the processor;
Fetch detection means for detecting fetches to a plurality of instructions executed when the processor starts up the privileged software, which is an instruction included in the privileged software, via the communication path;
Whether or not the fetch from the detected fetch destination address to the storage address storing each instruction constituting the plurality of instructions is performed in the order of instructions when the processor is executing the software Fetch determination means for determining;
Detecting means for detecting that a specific instruction of the plurality of instructions is executed by the processor when it is determined that the plurality of instructions are fetched in the order of instructions;
Determination means for determining whether or not an interrupt to the processor is prohibited from the detected execution results of the plurality of instructions;
Control means for releasing access in the first access range to the processor when it is determined that interrupts are prohibited;
An information processing apparatus comprising:
第1のアクセス範囲へ前記プロセッサをアクセスさせる特権ソフトウェアを記憶する第1の記憶部と、
前記第1のアクセス範囲よりも狭い第2のアクセス範囲へ前記プロセッサをアクセスさせるソフトウェアを記憶する第2の記憶部と、
前記第1の記憶部と前記プロセッサとを接続し、前記特権ソフトウェアを前記プロセッサで実行するために必要なデータの通信を行う通信路と、
前記プロセッサが前記通信路を介して、前記特権ソフトウェアに含まれる命令であって当該特権ソフトウェアを起動させる際に実行される複数の命令へのフェッチを検出するフェッチ検出手段と、
前記プロセッサが前記ソフトウェアを実行しているときに、検出したフェッチ先のアドレスから、前記複数の命令を構成する各命令が格納された格納アドレスへのフェッチが行われているか否かを判断するフェッチ判断手段と、
前記複数の命令のフェッチが命令順に行われたと判断した場合に、前記プロセッサに対して前記第1のアクセス範囲のアクセスを開放する制御手段と、
を備えることを特徴とする情報処理装置。 A processor;
A first storage unit for storing privileged software that allows the processor to access a first access range;
A second storage unit that stores software that causes the processor to access a second access range that is narrower than the first access range;
A communication path for connecting the first storage unit and the processor and performing communication of data necessary for executing the privileged software on the processor;
Fetch detection means for detecting fetches to a plurality of instructions executed when the processor starts up the privileged software, which is an instruction included in the privileged software, via the communication path;
Fetch for determining whether or not fetching is performed from the detected fetch destination address to the storage address storing each of the instructions constituting the plurality of instructions when the processor is executing the software Judgment means,
Control means for releasing access of the first access range to the processor when it is determined that the plurality of instructions are fetched in the order of instructions;
An information processing apparatus comprising:
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007087388A JP2008250387A (en) | 2007-03-29 | 2007-03-29 | Information processor |
US11/898,880 US20080244229A1 (en) | 2007-03-29 | 2007-09-17 | Information processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007087388A JP2008250387A (en) | 2007-03-29 | 2007-03-29 | Information processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008250387A true JP2008250387A (en) | 2008-10-16 |
Family
ID=39796324
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007087388A Pending JP2008250387A (en) | 2007-03-29 | 2007-03-29 | Information processor |
Country Status (2)
Country | Link |
---|---|
US (1) | US20080244229A1 (en) |
JP (1) | JP2008250387A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014532201A (en) * | 2011-10-13 | 2014-12-04 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Method, system and computer program for memory protection of virtual guest |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5505781B2 (en) * | 2008-02-04 | 2014-05-28 | 日本電気株式会社 | Trace / failure observation system, trace / failure observation method, and trace / failure observation program |
US8549516B2 (en) * | 2008-12-23 | 2013-10-01 | Citrix Systems, Inc. | Systems and methods for controlling, by a hypervisor, access to physical resources |
JP4572259B1 (en) * | 2009-04-27 | 2010-11-04 | 株式会社フォティーンフォティ技術研究所 | Information device, program, and illegal program code execution prevention method |
US8433889B2 (en) * | 2010-04-28 | 2013-04-30 | Acer Cloud Technology, Inc. | Operating system context switching |
GB2482701C (en) * | 2010-08-11 | 2018-12-26 | Advanced Risc Mach Ltd | Illegal mode change handling |
US20130054135A1 (en) * | 2011-08-31 | 2013-02-28 | Ragnar H. Backsen, JR. | Electronic cartage application |
US10229043B2 (en) * | 2013-07-23 | 2019-03-12 | Intel Business Machines Corporation | Requesting memory spaces and resources using a memory controller |
JP6117068B2 (en) * | 2013-09-20 | 2017-04-19 | 株式会社東芝 | Information processing apparatus and program |
JP2023023847A (en) * | 2021-08-06 | 2023-02-16 | 東芝テック株式会社 | Information processing apparatus and control program therefor |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6369855B1 (en) * | 1996-11-01 | 2002-04-09 | Texas Instruments Incorporated | Audio and video decoder circuit and system |
US7120717B2 (en) * | 2004-02-13 | 2006-10-10 | Hewlett-Packard Development Company, L.P. | Method and apparatus for controlling interrupt storms |
US7913055B2 (en) * | 2006-11-04 | 2011-03-22 | Virident Systems Inc. | Seamless application access to hybrid main memory |
US7831818B2 (en) * | 2007-06-20 | 2010-11-09 | Freescale Semiconductor, Inc. | Exception-based timer control |
-
2007
- 2007-03-29 JP JP2007087388A patent/JP2008250387A/en active Pending
- 2007-09-17 US US11/898,880 patent/US20080244229A1/en not_active Abandoned
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014532201A (en) * | 2011-10-13 | 2014-12-04 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | Method, system and computer program for memory protection of virtual guest |
Also Published As
Publication number | Publication date |
---|---|
US20080244229A1 (en) | 2008-10-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2008250387A (en) | Information processor | |
US11580264B2 (en) | Systems and methods for controlling access to secure debugging and profiling features of a computer system | |
EP2805246B1 (en) | Dynamic execution prevention to inhibit return-oriented programming | |
JP4872001B2 (en) | Memory access safety management | |
JP5100133B2 (en) | Information processing device | |
US7631196B2 (en) | Method and apparatus for loading a trustable operating system | |
JP4249779B2 (en) | Device controller | |
CN109840410A (en) | The method and system of data isolation and protection in a kind of process | |
JP2008257734A (en) | Security control in data processing system based on memory domain | |
JP3982687B2 (en) | Controlling access to multiple isolated memories in an isolated execution environment | |
JP2008257735A (en) | Protected function calling | |
JP7432586B2 (en) | Validating the stack pointer | |
US10467410B2 (en) | Apparatus and method for monitoring confidentiality and integrity of target system | |
US20220366037A1 (en) | Domain transition disable configuration parameter | |
TWI312253B (en) | Data processing apparatus and method for controlling access to a memory in the same | |
US9633213B2 (en) | Secure emulation logic between page attribute table and test interface | |
Geater | ARM® TrustZone® | |
EP4073635B1 (en) | Intermodal calling branch instruction | |
JP2011150457A (en) | Information processing apparatus and memory access control method | |
JP2009271597A (en) | Processor | |
Lee et al. | GENESIS: A Generalizable, Efficient, and Secure Intra-kernel Privilege Separation | |
CN115269456A (en) | Processor and isolated memory protection method | |
JP2022509722A (en) | Devices and methods for handling exception-causing events |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090326 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090804 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090818 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20100119 |