JP2014119953A - Computer and interrupt service routine execution method - Google Patents
Computer and interrupt service routine execution method Download PDFInfo
- Publication number
- JP2014119953A JP2014119953A JP2012274492A JP2012274492A JP2014119953A JP 2014119953 A JP2014119953 A JP 2014119953A JP 2012274492 A JP2012274492 A JP 2012274492A JP 2012274492 A JP2012274492 A JP 2012274492A JP 2014119953 A JP2014119953 A JP 2014119953A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- instruction
- decryption key
- decryption
- service routine
- 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
Images
Abstract
Description
本発明は、コンピュータに関し、例えば、暗号化されたプログラムコードを復号化して実行するコンピュータに好適に利用できるものである。 The present invention relates to a computer and can be suitably used for, for example, a computer that decrypts and executes an encrypted program code.
特許文献1〜3は、暗号化されたプログラムコード(命令ルーチン)を復号化して実行するコンピュータを開示している。例えば、特許文献1に開示されたコンピュータは、暗号化されたプログラムコードを外部メモリからリードし、プロセッサにより指定された鍵識別子に対応する復号鍵を用いて暗号化されたプログラムコードを復号化し、復号化されたプログラムコードをキャッシュメモリに格納する。そして、プロセッサは、復号化されたプログラムコードをキャッシュメモリからリードして実行する。
また、特許文献1では、プログラムコードは、非耐タンパ状態から耐タンパ状態に移行するための明示的な命令を含む。コンピュータは、当該命令を実行することで、非耐タンパ状態から耐タンパ状態に移行する。当該命令は、暗号化されたプログラムコードを格納したメモリブロックの先頭アドレスと、復号鍵のアドレスを指定する。
Further, in
さらに、特許文献1に開示されたコンピュータは、ハードウェ割り込みの発生時に耐タンパ状態から非耐タンパ状態に移行することを記載している。つまり、特許文献1に開示されたコンピュータは、割り込みサービスルーチン(割り込みハンドラ)を非耐タンパ状態で実行する。
Furthermore, it is described that the computer disclosed in
特許文献1のコンピュータは、ハードウェア割り込みの発生時に、割り込みサービスルーチン(割り込みハンドラ)を非耐タンパ状態で実行する。従って、コンピュータに供給するために不揮発性メモリ(例えば、マスクROM(Read Only Memory)、プログラマブルROM、フラッシュメモリ、又はハードディスクドライブ)に格納された割り込みサービスルーチンは暗号化されていない。しかしながら、コンピュータの様々な利用シナリオを想定した場合、暗号化された割り込みサービスルーチンを利用できることが好ましい。特許文献1〜3に開示されたコンピュータは、暗号化された割り込みサービスルーチンをコンピュータにおいて実行することができないという課題を有する。その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。
The computer of
一実施形態において、コンピュータは、第1の割り込みの発生に応答して、第1の割り込みサービスルーチンに分岐するための割り込み擬似命令を制御ユニットから命令処理ユニットに投入するよう構成されている。前記割り込み擬似命令は、前記第1の割り込みに対応する第1の復号鍵識別子に関連付けられる。さらに、前記コンピュータは、前記命令処理ユニットにおける前記割り込み擬似命令の実行に基づいて前記第1の復号鍵識別子に対応する復号鍵を復号回路に設定するとともに、暗号化された第1の割り込みサービスルーチンを前記復号回路において復号化するよう構成されている。 In one embodiment, the computer is configured to inject an interrupt pseudo-instruction for branching to the first interrupt service routine from the control unit to the instruction processing unit in response to the occurrence of the first interrupt. The interrupt pseudo instruction is associated with a first decryption key identifier corresponding to the first interrupt. Further, the computer sets a decryption key corresponding to the first decryption key identifier in the decryption circuit based on execution of the interrupt pseudo-instruction in the instruction processing unit, and an encrypted first interrupt service routine Is decoded by the decoding circuit.
上述した実施形態は、暗号化された割り込みサービスルーチンをコンピュータにおいて実行することができる。 The above-described embodiments can execute an encrypted interrupt service routine in a computer.
以下では、具体的な実施形態について、図面を参照しながら詳細に説明する。各図面において、同一又は対応する要素には同一の符号が付されており、説明の明確化のため、必要に応じて重複説明は省略される。 Hereinafter, specific embodiments will be described in detail with reference to the drawings. In each drawing, the same or corresponding elements are denoted by the same reference numerals, and redundant description is omitted as necessary for clarification of the description.
<第1の実施形態>
本実施形態に係るコンピュータ1は、第1の割り込みの発生に応答して、第1の割り込みサービスルーチン(ISR:Interrupt Service Routine)に分岐するための割り込み擬似命令(IPI:Interrupt Pseudo Instruction)を制御ロジック14から命令処理ユニット11に投入するよう構成されている。一例において、IPIは、第1の割り込みに対応する第1の復号鍵識別子(例えば、鍵番号KN)に関連付けられる。言い換えると、IPIは、第1の復号鍵識別子に対応する復号鍵の復号回路50への設定を引き起こす命令を含む。復号回路50は、命令処理ユニット11におけるIPIの実行に基づいて第1の復号鍵識別子に対応する復号鍵を設定する。これにより、第1のISRに分岐した命令処理ユニット11は、ISRを実行することができる。つまり、コンピュータ1は、暗号化されているISRを復号化した後に実行することができる。
<First Embodiment>
The
なお、CPU(Central Processing Unit)10は、複数の割り込み要因(例えば複数の周辺デバイスからの複数の割り込み)を扱うために複数のISRを実行する。一例において、複数のISRは、互いに異なる暗号鍵によって暗号化され、互いに異なる復号鍵による復号化を必要とする。したがって、制御ロジック14は、割り込み要因(又は割り込みベクタ)に対応する復号鍵(復号鍵識別子)を特定してもよい。具体的には、コンピュータ1は、複数の割り込み要因(又は割り込みベクタ)に対応する複数の復号鍵識別子を規定したレジストリを有してもよい。なお、当該レジストリは、CPU10に配置されてもよいし、割り込みベクタテーブル21に配置されてもよいし、割り込みコントローラ20に配置されてもよい。制御ロジック14は、発生した割り込みに対応する復号鍵(復号鍵識別子)を当該レジストリに基づいて特定すればよい。このようなアーキテクチャによれば、異なる復号鍵を必要とする複数のISRをコンピュータ1において実行することができる。
A CPU (Central Processing Unit) 10 executes a plurality of ISRs in order to handle a plurality of interrupt factors (for example, a plurality of interrupts from a plurality of peripheral devices). In one example, the plurality of ISRs are encrypted with different encryption keys and require decryption with different decryption keys. Therefore, the
本実施形態に係るコンピュータ1は、例えば、マイクロプロセッサ、マイクロコンピュータ、マイクロコントローラ、又はSoC(System on Chip)である。コンピュータ1は、1つのICチップのみで構成されてもよいし、複数のICチップにより構成されてもよい。以下では、本実施形態に係るコンピュータ1の構成及び動作の具体例について説明する。
The
図1は、コンピュータ1の第1の構成例を示すブロック図である。CPU10は、命令処理ユニット11を含む。命令処理ユニット11は、命令をフェッチし、命令をデコードし、そして命令を実行する。命令処理ユニット11は、典型的には、命令パイプラインである。図1の構成例は、命令処理ユニット11は、命令フェッチユニット110、命令デコードユニット111、命令実行ユニット112、及びライトバックユニット113を含む。
FIG. 1 is a block diagram illustrating a first configuration example of the
命令フェッチユニット110は、メモリ40に格納されているプログラムコードを、キャッシュメモリ30及びバスコントローラ13を介してフェッチする。命令デコードユニット111は、フェッチされた命令をデコードし、実行するべき演算種類(例えば、加減算、乗算、除算、又は論理演算)を決定し、必要な制御信号を生成する。命令実行ユニット112は、デコードされた命令に従って、CPU10の内部状態を変更する。すなわち、命令実行ユニット112は、複数の実行ユニット(例えば、ALU(Arithmetic Logic Unit)、乗算器、バレルシフタ、及びロード/ストアユニット)を有し、デコードされた命令に従った演算を実行する。ライトバックユニット113は、命令実行ユニット112の出力データをレジスタファイル12の汎用レジスタ(GPR:General Purpose Register)に書き込む。
The
さらに、CPU10は、制御ロジック14、退避レジスタ15を含む。制御ロジック14は、ハードウェア割り込みを検出し、命令処理ユニット11による割り込みサービスルーチン(割り込みハンドラ)の実行を制御する。退避レジスタ15は、割り込みサービスルーチンに分岐する際に退避されるプログラムカウンタ(PC)160、プログラムステータスワード(PSW)レジスタ161、及び鍵番号(KN)レジスタ162を含む制御レジスタの値を保持する。なお、鍵番号(KN)レジスタ162は、CPU10において実行されているプログラムコードに適用される復号鍵番号を示す。
Further, the
割り込みコントローラ20は、1又は複数の周辺デバイスからの複数の割り込み(INT1、INT2、・・・)を受信し、複数の割り込みが同時に発生している場合はこれらの優先順位を判定し、割り込み要求信号(INTR)及び割り込み要因番号(INTNO)を出力する。INTRは割り込みの発生を示す。割り込み要因番号(INTNO)は、優先順位に基づいて選択された割り込み要因を示す番号である。図1の例では、割り込み要求信号(INTR)はCPU10の制御ロジック14に送られ、割り込み要因番号(INTNO)は割り込みベクタテーブル(IVT:Interrupt Vector Table)21に送られる。
The
図1に示された割り込みベクタテーブル21は、複数の割り込みベクタに対応する複数の復号鍵識別子を規定している。割り込みベクタテーブル21は、割り込み番号信号(INTNO)を割り込みコントローラ20から受信し、割り込み番号信号(INTNO)に示された割り込み番号に関連付けられている割り込みベクタ(INTV)及び復号鍵番号(KN)を制御ロジック14に送る。ここで、割り込みベクタ(INTV)は、例えば、ベクタアドレスを示してもよい。ベクタアドレスは、ISRの開始アドレス、又はISRへの分岐命令が置かれたアドレスである。また、割り込みベクタ(INTV)は、ベクタアドレスを求めるためのオフセット、又はベクタアドレスを求めるためのベクタ番号を示してもよい。また、鍵番号(KN)は、復号鍵を特定するための鍵識別子の一例に過ぎない。つまり、割り込みベクタテーブル21は、鍵番号(KN)とは異なる他のコードを鍵識別子として格納してもよい。
The interrupt vector table 21 shown in FIG. 1 defines a plurality of decryption key identifiers corresponding to a plurality of interrupt vectors. The interrupt vector table 21 receives the interrupt number signal (INTNO) from the interrupt
CPU10の制御ロジック14は、割り込み要求信号(INTR)を受信すると、割り込みアクノリッジ信号(INTA)を割り込みコントローラ20に送る。制御ロジック14は、割り込みベクタテーブル21から割り込みベクタ(INTV)及び復号鍵番号(KN)を受信し、割り込み擬似命令(IPI)を生成する。そして、制御ロジック14は、IPIを命令処理ユニット11(具体的には命令実行ユニット112)に投入する。IPIは、割り込みベクタ及び復号鍵番号に関連付けられている。IPIは、割り込みベクタ及び復号鍵番号示す即値を含んでもよいし、割り込みベクタ及び復号鍵番号が格納されたレジスタを示してもよい。また、IPIは、複数の命令を含んでもよい。例えば、IPIは、以下の命令を含んでもよい。
・退避レジスタ15の書き換え命令;
・第1の復号鍵識別子に対応する復号鍵の復号回路50への設定を引き起こす命令;及び
・割り込みベクタに基づくアドレス(つまり、ISRの開始アドレス又はISRへの分岐命令のアドレス)へのジャンプを引き起こす命令。
When receiving the interrupt request signal (INTR), the
-Rewrite instruction of save register 15;
An instruction that causes the
命令実行ユニット112は、IPIを受信した場合に、実行中の命令を中断し、プログラムカウンタ(PC)160、プログラムステータスワード(PSW)レジスタ161、及び鍵番号(KN)レジスタ162を含む制御レジスタの値を退避レジスタ15に退避する。そして、命令実行ユニット112は、鍵設定要求信号(KNREQ)、及びIPIによって示された鍵番号(KN)を復号回路50に送る。さらに、命令実行ユニット112は、IPIによって示された割り込みベクタからフェッチターゲットのアドレス(FADS)を生成する。このアドレス(FADS)は、ISRの開始アドレス又はISRへの分岐命令が置かれたアドレスを示す。命令実行ユニット112は、生成したアドレス(FADS)をPC160にセットし、アドレス(FADS)及びフェッチ要求(FREQ)を命令フェッチユニット110に送る。命令フェッチユニット110は、フェッチ要求をキャッシュメモリ30に送る。これにより、命令処理ユニット11は、ISRに分岐し、ISRを実行する。
When the
キャッシュメモリ30は、ライン単位(例えば、16バイト又は32バイト)でメモリ40から命令をリードし、リードした命令を一時的に格納する。キャッシュメモリ30は、メモリ40からリードしたデータをキャッシュしてもよい。キャッシュメモリ30は、例えば、SRAM(Static Random Access Memory)である。メモリ40は、例えば、SRAM(つまり、セカンダリキャッシュ)、DRAM(Dynamic Random Access Memory)、マスクROM、プログラマブルROM、又はフラッシュメモリである。
The
本実施形態では、命令処理ユニット11において実行される複数のプログラムコード(命令ルーチン)の少なくとも一部(1又は複数のISRを含む)は、暗号化された状態でメモリ40に格納されている。したがって、図1の構成例は、復号回路50を有する。復号回路50は、メモリ40から読み出される暗号化されたプログラムコードを復号化し、キャッシュメモリ30に格納する。復号回路50においてプログラムコードの復号化に使用される復号鍵は、CPU10によって指定される。具体的には、復号回路50は、デコーダ51及び鍵格納ユニット52を有する。鍵格納ユニット52は、それぞれ異なる復号鍵番号(例えば、KN1、KN2、・・・)に関連付けられた複数の復号鍵(例えば、KEY1、KEY2、・・・)を格納している。鍵格納ユニット52は、鍵設定要求信号(KNREQ)、及び復号鍵番号(KN)をCPU10(命令処理ユニット11)から受信し、CPU10より指定された復号鍵番号に対応する復号鍵をデコーダ51に設定する。
In the present embodiment, at least a part (including one or a plurality of ISRs) of a plurality of program codes (instruction routines) executed in the
図2は、割り込みベクタテーブル21の構成例を示している。図2の例では、割り込み要因番号(INTNO)、割り込みベクタ(INTV)、及び復号鍵番号(KN)が関連付けて格納されている。図2の割り込みベクタ(INTV)は、ベクタ番号を示している。例えば、INTNO=0の割り込み要因に、INTV=64、KN=1が関連付けられている。INTNO=1の割り込み要因にINTV=65、KN=3が関連付けられている。また、INTNO=2の割り込み要因にINTV=66、KN=10が関連付けられている。 FIG. 2 shows a configuration example of the interrupt vector table 21. In the example of FIG. 2, an interrupt factor number (INTNO), an interrupt vector (INTV), and a decryption key number (KN) are stored in association with each other. The interrupt vector (INTV) in FIG. 2 indicates a vector number. For example, INTTV = 64 and KN = 1 are associated with the interrupt factor of INTNO = 0. INTTV = 65 and KN = 3 are associated with the interrupt factor of INTNO = 1. Further, INTTV = 66 and KN = 10 are associated with the interrupt factor of INTNO = 2.
図3は、CPU10における割り込みサービスルーチンの実行方法の一例を示すフローチャートである。ステップS11では、制御ロジック14は、割り込み要求信号(INTQ)を割り込みコントローラ20から受信する。ステップS12では、制御ロジック14は、割り込み要求信号(INTQ)の受信に反応して、割り込みベクタ(INTV)及び復号鍵番号(KN)を割り込みベクタテーブル21から取得する。既に述べたように、この復号鍵番号(KN)は、割り込みベクタ(INTV)によって特定されるISRの復号化に使用されるべき復号鍵を特定する。ステップS13では、制御ロジック14は、割り込み擬似命令(IPI)を生成する。IPIは、割り込みベクタ(INTV)及び復号鍵番号(KN)に関連付けられている。ステップS14では、制御ロジック14は、生成したIPIを命令処理ユニット11(命令実行ユニット112)に投入する。
FIG. 3 is a flowchart showing an example of an execution method of the interrupt service routine in the
IPIを受信した命令実行ユニット112は、ステップS15において、実行中の命令を中断し、中断した命令に関するコンテクスト(PC160、PSW161、KN162)を退避レジスタ15に退避する。ステップS16では、命令実行ユニット112は、ISRの復号化に適用される復号鍵を復号回路50に設定する。具体的には、既に述べたように、命令実行ユニット112は、IPIによって指示された鍵番号(KN)と鍵設定要求信号(KNREQ)を復号回路50に送る。
In step S15, the
ステップS17では、命令処理ユニット11は、ISRに分岐し、ISRを実行する。命令フェッチユニット110によってキャッシュメモリ30からフェッチされるISRの命令は、復号回路50によってデコードされている。したがって、CPU10は、暗号化された状態でメモリ40に格納されているISRを実行することができる。
In step S17, the
なお、ISRの処理が完了すると、CPU10は、中断した命令に復帰する。図1の構成例では、中断した命令のPC及びPSWに加えて、中断した命令(中断したプログラムコード)に適用される復号鍵の番号を退避レジスタ15に退避している。したがって、CPU10は、復号鍵番号を含むコンテクストをPC160、PSWレジスタ161、KNレジスタ162に戻し、中断した命令に復帰する。これにより、コンピュータ1は、中断したプログラムコードの復号化を復号回路50において再開することができ、中断したプログラムコードのCPU10における実行を継続することができる。
When the ISR process is completed, the
続いて以下では、コンピュータ1の他の構成例について説明する。図4は、コンピュータ1の第2の構成例を示すブロック図である。図4の構成例では、割り込みコントローラ200が、複数の割り込み要因(又は複数のISR)に対応する複数の復号鍵番号を管理する。そして、割り込みコントローラ200は、割り込みの発生時に、割り込み要求(INTR)及び復号鍵番号(KN)を制御ロジック14に供給する。例えば、割り込みコントローラ200は、複数の割り込み要因に対応する複数の復号鍵番号を定めた1又は複数のレジスタを有してもよい。図4に示された割り込みベクタテーブル210は、割り込み番号(INTNO)と割り込みベクタ(INTV)を関連付けて保持すればよい。
Subsequently, another configuration example of the
図5は、割り込みコントローラ200の構成例を示している。割り込みコントローラ200は、複数の割り込み要因レジスタ201を有する。各割り込み要因レジスタ201は、対応する割り込み(INT0、INT1など)の有無をフラグ、割り込みの優先度(PRI)、及び鍵番号(KN)を格納する。つまり、図5の構成例では、各割り込み要因レジスタ201は、各割り込み要因に対応する鍵番号の設定値を保持している。要因選択回路202は、フラグを参照して発生している割り込みを検知し、優先度(PRI)に基づいてCPU10に通知する割り込み要因を選択する。そして、要因選択回路202は、割り込み要求信号(INTR)、並びに選択した割り込み要因に対応する割り込み番号(INTNO)及び鍵番号(KN)を出力する。
FIG. 5 shows a configuration example of the interrupt
<第2の実施形態>
本実施形態では、第1の実施形態に係るコンピュータ1の変形例について説明する。図6は、本実施形態に係るコンピュータ2の構成例を示すブロック図である。本実施の形態に係るコンピュータ2は、比較回路61及びトレース出力回路62を有する。比較回路61は、暗号化されたプログラムコードの復号化のために復号回路50(デコーダ51)に適用されている復号鍵番号を、トレース対象プログラムコードに関連付けられた復号鍵番号と比較するよう構成されている。トレース出力回路62は、2つの鍵番号が比較回路61において一致することを条件として、命令処理ユニット11の命令実行状況を示すトレースデータを出力するよう構成されている。トレース対象プログラムコードに関連付けられた復号鍵番号は、トレース用鍵番号レジスタ60にセットされる。
<Second Embodiment>
In the present embodiment, a modification of the
レジスタ60への鍵番号の書き込みは、例えば、デバッグツール(不図示)から行えばよい。デバッグツールは、利用者を認証し、利用者の認証に成功したことを条件として当該利用者に対応付けられた復号鍵番号をトレース用鍵番号レジスタ60にセットしてもよい。
The key number can be written to the
図7は、本実施形態に係るトレースデータの出力制御方法の一例を示すフローチャートである。ステップS21では、コンピュータ1は、認証された復号鍵番号をトレース用鍵番号レジスタ60に設定する。ステップS22及び23では、比較回路61は、実行中のプログラムコードの復号化のために用いられる復号鍵の鍵番号(つまり、KNレジスタ162の値)を、認証された鍵番号(つまり、トレース用鍵番号レジスタ60の値)と比較し、これら2つの鍵番号が一致するかを判定する。2つの鍵番号が一致する場合(ステップS23でYES)、CPU10はトレース出力回路62からのトレースデータの出力を許可する(ステップS24)。一方、2つの鍵番号が一致しない場合(ステップS23でNO)、CPU10はトレースデータの出力を禁止する(ステップS25)。
FIG. 7 is a flowchart showing an example of a trace data output control method according to the present embodiment. In step S <b> 21, the
一般的なCPUはデバッグ機能を有しており、命令の実行状況およびアクセスデータを示すトレースデータを出力できるよう構成されている。仮に、暗号化した状態でメモリ40に格納されているプログラムコード(例えば、ユーザープログラム、割り込みサービスルーチン)の実行状況を誰でもトレースすることができるとすれば、これらのプログラムコードの耐タンパ性が低下する。本実施形態のコンピュータ2は、実行中のプログラムコードに適用されている復号鍵の識別子(鍵番号)がトレース対象プログラムコードに関連付けられた復号鍵識別子(鍵番号)と一致することを条件として、トレースデータの出力を許可する。したがって、暗号化した状態でメモリ40に格納されているプログラムコードの耐タンパ性の低下を防止できる。
A general CPU has a debugging function, and is configured to output trace data indicating instruction execution status and access data. If anyone can trace the execution status of the program code (for example, user program, interrupt service routine) stored in the
なお、本実施形態において、比較回路61は、復号鍵識別子(例えば、鍵番号)の比較ではなく、復号鍵自体を比較するように構成されてもよい。すなわち、比較回路61は、復号回路50(デコーダ51)に適用されている復号鍵を、トレース対象のプログラムコードの復号化のために用いられる復号鍵と比較してもよい。トレース出力回路62は、2つの復号鍵が比較回路61において一致することを条件として、命令処理ユニット11の命令実行状況を示すトレースデータを出力すればよい。
In the present embodiment, the
<その他の実施形態>
図1、図4、及び図6に示したコンピュータ1及び2の構成例は一例に過ぎない。例えば、あるアーキテクチャでは、割り込み擬似命令を生成する制御ロジック14は割り込みコントローラ20に配置されてもよい。
<Other embodiments>
The configuration examples of the
また、他のアーキテクチャでは、制御ロジック14又は割り込みコントローラ20(200)は、割り込み信号に基づいて割り込みベクタを生成するロジック回路を有してもよい。つまり、割り込みベクタテーブル21(210)は明示的に存在しなくてもよい。この場合、CPU10又は割り込みコントローラ20(200)は、複数の割り込み要因に対応する複数の復号鍵識別子を規定したレジストリ(例えば、レジスタ、ROM上のテーブル)を有していればよい。
In other architectures, the
さらに、上述した実施形態は本件発明者により得られた技術思想の適用に関する例に過ぎない。すなわち、当該技術思想は、上述した実施形態のみに限定されるものではなく、種々の変更が可能であることは勿論である。 Furthermore, the above-described embodiment is merely an example relating to application of the technical idea obtained by the present inventors. That is, the technical idea is not limited to the above-described embodiment, and various changes can be made.
例えば、本件発明者等により得られた技術思想は、以下に示す実施形態A1〜A7、並びにB1〜B7を含む。 For example, the technical idea obtained by the present inventors includes Embodiments A1 to A7 and B1 to B7 described below.
(実施形態A1)
命令をデコードして実行するCPU(Central Processing Unit)、
第1の割り込みの発生に応答して、第1の復号鍵識別子を前記CPUに供給する割り込みコントローラ、及び
前記CPUから前記第1の復号鍵識別子を受信し、暗号化された第1の割り込みサービスルーチンを前記第1の復号鍵識別子に対応する復号鍵を用いて復号化する復号回路、
を備えるコンピュータ。
(実施形態A2)
前記割り込みコントローラは、複数の割り込み要因に対応する複数の復号鍵識別子を定めた1又は複数のレジスタを備える、実施形態A1に記載のコンピュータ。
(実施形態A3)
前記CPUは、
命令をデコードして実行する命令処理ユニットと、
前記第1の割り込みに基づく前記割り込みコントローラからの割り込み要求に応答して、前記第1の割り込みサービスルーチンに分岐するよう前記命令処理ユニットを制御する制御ユニットと、
を備える、実施形態A1又はA2に記載のコンピュータ。
(実施形態A4)
前記制御ユニットによる前記命令処理ユニットの制御は、前記第1の割り込みサービスルーチンに分岐するための割り込み擬似命令を前記命令処理ユニットに投球することを含む、実施形態A3に記載のコンピュータ。
(実施形態A5)
前記割り込み擬似命令は、前記割り込み擬似命令は前記第1の復号鍵識別子に関連付けられている、実施形態A4に記載のコンピュータ。
(実施形態A6)
前記命令処理ユニットは、前記割り込み擬似命令を実行することによって、前記第1の復号鍵識別子を示す信号を前記復号回路に供給するとともに、前記第1の割り込みサービスルーチンに分岐する、実施形態A4に記載のコンピュータ。
(実施形態A7)
前記命令処理ユニットは、前記復号回路において復号化された前記第1の割り込みサービスルーチンを実行する、実施形態A1又はA2に記載のコンピュータ。
(Embodiment A1)
CPU (Central Processing Unit) that decodes and executes instructions,
An interrupt controller that supplies a first decryption key identifier to the CPU in response to the occurrence of a first interrupt; and an encrypted first interrupt service that receives the first decryption key identifier from the CPU and is encrypted A decryption circuit for decrypting a routine using a decryption key corresponding to the first decryption key identifier;
A computer comprising:
(Embodiment A2)
The computer according to embodiment A1, wherein the interrupt controller includes one or more registers that define a plurality of decryption key identifiers corresponding to a plurality of interrupt factors.
(Embodiment A3)
The CPU
An instruction processing unit for decoding and executing instructions;
A control unit for controlling the instruction processing unit to branch to the first interrupt service routine in response to an interrupt request from the interrupt controller based on the first interrupt;
A computer as described in embodiment A1 or A2.
(Embodiment A4)
The computer of embodiment A3, wherein the control of the instruction processing unit by the control unit includes throwing an interrupt pseudo-instruction to branch to the first interrupt service routine to the instruction processing unit.
(Embodiment A5)
The computer of embodiment A4, wherein the interrupt pseudo-instruction is associated with the first decryption key identifier.
(Embodiment A6)
In the embodiment A4, the instruction processing unit supplies the signal indicating the first decryption key identifier to the decryption circuit by executing the interrupt pseudo-instruction, and branches to the first interrupt service routine. The listed computer.
(Embodiment A7)
The computer according to embodiment A1 or A2, wherein the instruction processing unit executes the first interrupt service routine decoded by the decoding circuit.
(実施形態B1)
命令をデコードして実行するCPU(Central Processing Unit)、
複数の割り込み要因に対応する複数の復号鍵識別子を規定し、第1の割り込みの発生時に前記第1の割り込みに対応する第1の復号鍵識別子を前記CPUに供給するレジストリ、及び
前記CPUから前記第1の復号鍵識別子を受信し、暗号化された第1の割り込みサービスルーチンを前記第1の復号鍵識別子に対応する復号鍵を用いて復号化する復号回路、
を備えるコンピュータ。
(実施形態B2)
前記レジストリは、割り込みベクタテーブルである、実施形態B2に記載のコンピュータ。
(実施形態B3)
前記CPUは、
命令をデコードして実行する命令処理ユニットと、
前記第1の割り込みの発生時に前記第1の割り込みサービスルーチンに分岐するよう前記命令処理ユニットを制御する制御ユニットと、
を備える、実施形態B1又はB2に記載のコンピュータ。
(実施形態B4)
前記制御ユニットによる前記命令処理ユニットの制御は、前記第1の割り込みサービスルーチンに分岐するための割り込み擬似命令を前記命令処理ユニットに投球することを含む、実施形態B3に記載のコンピュータ。
(実施形態B5)
前記割り込み擬似命令は前記第1の復号鍵識別子に関連付けられている、実施形態B4に記載のコンピュータ。
(実施形態B6)
前記命令処理ユニットは、前記割り込み擬似命令を実行することによって、前記第1の復号鍵識別子を示す信号を前記復号回路に供給するとともに、前記第1の割り込みサービスルーチンに分岐する、実施形態B4に記載のコンピュータ。
(実施形態B7)
前記命令処理ユニットは、前記復号回路において復号化された前記第1の割り込みサービスルーチンを実行する、実施形態B1又はB2に記載のコンピュータ。
(Embodiment B1)
CPU (Central Processing Unit) that decodes and executes instructions,
Defining a plurality of decryption key identifiers corresponding to a plurality of interrupt factors, and supplying a first decryption key identifier corresponding to the first interrupt to the CPU when a first interrupt occurs; and A decryption circuit for receiving a first decryption key identifier and decrypting the encrypted first interrupt service routine using a decryption key corresponding to the first decryption key identifier;
A computer comprising:
(Embodiment B2)
The computer of embodiment B2 wherein the registry is an interrupt vector table.
(Embodiment B3)
The CPU
An instruction processing unit for decoding and executing instructions;
A control unit that controls the instruction processing unit to branch to the first interrupt service routine when the first interrupt occurs;
A computer as described in embodiment B1 or B2.
(Embodiment B4)
The computer of embodiment B3, wherein the control of the instruction processing unit by the control unit includes pitching an interrupt pseudo-instruction for branching to the first interrupt service routine to the instruction processing unit.
(Embodiment B5)
The computer of embodiment B4, wherein the interrupt pseudo-instruction is associated with the first decryption key identifier.
(Embodiment B6)
The instruction processing unit supplies the signal indicating the first decryption key identifier to the decryption circuit by executing the interrupt pseudo-instruction, and branches to the first interrupt service routine. Embodiment B4 The listed computer.
(Embodiment B7)
The computer according to embodiment B1 or B2, wherein the instruction processing unit executes the first interrupt service routine decoded by the decoding circuit.
1、2 コンピュータ
10 CPU(Central Processing Unit)
11 命令処理ユニット
20、200 割り込みコントローラ
21、210 割り込みベクタテーブル
30 キャッシュメモリ
40 メモリ
50 復号回路
60 トレース用鍵番号レジスタ
61 比較回路
62 トレース出力回路
201 割り込み要因レジスタ
ISR 割り込みサービスルーチン
IPI 割り込み擬似命令
KN 鍵番号
1, 2
11
Claims (20)
第1の割り込みの発生に応答して、第1の割り込みサービスルーチンに分岐するための割り込み擬似命令を前記命令処理ユニットに投入する制御ユニット、前記割り込み擬似命令は前記第1の割り込みに対応する第1の復号鍵識別子に関連付けられている、及び
前記命令処理ユニットにおける前記割り込み擬似命令の実行に基づいて前記第1の復号鍵識別子に対応する復号鍵を設定するとともに、暗号化された第1の割り込みサービスルーチンを前記復号鍵を用いて復号化する復号回路、
を備えるコンピュータ。 An instruction processing unit for decoding and executing instructions;
In response to the occurrence of the first interrupt, a control unit that inputs an interrupt pseudo-instruction for branching to the first interrupt service routine to the instruction processing unit, and the interrupt pseudo-instruction corresponds to the first interrupt corresponding to the first interrupt. A decryption key that is associated with the first decryption key identifier and that corresponds to the first decryption key identifier based on execution of the interrupt pseudo-instruction in the instruction processing unit; A decryption circuit for decrypting an interrupt service routine using the decryption key;
A computer comprising:
前記制御ユニットは、前記第1の割り込みに対応する前記第1の復号鍵識別子を前記レジストリから取得する、
請求項1又は2に記載のコンピュータ。 A registry that defines a plurality of decryption key identifiers corresponding to a plurality of interrupt factors;
The control unit obtains the first decryption key identifier corresponding to the first interrupt from the registry;
The computer according to claim 1 or 2.
前記割り込みベクタテーブルは、前記第1の割り込みの発生時に、前記第1の割り込みに対応する第1の割り込みベクタ及び前記第1の復号鍵識別子を前記制御ユニットに供給する、
請求項1又は2に記載のコンピュータ。 An interrupt vector table that defines a plurality of decryption key identifiers corresponding to a plurality of interrupt vectors;
The interrupt vector table supplies a first interrupt vector corresponding to the first interrupt and the first decryption key identifier to the control unit when the first interrupt occurs.
The computer according to claim 1 or 2.
前記ベクタアドレスは、前記第1の割り込みサービスルーチンの開始アドレス又は前記第1の割り込みサービスルーチンへの分岐命令のアドレスである、請求項4に記載のコンピュータ。 The first interrupt vector indicates a vector address, an offset for obtaining the vector address, or a vector number for obtaining the vector address,
The computer according to claim 4, wherein the vector address is a start address of the first interrupt service routine or an address of a branch instruction to the first interrupt service routine.
前記コンテクストは、前記プログラムコードの復号化に適用される第2の復号鍵識別子を含む、請求項1又は2に記載のコンピュータ。 The instruction processing unit is configured to save a context relating to a program code executed by the instruction processing unit in response to the occurrence of the first interrupt,
The computer according to claim 1, wherein the context includes a second decryption key identifier applied to decrypt the program code.
前記第3の復号鍵識別子及び前記第4の復号鍵識別子が一致すること、又は前記第3及び第4の復号鍵識別子に対応付けられた復号鍵同士が一致することを条件として、前記命令処理ユニットの命令実行状況を示すトレースデータを出力する出力回路と、
をさらに備える、
請求項1又は2に記載のコンピュータ。 A third decryption key identifier applied to the decryption circuit for decrypting the encrypted program code or a decryption key corresponding to the third decryption key identifier is associated with the program code to be traced. A comparison circuit for comparing with a decryption key identifier of 4 or a decryption key corresponding to the fourth decryption key identifier;
The instruction process on condition that the third decryption key identifier and the fourth decryption key identifier match or the decryption keys associated with the third and fourth decryption key identifiers match. An output circuit that outputs trace data indicating the instruction execution status of the unit;
Further comprising
The computer according to claim 1 or 2.
第1の割り込みの発生に応答して、第1の割り込みサービスルーチンに分岐するための割り込み擬似命令を制御ユニットから命令処理ユニットに投入することを備え、
前記割り込み擬似命令は、第1の復号鍵識別子に対応する復号鍵の復号回路への設定を引き起こす命令を含む、
方法。 A method of executing an interrupt service routine in a computer,
In response to the occurrence of the first interrupt, an interrupt pseudo instruction for branching to the first interrupt service routine is input from the control unit to the instruction processing unit,
The interrupt pseudo-instruction includes an instruction that causes the decryption key corresponding to the first decryption key identifier to be set in the decryption circuit.
Method.
前記コンテクストは、前記プログラムコードの復号化に適用される第2の復号鍵識別子を含む、
請求項15又は16に記載の方法。 Evacuating a context related to the program code executed by the instruction processing unit in response to the occurrence of the first interrupt;
The context includes a second decryption key identifier applied to decrypt the program code,
The method according to claim 15 or 16.
前記命令処理ユニットにおける前記割り込み擬似命令の実行に基づいて、前記第1の割り込みサービスルーチンに分岐すること、
暗号化された第1の割り込みサービスルーチンを前記復号鍵を用いて前記復号回路において復号化すること、及び
前記第1の割り込みサービスルーチンを前記命令処理ユニットにおいて実行すること、
をさらに備える、請求項15又は16に記載の方法。 Setting a decryption key corresponding to the first decryption key identifier in a decryption circuit based on execution of the interrupt pseudo-instruction in the instruction processing unit;
Branching to the first interrupt service routine based on execution of the interrupt pseudo-instruction in the instruction processing unit;
Decrypting the encrypted first interrupt service routine in the decryption circuit using the decryption key; and executing the first interrupt service routine in the instruction processing unit;
The method according to claim 15 or 16, further comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012274492A JP2014119953A (en) | 2012-12-17 | 2012-12-17 | Computer and interrupt service routine execution method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012274492A JP2014119953A (en) | 2012-12-17 | 2012-12-17 | Computer and interrupt service routine execution method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2014119953A true JP2014119953A (en) | 2014-06-30 |
Family
ID=51174738
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012274492A Pending JP2014119953A (en) | 2012-12-17 | 2012-12-17 | Computer and interrupt service routine execution method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2014119953A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20180011671A (en) * | 2016-07-25 | 2018-02-02 | 삼성전자주식회사 | Data storage device and data processing system having the same |
-
2012
- 2012-12-17 JP JP2012274492A patent/JP2014119953A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20180011671A (en) * | 2016-07-25 | 2018-02-02 | 삼성전자주식회사 | Data storage device and data processing system having the same |
KR102538258B1 (en) * | 2016-07-25 | 2023-05-31 | 삼성전자주식회사 | Data storage device and data processing system having the same |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11354423B2 (en) | Cryptographic isolation of memory compartments in a computing environment | |
TWI690822B (en) | Platform migration of secure enclaves | |
CN107667499B (en) | Keyed hash message authentication code processor, method, system, and instructions | |
US20210150040A1 (en) | Data type based cryptographic computing | |
US11243893B2 (en) | Preventing unauthorized access to encrypted memory | |
JP6006248B2 (en) | Instruction emulation processor, method and system | |
CN112639778A (en) | Pointer authentication and dynamic switching between pointer authentication schemes | |
US20150032996A1 (en) | Execution-aware memory protection | |
US20160180095A1 (en) | Measured boot capability | |
US11580035B2 (en) | Fine-grained stack protection using cryptographic computing | |
TW202238423A (en) | Apparatus, method and machine-readable medium for processor extensions to protect stacks during ring transitions | |
US9971702B1 (en) | Nested exception handling | |
JP2013542498A (en) | Debugging data processing equipment | |
US20160188874A1 (en) | System and method for secure code entry point control | |
TWI457784B (en) | Hardware protection of virtual machine monitor runtime integrity watcher | |
US20230018585A1 (en) | Updating encrypted security context in stack pointers for exception handling and tight bounding of on-stack arguments | |
TW202138997A (en) | Processor and system comprising mode-specific endbranch for control flow termination | |
US11468168B1 (en) | Systems and methods for optimizing authentication branch instructions | |
US9785800B2 (en) | Non-tracked control transfers within control transfer enforcement | |
JP2014119953A (en) | Computer and interrupt service routine execution method | |
CN117546168A (en) | Cryptographic computation using context information for transient side channel security | |
JP2007058588A (en) | Processor having program protection function | |
CN113536293A (en) | Apparatus and method for efficiently managing and processing shadow stacks | |
TW201734769A (en) | Processing vector instructions | |
US20240069913A1 (en) | Uniform Microcode Update Enumeration |