JP2014112304A - Information processor, and method of installing file - Google Patents

Information processor, and method of installing file Download PDF

Info

Publication number
JP2014112304A
JP2014112304A JP2012266387A JP2012266387A JP2014112304A JP 2014112304 A JP2014112304 A JP 2014112304A JP 2012266387 A JP2012266387 A JP 2012266387A JP 2012266387 A JP2012266387 A JP 2012266387A JP 2014112304 A JP2014112304 A JP 2014112304A
Authority
JP
Japan
Prior art keywords
management file
information
partition
sector
processing apparatus
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
Application number
JP2012266387A
Other languages
Japanese (ja)
Inventor
Junko Suginaka
順子 杉中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to JP2012266387A priority Critical patent/JP2014112304A/en
Publication of JP2014112304A publication Critical patent/JP2014112304A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To maintain high security by preventing a management file which is stored in a hard disk and monitors malware from being seen by the malware.SOLUTION: A terminal 1 has a HD 11, a MBR 110 and a management file. The HD 11 is divided into at least one or more partitions successively from a head sector, and has the management file stored in a rear region behind a finish sector of the last partition. The MBR 110 stores a partition table PT111 in which information on a head sector and a finish sector of each partition is written, and an exclusive loader for reading the management file into a RAM 12 first at the time of startup of the terminal 1. The management file includes a processing program which, when an order for readout of all LBA stored in a memory chip 11A is generated after the startup of the terminal 1, rewrites the information read out in accordance with the order into information of the finish sector of the last partition.

Description

本発明は、CPUによって各種の情報処理を実行する技術に関する。   The present invention relates to a technique for executing various types of information processing by a CPU.

近年、インターネット等のネットワークに接続されたサーバや端末(パーソナルコンピュータ)、モバイル端末等の情報処理装置に対して各種のウイルス等が侵入し、乃至は潜伏し、それによってデータの盗聴、盗難、改竄、漏洩及び攻撃等の被害が生じている。かかるウイルス被害に対し、ウイルスの侵入を可及的に阻止する目的で、ウイルスを発見し乃至は駆除するソフトウエアの改良乃至は開発、回線制限(アドレス制限)の設定を行う等の対策が講じられている。しかし、ウイルスの新種発見から駆除用のソフトウエアの開発までの時間遅れ等を考慮すれば、ウイルスの侵入を確実に阻止することは困難である。   In recent years, various viruses and the like have entered or hidden in servers, terminals (personal computers), mobile terminals and other information processing apparatuses connected to networks such as the Internet, thereby eavesdropping, stealing and falsifying data. Damages such as leaks and attacks have occurred. In order to prevent such virus damage as much as possible, measures such as improving or developing software to detect or remove viruses and setting line restrictions (address restrictions) are taken. It has been. However, considering the time delay from the discovery of a new virus species to the development of removal software, it is difficult to reliably prevent the virus from entering.

特許文献1には、起動プログラムの実行方法が記載されている。より詳細には、パーソナルコンピュータからハードディスクに対する最初の読込み要求に対し、起動プログラムを格納した記憶媒体の起動セクタに先立ってセキュリティ等の任意プログラムを格納した仮起動セクタを読み出し、該任意プログラムを実行させる起動前処理ステップを有するようにしたものである。そして、このセキュリティ等の任意プログラムの実行後に本来の起動プログラムを実行してOSを起動させるものである。これにより、パーソナルコンピュータのBOISや記憶媒体の起動セクタ(LBA0)を変更することなく、OS起動に先立ってセキュリティ等の任意のプログラムの実行を可能としている。   Patent Document 1 describes a method for executing a startup program. More specifically, in response to an initial read request from the personal computer to the hard disk, a temporary startup sector storing an arbitrary program such as security is read prior to the startup sector of the storage medium storing the startup program, and the arbitrary program is executed. It has an activation preprocessing step. Then, after execution of an arbitrary program such as security, the original boot program is executed to start the OS. As a result, it is possible to execute an arbitrary program such as security prior to OS startup without changing the BOIS of the personal computer or the startup sector (LBA0) of the storage medium.

特許文献2には、オペレーティングシステムにオペレーティングシステム特権モードを設定すると共にユーザアプリケーションにユーザ特権モードを設定し、仮想マシン及び特権モードを用いてウイルス対策が講じられたコンピュータデバイスが記載されている。このコンピュータデバイスには、さらに、仮想マシンモニタ特権モードが設定された仮想マシンモニタ(VMM)及び保護エージェント特権モードが設定された保護エージェント(VM)が設けられており、特権レベルは、仮想マシンモニタ特権モード、保護エージェント特権モード、オペレーティングシステム特権モード、ユーザ特権モードの順でアクセス権の強さが設定されている。従って、悪意者によって作成され、オペレーティングシステムに送り込まれたマルウエアが、特権モードが上位である保護エージェントに対してアクセスしても、かかるアクセスを受け付けず、保護エージェントの内容を改変することを阻止している。そして、マルウエアによってオペレーティングシステム内の資源(SSDT、GDT、IDT等)の改変、また保護エージェントの資源の改変が検知されると、システムをシャットダウンし、リブートすることで改変をリセットするようにしていた。   Patent Document 2 describes a computer device in which an operating system privilege mode is set in an operating system, a user privilege mode is set in a user application, and anti-virus measures are taken using the virtual machine and the privilege mode. The computer device further includes a virtual machine monitor (VMM) in which the virtual machine monitor privilege mode is set and a protection agent (VM) in which the protection agent privilege mode is set. The strength of access right is set in the order of privilege mode, protection agent privilege mode, operating system privilege mode, and user privilege mode. Therefore, even if the malware created by the Service-to-Self and sent to the operating system accesses a protection agent whose privilege mode is higher, it does not accept such access and prevents the contents of the protection agent from being altered. ing. When the malware detects a change in resources in the operating system (SSDT, GDT, IDT, etc.) or a change in the protection agent resource, the system is shut down and rebooted to reset the change. .

特開2006−236193号公報JP 2006-236193 A 特表2010−517164号公報Special table 2010-517164 WO 2011/141997 A1WO 2011/141997 A1 WO 2011/145199 A1WO 2011/145199 A1

特許文献1では、ハードディスク内の仮起動セクタの任意プログラムがウィルスチェックプログラムである場合においても、そのプログラムが実行される前に、例えばRootkitの形態を有するような不正プログラムが起動され、任意プログラムから自身(不正プログラム)を隠蔽することも可能であるため、ウイルスチェックに対する信頼性に一定の限界がある。また、特許文献1にはOS起動前にウイルスを監視する具体的な方法は一切記載されていない。   In Patent Document 1, even when the arbitrary program in the temporary startup sector in the hard disk is a virus check program, an illegal program having, for example, the form of Rootkit is started before the program is executed. Since it is possible to conceal itself (malware), there is a certain limit to the reliability against virus checking. Further, Patent Document 1 does not describe any specific method for monitoring a virus before starting the OS.

また、特許文献2は、順次異なる特権レベルを設定してオペレーティングシステムから侵入するマルウエアの不正アクセスを阻止する仮想マシンモニタ及び保護エージェントを利用したものである。しかしながら、特許文献2には、仮想マシン及び特権レベルの差を利用したアクセス阻止が説明されているのみで、コンピュータデバイスメモリのメモリマップに関しては何等記載されておらず、内容の改変を検出可能とする仕組みまで開示されているものではない。また、仮想マシンモニタ及び保護エージェントのインストール方法に関しては何等記載がなく、これら自体のセキュリティ性の確保は不明である。さらに、内部資源が改変された場合にシャットダウンし、リブートし得たとしても、それで不備の事情が完全に改善されるものでもない。なお、特許文献3,4は、CPUを有する情報処理装置をセキュアな状態でブートすることができる技術が記載されているが、外部デバイスを用いたブート技術に関するものである。   Patent Document 2 uses a virtual machine monitor and a protection agent that sequentially set different privilege levels to prevent unauthorized access of malware entering from an operating system. However, Patent Document 2 only describes access prevention using a difference between a virtual machine and a privilege level, and does not describe anything about a memory map of a computer device memory, and can detect modification of contents. It is not disclosed to the mechanism to do. Further, there is no description about the installation method of the virtual machine monitor and the protection agent, and it is unclear whether the security of these itself is ensured. Furthermore, even if the internal resource can be shut down and rebooted, it does not completely improve the deficiencies. Patent Documents 3 and 4 describe a technique capable of booting an information processing apparatus having a CPU in a secure state, but relates to a boot technique using an external device.

本発明の目的は、ハードディスクに格納されている、マルウエアの監視を行う管理ファイルをマルウエアから見えないようにすることで、高いセキュリティを維持し得る情報処理技術を提供することにある。   An object of the present invention is to provide an information processing technique capable of maintaining high security by making a management file stored in a hard disk, which monitors malware, hidden from the malware.

本発明に係る情報処理装置は、先頭セクタにMBRが、その後方側に少なくともOSが格納されたハードディスクと、前記ハードディスクに対応付けられ、当該ハードディスクの総容量情報が少なくとも格納されたメモリ部材と、CPUと、前記CPUによる前記MBRの起動を経て前記ハードディスクの記憶内容が読み出される主メモリとを含む情報処理装置において、前記ハードディスクは、前記先頭セクタ以降に順に少なくとも1以上のパーティションに区分けされ、最終のパーティションの終了セクタの後方領域に管理ファイルが格納されており、前記MBRは、各パーティションの先頭セクタ及び終了セクタに関する情報が書き込まれたパーティションテーブルと、前記管理ファイルを前記情報処理装置の起動時に最初に前記主メモリに読み出す専用ローダとを格納しており、前記管理ファイルは、前記情報処理装置の起動後に、前記メモリ部材に格納されている前記総容量情報の読み出し指令が発生した時、前記指令に対応して読み出された情報を前記最終のパーティションの終了セクタの情報に書き替える処理プログラムを含むものであることを特徴とするものである。   An information processing apparatus according to the present invention includes a hard disk in which MBR is stored in a head sector and at least an OS is stored on the rear side thereof, a memory member that is associated with the hard disk and stores at least total capacity information of the hard disk, In an information processing apparatus including a CPU and a main memory from which the stored contents of the hard disk are read out after the activation of the MBR by the CPU, the hard disk is sequentially divided into at least one or more partitions after the first sector. The management file is stored in the rear area of the end sector of the partition, and the MBR stores the partition table in which information about the first sector and the end sector of each partition is written, and the management file when the information processing apparatus is started up. First, the main menu The management file corresponds to the command when a read command for the total capacity information stored in the memory member is generated after the information processing apparatus is started. And a processing program for rewriting the information read out to the information of the end sector of the final partition.

本発明によれば、ハードディスクの最終のパーティションの終了セクタを先頭側にずらして、後方側に、いわば空き領域を形成し、この空き領域に管理ファイルをインストールしている。かつ、パーティションテーブルの最終のパーティションの終了セクタを空き領域を除いて設定したので、仮にマルウエアがパーティションテーブルを参照し得たとしても、空き領域を検知することは出来ない。一方、メモリ部材には、ハードディスクの総容量情報を格納しているから、マルウエアがこのメモリ部材を参照した場合、空き領域の存在を知得することとなり、その結果、管理ファイルが破壊、除去等される虞がある。そこで、管理ファイルに処理プログラムを設け、この処理プログラムによって、マルウエアの他、OS,APからメモリ部材の総容量情報(乃至はメモリ部材の総容量情報を含む情報)の読み出し指令が発生した時、前記指令に対応して読み出された情報を、前記最終のパーティションの、前記空き領域を除いた終了セクタの情報に書き替えるようにしている。これにより、正規、悪意に限らず、メモリ部材からハードディスクの総容量情報を知得することはできず、すなわち空き領域へのアクセスを阻止し、管理ファイルが破壊、削除、改変等されることはなくなる。   According to the present invention, the end sector of the last partition of the hard disk is shifted to the head side, so that an empty area is formed on the rear side, and the management file is installed in this empty area. In addition, since the end sector of the final partition of the partition table is set excluding the empty area, even if the malware can refer to the partition table, the empty area cannot be detected. On the other hand, since the total capacity information of the hard disk is stored in the memory member, when malware refers to this memory member, it will know the existence of a free area, and as a result, the management file will be destroyed, removed, etc. There is a risk. Therefore, when a processing program is provided in the management file, and a read command for the total capacity information of the memory member (or information including the total capacity information of the memory member) is generated from the OS and AP in addition to the malware, Information read in response to the command is rewritten to information of the end sector of the final partition excluding the free space. As a result, the total capacity information of the hard disk cannot be obtained from the memory member, whether it is regular or malicious, that is, access to the free area is prevented, and the management file is not destroyed, deleted, altered, or the like. .

請求項2記載の発明は、請求項1に記載の情報処理装置において、前記管理ファイルは、前記主メモリ上で前記OSより上位の特権レベルに設定されたものであることを特徴とする。この構成によれば、特権レベルの差を利用して、主メモリ上に展開された後は管理ファイルへの不当なアクセスは例外としてフックされ、無効等される。   A second aspect of the present invention is the information processing apparatus according to the first aspect, wherein the management file is set to a privilege level higher than the OS on the main memory. According to this configuration, an illegal access to the management file is hooked as an exception and invalidated after being expanded on the main memory using the difference in privilege level.

請求項3記載の発明は、請求項1又は2に記載の情報処理装置において、前記専用ローダは、前記MBRに予め格納されていたブートストラップローダが書き替えられたものであることを特徴とする。この構成によれば、BIOSが起動され、次いでMBRの専用ローダが起動されることによって、管理ファイルが最初に主メモリに読み出され、CPUの制御が管理ファイルに渡されることになる。   According to a third aspect of the present invention, in the information processing apparatus according to the first or second aspect, the dedicated loader is obtained by rewriting a bootstrap loader previously stored in the MBR. . According to this configuration, when the BIOS is activated and then the MBR dedicated loader is activated, the management file is first read into the main memory, and the control of the CPU is transferred to the management file.

請求項4記載の発明は、請求項3に記載の情報処理装置において、前記MBRに予め格納されていたブートストラップローダは、前記専用ローダが書き込まれる前に前記最終のパーティションの終了セクタの後方領域に退避されていることを特徴とする。この構成によれば、退避されているブートストラップローダをMBRに復帰させることで、管理ファイルのない状態での情報処理装置の起動が可能となる。   According to a fourth aspect of the present invention, in the information processing apparatus according to the third aspect, the bootstrap loader previously stored in the MBR is a region behind the end sector of the final partition before the dedicated loader is written. It is characterized by being evacuated. According to this configuration, it is possible to start the information processing apparatus without a management file by returning the saved bootstrap loader to the MBR.

請求項5記載の発明は、請求項1〜4のいずれかに記載の情報処理装置において、前記最終のパーティションの終了セクタは、前記管理ファイルの格納に際して元々のセクタから先頭側に狭められたものであることを特徴とする。この構成によれば、最終のパーティションの終了セクタはハードディスクの後方側のセクタから狭められているものである。   According to a fifth aspect of the present invention, in the information processing apparatus according to any one of the first to fourth aspects, the end sector of the last partition is narrowed from the original sector to the head side when storing the management file. It is characterized by being. According to this configuration, the end sector of the final partition is narrowed from the sector on the rear side of the hard disk.

請求項6記載の発明は、請求項1〜5のいずれかに記載の情報処理装置において、前記管理ファイルの格納領域は、前記最終のパーティションの終了セクタの後方側の全領域であることを特徴とする。この構成によれば、管理ファイルの格納領域の特定は最初のセクタ位置の情報で十分となる。   A sixth aspect of the present invention is the information processing apparatus according to any one of the first to fifth aspects, wherein the management file storage area is the entire area behind the end sector of the final partition. And According to this configuration, the information of the first sector position is sufficient for specifying the management file storage area.

請求項7記載の発明は、請求項1〜6のいずれかに記載の情報処理装置において、前記管理ファイルは、前記総容量情報から前記最終のパーティションの終了セクタの後方側の全領域分を差し引いて最終のパーティションの終了セクタを算出するものであることを特徴とする。この構成によれば、管理ファイルは差し引き演算を実行することで、空き領域を形成するようにしている。   According to a seventh aspect of the present invention, in the information processing apparatus according to any one of the first to sixth aspects, the management file is obtained by subtracting the entire area on the rear side of the end sector of the final partition from the total capacity information. The end sector of the final partition is calculated. According to this configuration, the management file executes a subtraction operation to form a free area.

請求項8記載の発明は、請求項1〜7のいずれかに記載の情報処理装置において、前記管理ファイルは、前記メモリ部材に格納されている前記総容量情報の読み出し指令を受けて割込を実行することで、前記情報の書き替えを行うものであることを特徴とする。この構成によれば、総容量情報の読み出し指令をフックして割込処理に移行し、この割込処理によって総容量情報の書き替えが行われる。   The invention according to claim 8 is the information processing apparatus according to any one of claims 1 to 7, wherein the management file receives an instruction to read the total capacity information stored in the memory member. By executing this, the information is rewritten. According to this configuration, the total capacity information read command is hooked to shift to the interrupt process, and the total capacity information is rewritten by this interrupt process.

請求項9記載の発明は、請求項8に記載の情報処理装置において、前記割込は、I/Oポートのうちの前記メモリ部材に対応するデータレジスタへの前記CPUによるアクセスを受けて行うことを特徴とする。この構成によれば、I/Oポートのうちデータレジスタへのアクセスをフックして割込処理に移行するようにしている。   According to a ninth aspect of the present invention, in the information processing apparatus according to the eighth aspect, the interrupt is performed by receiving an access by the CPU to a data register corresponding to the memory member of the I / O port. It is characterized by. According to this configuration, the access to the data register in the I / O port is hooked to shift to the interrupt process.

請求項10記載の発明は、請求項8に記載の情報処理装置において、前記割込は、メモリマップドI/Oのうちの前記メモリ部材に対応する前記CPUによるアクセスを、デバッグ例外、ページフォルト、及びハードウエア割込のうちの1つを受けて行うことを特徴とする。この構成によれば、デバッグ例外、ページフォルト、及びハードウエア割込のうちの1つをフックして割込処理に移行するようにしている。   According to a tenth aspect of the present invention, in the information processing apparatus according to the eighth aspect, the interrupt causes an access by the CPU corresponding to the memory member of the memory mapped I / O to be a debug exception, a page fault. And receiving one of the hardware interrupts. According to this configuration, one of a debug exception, a page fault, and a hardware interrupt is hooked to shift to an interrupt process.

請求項11に係るファイルのインストール方法は、先頭セクタにMBRが格納され、前記先頭セクタ以降に少なくとも1つのOSが格納されるパーティションに区分けされたハードディスクに対して、インストーラを用いてファイルのインストールを行う方法であって、前記ファイルは、前記ハードディスクに対応付けられ、当該ハードディスクの総容量情報が少なくとも格納されたメモリ部材から前記総容量情報に対する読み出し指令が、前記ハードディスクが搭載された情報処理装置の起動後に発生した時、前記指令に対応して読み出された情報を最終のパーティションの終了セクタの情報に書き替える処理プログラムを有する管理ファイルであり、前記最終パーティションの終了セクタを少なくとも前記ファイルの容量に対応する容量分だけ先頭側に移動させて新たな終了セクタを設定するステップと、前記新たな終了セクタから最終側に向けて前記ファイルを格納するステップと、前記MBRに書き込まれている前記最終パーティションの終了セクタを新たな最終セクタに書き替えるステップと、前記情報処理装置の起動時に前記ファイルを最初に前記情報処理装置の主メモリに読み出す専用ローダを前記MBRに書き込むステップとを有することを特徴とするものである。この発明によれば、管理ファイルが格納される空き領域を知得することはできないこととなる。   According to the eleventh aspect of the present invention, there is provided a file installation method that uses an installer to install a file on a hard disk partitioned into partitions in which MBR is stored in the first sector and at least one OS is stored after the first sector. The file is associated with the hard disk, and a read command for the total capacity information from a memory member in which the total capacity information of the hard disk is stored is sent from an information processing apparatus equipped with the hard disk. A management file having a processing program that rewrites information read in response to the command to information of an end sector of the final partition when it occurs after startup, and sets the end sector of the final partition to at least the capacity of the file Capacity corresponding to A step of setting the new end sector by moving only to the head side, a step of storing the file from the new end sector toward the last side, and an end sector of the last partition written in the MBR. A step of rewriting to a new last sector, and a step of writing in the MBR a dedicated loader that first reads the file into the main memory of the information processing device when the information processing device is activated. . According to the present invention, it is impossible to know the free area where the management file is stored.

請求項12記載の発明は、請求項11に記載の情報処理装置において、前記専用ローダは、前記MBRに予め格納されていたブートストラップローダが書き替えられたものであることを特徴とする。この構成によれば、BIOSが起動され、次いでMBRの専用ローダが起動されることによって、管理ファイルが最初に主メモリに読み出され、CPUの制御が管理ファイルに渡されることになる。   According to a twelfth aspect of the present invention, in the information processing apparatus according to the eleventh aspect, the dedicated loader is obtained by rewriting a bootstrap loader previously stored in the MBR. According to this configuration, when the BIOS is activated and then the MBR dedicated loader is activated, the management file is first read into the main memory, and the control of the CPU is transferred to the management file.

本発明によれば、ハードディスクに格納されている、マルウエアの監視を行う管理ファイルをマルウエアから見えないようにすることで、高いセキュリティを維持することができる。   According to the present invention, it is possible to maintain high security by making the management file stored in the hard disk for monitoring the malware invisible to the malware.

本発明に係る情報処理装置が適用される端末1及びインストーラ(2B)のインストール時に要求される機能を説明するためのブロック図である。It is a block diagram for demonstrating the function requested | required at the time of installation of the terminal 1 and the installer (2B) to which the information processing apparatus which concerns on this invention is applied. 主にハードディスクへのインストーラ(2A),(2B)によるインストールの手順を説明する図で、図2(A)は端末が組み付けられた状態(乃至は出荷時の状態)のメモリマップ、図2(B)はインストーラ(2A)によるインストール後のメモリマップ、図2(C)はインストーラ(2B)によるインストール後のメモリマップである。FIG. 2A is a diagram for explaining an installation procedure mainly using installers (2A) and (2B) on a hard disk. FIG. 2A is a memory map in a state where a terminal is assembled (or a state at the time of shipment), and FIG. B) is a memory map after installation by the installer (2A), and FIG. 2C is a memory map after installation by the installer (2B). インストーラ(2B)のプログラムに従ってCPUが実行する、管理ファイルのインストール処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the installation process of a management file which CPU performs according to the program of an installer (2B). 図3の「初期設定」のサブルーチンである。This is the “initial setting” subroutine of FIG. 図3の「インストール実行」のサブルーチンである。This is a subroutine of “execution execution” in FIG. CPUによって実行される端末の起動から動作中における機能を説明するブロック図である。It is a block diagram explaining the function in operation | movement from starting of the terminal performed by CPU. RAM及びチップセットのメモリマップである。It is a memory map of RAM and a chipset. RAM及びチップセットのメモリマップである。It is a memory map of RAM and a chipset. RAM及びチップセットのメモリマップである。It is a memory map of RAM and a chipset. 端末のCPUによって実行される起動処理の手順を説明するフローチャートである。It is a flowchart explaining the procedure of the starting process performed by CPU of a terminal. 情報の格納箇所を示すGDTの全体概要を示している。An overall outline of GDT indicating a storage location of information is shown. PTEのメモリマップを示す。The memory map of PTE is shown. リニアアドレスから物理アドレスに変換する変換方法を図で示したものである。A conversion method for converting a linear address to a physical address is shown in the figure. プロテクトモードにおけるリニアアドレスと物理アドレスとの関係の一例を示すものである。It shows an example of the relationship between the linear address and the physical address in the protect mode. CPUによって実行される、OSブート後における管理ファイルの処理を示すフローチャートである。It is a flowchart which shows the process of the management file after OS boot performed by CPU. フック機能のうち、I/Oポートを経由する場合の実施形態を説明するための機能構成図である。It is a functional block diagram for demonstrating embodiment in the case of passing through an I / O port among hook functions. フック処理Iの流れを説明するフローチャートである。It is a flowchart explaining the flow of the hook process I. 割込処理Iの流れを説明するフローチャートを示す。The flowchart explaining the flow of the interruption process I is shown. MMIOを経由する場合の実施形態を説明するための機能構成図である。It is a functional block diagram for demonstrating embodiment in the case of going through MMIO. フック処理IIの流れを説明するフローチャートである。It is a flowchart explaining the flow of the hook process II. 割込処理IIの流れを説明するフローチャートを示す。The flowchart explaining the flow of the interruption process II is shown. フック処理IIIの流れを説明するフローチャートである。It is a flowchart explaining the flow of the hook process III. フック処理IVの流れを説明するフローチャートである。It is a flowchart explaining the flow of the hook process IV. (A)(B)は、特定アプリケーションのRAMへのロードを説明するための図である。(A) (B) is a figure for demonstrating loading to RAM of a specific application. 管理ファイル環境の下での特定アプリケーションの実行方法を説明するための図である。It is a figure for demonstrating the execution method of the specific application under a management file environment. CPUによって実行される特定アプリケーションの実行手順を説明するフローチャートである。It is a flowchart explaining the execution procedure of the specific application performed by CPU.

図1は、本発明に係る情報処理装置が適用される端末1及びインストーラ(2B)のインストール時に要求される機能を説明するためのブロック図である。図2は、主にハードディスクへのインストーラ(2A),(2B)によるインストールの手順を説明する図で、図2(A)は端末が組み付けられた状態(乃至は出荷時の状態)のメモリマップ、図2(B)はインストーラ(2A)によるインストール後のメモリマップ、図2(C)はインストーラ(2B)によるインストール後のメモリマップである。なお、図2(A)〜(C)の右部には、メモリチップ11A及びMBR(Master Boot Record)110の内容が示されている。   FIG. 1 is a block diagram for explaining functions required when installing a terminal 1 and an installer (2B) to which an information processing apparatus according to the present invention is applied. FIG. 2 is a diagram for explaining an installation procedure mainly using installers (2A) and (2B) on a hard disk, and FIG. 2 (A) is a memory map in a state where a terminal is assembled (or a state at the time of shipment). 2B is a memory map after installation by the installer (2A), and FIG. 2C is a memory map after installation by the installer (2B). 2A to 2C show the contents of the memory chip 11A and the MBR (Master Boot Record) 110.

図1において、端末1は、制御手段としてのCPU(Central Processing Unit)10を有する。CPU10は、HD(Hard Disc)11及び主メモリであるRAM(RandomAccess Memory)12に接続されている。HD11は、所定の記憶容量、例えば数百GBを有し、セクタ(Sector:512Byte/track)単位でデータの書き込みが行われる。端末1は、セットアップなどによって、HD11に、少なくともOS(Operating System)やAP(application program)のファイルが書き込まれ、その一例は、後述する図2のメモリマップに示されている。RAM12は、HD11から読み出されるファイル、処理途中の情報を一時的に格納するもので、所定の記憶容量、例えば4GBを有する。   In FIG. 1, the terminal 1 has a CPU (Central Processing Unit) 10 as control means. The CPU 10 is connected to an HD (Hard Disc) 11 and a main memory RAM (Random Access Memory) 12. The HD 11 has a predetermined storage capacity, for example, several hundred GB, and data is written in units of sectors (Sector: 512 Byte / track). The terminal 1 writes at least an OS (Operating System) and an AP (application program) file to the HD 11 by setup or the like, and an example thereof is shown in a memory map of FIG. The RAM 12 temporarily stores files read from the HD 11 and information in the middle of processing, and has a predetermined storage capacity, for example, 4 GB.

メモリチップ11Aは、HD11と対応付けて設けられているもので、HD11に関連する情報が書き込まれている。メモリチップ11Aに書き込まれている、HD11に関連する情報としては、図2に示すように、HD11の型番、HD11の記憶容量である総容量(総LBA:Logical Block Addressing)が少なくとも含まれ、必要に応じて品質データ、入出力特性データが含まれ、さらにHD11へのアクセスのログデータも含まれる。メモリチップ11AはROM(Read Only Memory)でもよいし、ログデータ等が更新的に書き込みされる態様では書き込み可能なROMが採用される。   The memory chip 11A is provided in association with the HD 11, and information related to the HD 11 is written therein. As shown in FIG. 2, the information related to HD11 written in the memory chip 11A includes at least the model number of HD11 and the total capacity (total LBA: Logical Block Addressing) that is the storage capacity of HD11. Accordingly, quality data and input / output characteristic data are included, and log data for accessing the HD 11 is also included. The memory chip 11A may be a ROM (Read Only Memory), and a writable ROM is adopted in a mode in which log data and the like are written in an update manner.

また、CPU10には、操作者が必要な指令や情報を入力するテンキーを有するキーボードやマウス等を備える操作部13、及び入力情報の確認のための表示や通信内容を表示する表示部14が接続されている。   Connected to the CPU 10 are an operation unit 13 including a keyboard and a mouse having a numeric keypad for inputting necessary commands and information by an operator, and a display unit 14 for displaying input information and displaying communication contents. Has been.

インストーラ(2B)は、使用可能な状態に設定するセットアップの処理がなされた端末1に、あるいはセットアップ処理と連動して端末1に所定のファイルをインストールするためのもので、CDROM等のファイル記憶媒体である。インストーラ(2B)は、情報処理部1の外部デバイス接続ポート10Pに装着(接続)されて、格納データであるファイルを端末1に書き込む処理を行う。   The installer (2B) is for installing a predetermined file in the terminal 1 that has undergone the setup process for setting it to a usable state or in conjunction with the setup process, and is a file storage medium such as a CDROM. It is. The installer (2B) is attached (connected) to the external device connection port 10P of the information processing unit 1 and performs a process of writing a file as stored data to the terminal 1.

また、インストーラ(2B)は、起動プログラムメモリ21、インストールプログラムメモリ22、専用ローダメモリ23、及び管理ファイルメモリ24を少なくとも有している。起動プログラムメモリ21は、接続された端末1を起動させるための起動プログラムが格納されたメモリである。インストールプログラムメモリ22は、起動した端末1に対してファイルのインストール動作を実行させるインストールプログラムが格納されたメモリである。   The installer (2B) has at least a startup program memory 21, an installation program memory 22, a dedicated loader memory 23, and a management file memory 24. The activation program memory 21 is a memory that stores an activation program for activating the connected terminal 1. The installation program memory 22 is a memory that stores an installation program that causes the activated terminal 1 to execute a file installation operation.

専用ローダメモリ23及び管理ファイルメモリ24は、インストールプログラムによってHD11に書き込まれるファイルが格納されたメモリである。専用ローダはRAM12の後述する起動メモリ領域120に展開されるものである。なお、専用ローダは、起動メモリ領域120の全域を一旦リセットして書き込まれることが好ましく、ローダとして機能するプログラム部分と、起動メモリ領域120に相当する1MB分の転送データを作成するために補充されたダミーデータ等を適宜含む。あるいは、専用ローダは、RAM12の起動メモリ領域120内に展開されるプログラム部分と、プログラム部分の展開領域を除く、RAM12の全域にダミーデータでリセットする態様でもよい。このリセット処理により、RAM12に先に読み込まれたBIOSを削除することになるため、仮にBIOS内にマルウエアが潜伏していても、これを除去できる。専用ローダメモリ23は、端末1の起動時に、HD11内の他のファイルよりも管理ファイルを優先してHD11からRAM12にインストールする等の処理を行うプログラムが格納されたメモリである。管理ファイルメモリ24は、後述するように特定のアクセスに対して対応する処理を実行する、監視用等のプログラムが格納されたメモリである。   The dedicated loader memory 23 and the management file memory 24 are memories in which files to be written to the HD 11 by the installation program are stored. The dedicated loader is expanded in a boot memory area 120 (to be described later) of the RAM 12. The dedicated loader is preferably written once after resetting the entire start memory area 120, and is supplemented to create a program part that functions as a loader and 1 MB of transfer data corresponding to the start memory area 120. Including dummy data. Alternatively, the dedicated loader may be configured to reset the entire area of the RAM 12 with dummy data except for the program part developed in the activation memory area 120 of the RAM 12 and the development area of the program part. By this reset process, the BIOS read in the RAM 12 first is deleted. Therefore, even if malware is hidden in the BIOS, it can be removed. The dedicated loader memory 23 is a memory that stores a program for performing processing such as installing the management file from the HD 11 to the RAM 12 with priority over other files in the HD 11 when the terminal 1 is activated. As will be described later, the management file memory 24 is a memory storing a program for monitoring or the like that executes processing corresponding to a specific access.

CPU10は、接続されたインストーラ(2B)の起動プログラムメモリ21、インストールプログラムメモリ22から起動プログラム、インストールプログラムをRAM12に取り込んで実行することで、起動処理部1001、インストール処理部1002、及び操作受付部1003として機能する。起動処理部1001は、インストーラ(2B)を接続ポート10Pに接続した状態で、図略の起動スイッチをオンすると、外部デバイスであるインストーラ(2B)を優先して選択し(あるいは優先順をマニュアル設定して)、起動プログラムメモリ21から起動プログラムを取り込むものである。インストール処理部1002は、起動処理に引き続いてインストールプログラムメモリ22からインストールプログラムを取り込み、当該インストールプログラムを実行させるものである。操作受付部1003は、操作部13を介して入力される操作者からの指示を受け付けるものである。   The CPU 10 loads the startup program and the installation program from the startup program memory 21 and the installation program memory 22 of the connected installer (2B) into the RAM 12 and executes them, thereby executing the startup processing unit 1001, the installation processing unit 1002, and the operation receiving unit. It functions as 1003. When the activation switch (not shown) is turned on with the installer (2B) connected to the connection port 10P, the activation processing unit 1001 preferentially selects the installer (2B) that is an external device (or manually sets the priority order). In this case, the activation program is fetched from the activation program memory 21. The installation processing unit 1002 fetches an installation program from the installation program memory 22 following the startup process, and executes the installation program. The operation receiving unit 1003 receives an instruction from the operator input via the operation unit 13.

図2においては、HD11の記憶容量を、セクタ数で表している。ここでは、説明の便宜上、その全セクタ数を100,000(すなわち、総LBA100,000)とする。図2(A)に示す、出荷時の状態のメモリマップでは、メモリチップ11Aに、対となるHD11の属性(HDの型番、総LBA等)が書き込まれている。   In FIG. 2, the storage capacity of the HD 11 is represented by the number of sectors. Here, for convenience of explanation, it is assumed that the total number of sectors is 100,000 (that is, total LBA 100,000). In the memory map at the time of shipment shown in FIG. 2A, a pair of HD11 attributes (HD model number, total LBA, etc.) are written in the memory chip 11A.

図2(B)に示す、インストーラ(2A)によるインストール(あるいはセットアップ)後のメモリマップでは、インストーラ(2A)によって、HD11の先頭部分のセクタ領域に、図2(B)の例では、LBA0にMBR110(Master Boot Record)の書き込み領域が設定され、さらに、MBR110より後方側の領域が複数のパーティションに区分けされて、所定のファイルが書き込まれている。パーティションは所定数、例えば最大で4個まで区分けが可能である。ここでは、パーティション(1)に第1のOSが、パーティション(2)に第2のOSが、パーティション(3)に必要なデータ類がインストールされている。また、第1のOS、第2のOSの環境で動作する各アプリケーションプログラムファイル(AP)も対応するパーティション内に書き込まれている。また、説明の便宜上、パーティションの区分けは、パーティション(1)の領域がLBA1〜LBA49,999であり、パーティション(2)の領域がLBA50,000〜LBA69,999であり、パーティション(3)の領域がLBA70,000〜LBA100,000であるとする。   In the memory map after installation (or setup) by the installer (2A) shown in FIG. 2 (B), the installer (2A) sets the sector area at the head of the HD 11 to LBA0 in the example of FIG. 2 (B). An MBR 110 (Master Boot Record) writing area is set, and an area behind the MBR 110 is divided into a plurality of partitions, and a predetermined file is written therein. The partition can be divided into a predetermined number, for example, up to four. Here, the first OS is installed in the partition (1), the second OS is installed in the partition (2), and data necessary for the partition (3) is installed. Each application program file (AP) operating in the environment of the first OS and the second OS is also written in the corresponding partition. Further, for convenience of explanation, the partition is divided such that the area of partition (1) is LBA1 to LBA49,999, the area of partition (2) is LBA50,000 to LBA69,999, and the area of partition (3) is Let LBA be 70,000 to LBA 100,000.

また、MBR110は、端末1のブート時に、アクティブパーティションを検索して起動するためのプログラムコード(BSL:Boot Strap Loader)を有し、さらにパーティションテーブル(PT)111を有する。パーティションテーブルPT111は、図2(B)のように区分けされた各パーティション(1)〜(3)についての開始LBA、終了LBA、その他のデータをそれぞれ記憶するものである。なお、パーティションテーブルPT111の各パーティション(1)〜(3)のテーブル内には、開始LBA、終了LBAの他、アクティブフラグの有無、パーティションタイプ、パーティションサイズのデータも含まれる。ところで、パーティションの開始位置、終了位置をセクタ番号で表記する方式としてCSH方式もあるが、開始位置、終了位置のセクタ番号で記述する点においてLBA式と同様である。また、通常は、アクティブフラグはパーティション(1)に対応するテーブルに設定されており、従って、端末1のブート時には、パーティション(1)の第1のOSか、あるいはパーティション(2)の第2のOSが選択的にRAM12に展開され、次いで必要に応じてパーティション(3)のデータの順で、RAM12に展開される。   Further, the MBR 110 has a program code (BSL: Boot Strap Loader) for searching and starting an active partition when the terminal 1 is booted, and further has a partition table (PT) 111. The partition table PT111 stores the start LBA, end LBA, and other data for each of the partitions (1) to (3) divided as shown in FIG. In addition, the tables of the partitions (1) to (3) of the partition table PT111 include data of presence / absence of active flag, partition type, and partition size in addition to the start LBA and end LBA. By the way, there is a CSH method as a method of expressing the start position and end position of a partition by a sector number, but it is the same as the LBA method in that it is described by the sector number of the start position and end position. Normally, the active flag is set in a table corresponding to the partition (1). Therefore, when the terminal 1 is booted, the first OS of the partition (1) or the second OS of the partition (2) is set. The OS is selectively expanded in the RAM 12, and then expanded in the RAM 12 in the order of the data of the partition (3) as necessary.

図2(C)に示す、インストーラ(2B)によるインストール処理は、管理ファイル等をインストールする。図2(B)と比べると、パーティション(3)の後方に管理ファイルがインストールされており、さらに、MBR110内のブートストラップローダ(BSL)が専用ローダに書き替えられている。管理ファイルをインストールする領域は、図2(C)の例では、LBA90,000〜LBA100,000となっている。従って、パーティション(3)の領域は、図2(B)では、LBA70,000〜LBA100,000であるのに対して、図2(C)では、LBA70,000〜LBA89,999となる。そして、この変更に応じて、パーティションテーブルPT111内のパーティション(3)のテーブル内容のうち、終了LBAは、LBA89,999に書き替えられている。この管理ファイルがインストールされるために準備される領域を、ここでは「空き領域」という。なお、図2(C)に示すように、「空き領域」内には、図2(B)で示した、MBR110内のブートストラップローダBSLが保管されている。この保管処理によって、ブートストラップローダBSLを専用ローダに代えてMBR110に戻すことが可能となる(すなわち、図2(B)のセットアップ状態で端末を使用する環境に戻すことが可能となる。)。   The installation process by the installer (2B) shown in FIG. 2C installs a management file or the like. Compared to FIG. 2B, the management file is installed behind the partition (3), and the bootstrap loader (BSL) in the MBR 110 is rewritten to a dedicated loader. The area for installing the management file is LBA 90,000 to LBA 100,000 in the example of FIG. Therefore, the area of the partition (3) is LBA70,000 to LBA100,000 in FIG. 2B, whereas it is LBA70,000 to LBA89,999 in FIG. In accordance with this change, the end LBA of the table contents of the partition (3) in the partition table PT111 is rewritten as LBA89,999. The area prepared for installing the management file is referred to as “free area” here. As shown in FIG. 2C, the “empty area” stores the bootstrap loader BSL in the MBR 110 shown in FIG. 2B. By this storage process, the bootstrap loader BSL can be returned to the MBR 110 instead of the dedicated loader (that is, it is possible to return to the environment in which the terminal is used in the setup state of FIG. 2B).

図3は、インストーラ(2B)のプログラムに従ってCPU10が実行する、管理ファイルのインストール処理の手順を示すフローチャートである。   FIG. 3 is a flowchart showing a management file installation process executed by the CPU 10 in accordance with the installer (2B) program.

まず、インストーラ(2B)が端末1に接続されて、起動スイッチがオンされると(あるいは自動起動されると)、次いでインストーラ(2B)が起動したかどうかが判断される(ステップS1)。インストーラ(2B)の起動に引き続いて、インストールのための初期設定が実行され(ステップS3)、続いてインストールが実行される(ステップS5)。なお、ステップS1において、インストーラ(2B)が起動するまでを監視してもよいし、所定時間経過して起動が確認できなければ、本フローを抜けるようにしてもよい。   First, when the installer (2B) is connected to the terminal 1 and the activation switch is turned on (or automatically activated), it is then determined whether or not the installer (2B) has been activated (step S1). Subsequent to the activation of the installer (2B), initial setting for installation is executed (step S3), and then installation is executed (step S5). In step S1, it is possible to monitor until the installer (2B) is activated, or if the activation is not confirmed after a predetermined time has elapsed, this flow may be exited.

図4は、「初期設定」のサブルーチンであり、図5は「インストール実行」のサブルーチンである。図4において、まず、インストール処理部1002は、メモリチップ11Aから総LBAを、またMBR110内のパーティションテーブルPT111から最終パーティション(図2では、パーティション(3)に該当)の終了LBAを取得する(ステップS11)。次いで、インストール処理部1002は、最終パーティションの終了LBAから先頭側に所定LBA分だけ「空き領域」を作成する(ステップS13)。「空き領域」は、管理ファイルがインストールされ、かつ必要に応じて退避されるブートストラップローダBSLが格納可能な記憶容量を有する。ここでは、図2(C)に例示するように、LBA90,000〜LBA100,000のサイズが設定されている。   FIG. 4 is an “initial setting” subroutine, and FIG. 5 is an “installation execution” subroutine. In FIG. 4, first, the installation processing unit 1002 acquires the total LBA from the memory chip 11A, and the end LBA of the final partition (corresponding to the partition (3) in FIG. 2) from the partition table PT111 in the MBR 110 (step S11). Next, the installation processing unit 1002 creates “free space” by a predetermined LBA from the end LBA of the last partition to the head side (step S13). The “free area” has a storage capacity in which the bootstrap loader BSL in which the management file is installed and saved as necessary is stored. Here, as illustrated in FIG. 2C, sizes of LBA 90,000 to LBA 100,000 are set.

なお、各パーティションのサイズは予め余裕を持って区分けされていることから、それらの後方部分は一般的にはデータはなく、大きく空いている。従って、最終パーティションの後方側の一部分に強制的に空き領域を形成することは可能である。仮に、「空き領域」を形成する対象領域にデータが存在しているような場合(あるいは対象領域にデータが存在しているか否かを検知することなく、一律に)、公知のデフラグ処理を1回乃至は必要回数だけ繰り返すことで、「空き領域」を確保することは可能である。なお、デフラグ処理とは、デフラグ用のプログラムファイルを実行することで行われる処理で、パーティション内のファイルを先頭側から再配置し、断片的な隙間領域を解消する処理をいう。HD11内において、ファイルの書き込みと読み出しを繰り返し行うと、ファイルの配置が、パーティション内で不連続になり、細分化された隙間スペースが散在的に生じ得る。このような隙間スペースの細分化が進行すると、連続した空き領域が確保できなくなるため、かかる状態を放置すると、新たなファイルは、これを分割して2個以上の隙間スペースに分けて保存するといったような状況が発生する可能性が出てくる。そして、これは、読み書き速度の低下等、情報処理品質を低下させる。デフラグ処理は、かかる問題を解消するものであり、かつ、これによって隙間スペースをパーティションの後方に、空き領域としてまとめることができる。   In addition, since the size of each partition is divided with a margin in advance, the rear portion thereof is generally free of data and is largely free. Therefore, it is possible to forcibly form an empty area in a part on the rear side of the final partition. If there is data in the target area forming the “free area” (or evenly without detecting whether the data exists in the target area), a known defragmentation process is performed by 1 It is possible to secure an “empty area” by repeating the number of times or as many times as necessary. The defragmentation process is a process performed by executing a program file for defragmentation, and means a process for relocating a file in a partition from the head side and eliminating a fragmentary gap area. If file writing and reading are repeated in the HD 11, the file arrangement becomes discontinuous within the partition, and fragmented gap spaces may be scattered. If the gap space is further subdivided, a continuous free area cannot be secured. If this state is left as it is, a new file is divided and stored in two or more gap spaces. Such a situation may occur. This degrades information processing quality, such as a decrease in read / write speed. The defragmentation process solves such a problem, and this makes it possible to collect the gap space as an empty area behind the partition.

図5において、まず、「空き領域」の先頭のLBA以降の所定位置にMBR110内のブートストラップローダBSLが書き込まれ、退避処理が行われる(ステップS21)。次いで、最終パーティションの終了LBAが空き領域分だけ減算され、この減算値が新たな終了LBAとして、MBR110内のパーティションテーブルPT111の該当するテーブルに更新される(ステップS23)。この処理によって、図2(B),(C)の例では、パーティション(3)の最終パーティションはLBA89,999と記述され、この結果、パーティション(3)内のデータに対する第1、第2のOSからのアクセスは、パーティションテーブルPT111を参照することで、LBA70,000〜LBA89,999の領域内に制限されることになる。   In FIG. 5, first, the bootstrap loader BSL in the MBR 110 is written at a predetermined position after the first LBA of the “free area”, and a save process is performed (step S21). Next, the end LBA of the last partition is subtracted by the empty area, and this subtraction value is updated as a new end LBA to the corresponding table in the partition table PT111 in the MBR 110 (step S23). With this processing, in the example of FIGS. 2B and 2C, the last partition of the partition (3) is described as LBA89,999, and as a result, the first and second OSs for the data in the partition (3) Access from is restricted within the area of LBA70,000 to LBA89,999 by referring to the partition table PT111.

続いて、インストーラ(2B)の管理ファイルメモリ24から管理ファイルが読み出され、「空き領域」の所定のセクタから、例えば先頭のLBAからインストールされる(ステップS25)。次いで、インストーラ(2B)の専用ローダメモリ23から専用ローダが読み出され、MBR110内のブートストラップローダBSLに代えて書き込まれる(ステップS27)。   Subsequently, the management file is read from the management file memory 24 of the installer (2B), and is installed from a predetermined sector of “free area”, for example, from the head LBA (step S25). Next, the dedicated loader is read from the dedicated loader memory 23 of the installer (2B) and written in place of the bootstrap loader BSL in the MBR 110 (step S27).

専用ローダは、端末1がブートされる場合に、HD11内の所定セクタにインストールされた管理ファイルを優先してRAM12に読み出す指示を行うものである。管理ファイルの内容は後述するが、管理ファイルのRAM12への読み出しが終了すると、管理ファイル内に含まれるローダプログラムによって第1のOS、又は第2のOS、必要なデータ類が順番にRAM12に読み出される。そして、RAM12への読み出し処理が終了すると、管理ファイルは本来の管理処理を開始する。なお、管理ファイルによって、第1のOS、又は第2のOS、必要なデータ類がRAM12に読み出される態様では、管理ファイルのRAM12への読み出し終了後、専用ローダから管理ファイルへ制御が受け渡されればよい。   The dedicated loader gives an instruction to preferentially read the management file installed in a predetermined sector in the HD 11 to the RAM 12 when the terminal 1 is booted. Although the contents of the management file will be described later, when reading of the management file to the RAM 12 is completed, the first OS, the second OS, and necessary data are sequentially read to the RAM 12 by the loader program included in the management file. It is. When the reading process to the RAM 12 is completed, the management file starts the original management process. In the mode in which the first OS or the second OS and necessary data are read to the RAM 12 by the management file, control is transferred from the dedicated loader to the management file after the management file is read to the RAM 12. Just do it.

図6は、CPU10によって実行される端末1の起動から動作中における機能を説明するブロック図である。図6において、CPU10は、HD11からRAM12に読み出されたプログラムを実行することによって、端末1の起動を制御する起動処理部101、操作部13を経由して入力される操作内容を受け付ける操作受付処理部102、操作部13からの操作内容及び情報処理プログラム等に従って情報処理を実行する情報処理部103、表示部14に表示する画像を作成する表示処理部104、管理ファイル(のプログラム)によって実行される管理処理部105、及びNIC(Network Interface Card)15を経由して外部ネットワーク(典型的にはインターネット)経由で他の情報処理装置である端末と通信する通信処理部106として機能する。   FIG. 6 is a block diagram for explaining functions during operation from the startup of the terminal 1 executed by the CPU 10. In FIG. 6, the CPU 10 executes a program read from the HD 11 to the RAM 12, thereby accepting an operation content that is input via the activation processing unit 101 that controls the activation of the terminal 1 and the operation unit 13. Executed by the processing unit 102, the information processing unit 103 that executes information processing according to the operation content from the operation unit 13 and the information processing program, the display processing unit 104 that creates an image to be displayed on the display unit 14, and the management file And a communication processing unit 106 that communicates with a terminal that is another information processing apparatus via an external network (typically the Internet) via a management processing unit 105 and a NIC (Network Interface Card) 15.

なお、図1はインストールに必要な構成を示したが、端末1は、図6に示すように、さらにBIOS(Basic Input/Output System)が書き込まれるBIOSメモリ11Bを有している。BIOSメモリ11Bは、ROM乃至はフラッシュROMで構成され、内部には、端末1をブートするプログラム(BIOS)が書き込まれている。BIOSは、MBR110内の専用ローダを優先的に指定し、ブートするように設定されている。   Although FIG. 1 shows a configuration necessary for installation, the terminal 1 further has a BIOS memory 11B in which a BIOS (Basic Input / Output System) is written, as shown in FIG. The BIOS memory 11B is composed of a ROM or a flash ROM, and a program (BIOS) for booting the terminal 1 is written therein. The BIOS is set to preferentially designate a dedicated loader in the MBR 110 and boot.

起動処理部101は、専用ローダ処理部1011、管理ファイル動作環境設定部1012、及びOSローダ処理部1013を備えている。専用ローダ処理部1011は、端末1の起動スイッチが投入(電源オン)された後、BIOSを起動させてMBR110内の専用ローダを読み出し、次いでこの専用ローダに制御を渡すことで、専用ローダによる処理を実行するものである。管理ファイル動作環境設定部1012は、管理ファイルがRAM12に展開された後に、専用ローダの一部あるいは管理ファイルの一部のプログラムによってRAM12内の特定の領域に高い特権レベル(後述する)を設定するものである。OSローダ処理部1013は、管理ファイルの動作環境が設定された状態で、すなわち、管理ファイルによる後述の監視の下での、第1のOS、第2のOS、必要なデータ類の読み出しを行うものである。   The activation processing unit 101 includes a dedicated loader processing unit 1011, a management file operation environment setting unit 1012, and an OS loader processing unit 1013. After the start switch of the terminal 1 is turned on (powered on), the dedicated loader processing unit 1011 starts the BIOS, reads the dedicated loader in the MBR 110, and then passes control to the dedicated loader, thereby processing by the dedicated loader. Is to execute. The management file operation environment setting unit 1012 sets a high privilege level (described later) in a specific area in the RAM 12 by a program of a part of the dedicated loader or a part of the management file after the management file is expanded in the RAM 12. Is. The OS loader processing unit 1013 reads out the first OS, the second OS, and necessary data in a state where the operating environment of the management file is set, that is, under monitoring described later by the management file. Is.

情報処理部103は、第1、第2のOSの動作環境で実行される各種のアプリケーションプログラムを利用して、操作部13からの操作内容を受け付けて、所望の情報処理を実行するものである。情報処理としては、例えば、文書や図形の作成ソフトウエアを利用しての情報の作成、加工、記憶、さらにはNIC15及びネットワーク(典型的にはインターネット)を経由して行う情報の送受信等が想定される。表示処理部104は、作成、加工された情報や送受信に関する情報の表示部14への表示制御を行うものである。管理部105は、管理ファイルによる各種のアクセスの監視、及び本発明に関連するメモリチップ11Aへのアクセスに対応するフック処理を行うもので、詳細は後述する。通信処理部106は、NIC15を介してネットワーク上に接続されている他の端末、各種の情報を格納したデータサーバ等との間で情報の送受信を行わせるものである。   The information processing unit 103 uses the various application programs executed in the operating environments of the first and second OSs, receives operation contents from the operation unit 13 and executes desired information processing. . As information processing, for example, creation, processing, and storage of information using document or graphic creation software, and transmission / reception of information performed via the NIC 15 and a network (typically the Internet) are assumed. Is done. The display processing unit 104 performs display control on the display unit 14 of information created and processed and information related to transmission and reception. The management unit 105 performs monitoring of various accesses by the management file and hook processing corresponding to access to the memory chip 11A related to the present invention, and details will be described later. The communication processing unit 106 transmits / receives information to / from other terminals connected to the network via the NIC 15, a data server storing various information, and the like.

図7〜図9は、BIOSのロードからOSの動作監視までのRAM12のメモリマップの変遷を示す図である。図7に示すように、本実施形態では、RAM12は4GBの容量を有し、HD11から読み込まれるファイルを、0MB〜1MBの起動メモリ領域120、1MB〜100MBの領域、100MB以上の領域に分けて書き込むようにしている。なお、領域の区分けは上記の位置、サイズに限定されず、適宜の区分け態様が採用可能である。   7 to 9 are diagrams showing the transition of the memory map of the RAM 12 from the BIOS loading to the OS operation monitoring. As shown in FIG. 7, in this embodiment, the RAM 12 has a capacity of 4 GB, and files read from the HD 11 are divided into a startup memory area 120 of 0 MB to 1 MB, an area of 1 MB to 100 MB, and an area of 100 MB or more. I try to write. The area division is not limited to the above position and size, and an appropriate division mode can be adopted.

図7には、RAM12とチップセットとが示されている。チップセットは、図略のマザーボードを構成する主要部品で、CPU10や各種レジスタ群等、マザーボードに繋がっているあらゆる部品間のデータのやり取りをコントロールするものである。RAM12は、複数の領域に分けて示してあり、0MB〜1MBの起動メモリ領域120に、BIOS121、専用ローダ122、一時的GDT(Global Descriptor Table)123が展開されている。端末1が起動されると、BIOS121がBIOSメモリ11BからRAM12の0MB〜1MBの起動メモリ領域120に展開され、次いで、専用ローダ122がHD11から読み出される。専用ローダ122は、前述したように、起動メモリ領域120全域を書き替えることができ、この場合には、いわばリセット(クリア)処理が施されることになり、同時にBIOS121も消去される。なお、RAM12全域をリセットする態様でもよい。これらにより、RAM12はクリア以前のファイルが全て消去されることになる。   FIG. 7 shows the RAM 12 and the chip set. The chip set is a main part constituting a mother board (not shown), and controls data exchange between all parts connected to the mother board such as the CPU 10 and various register groups. The RAM 12 is divided into a plurality of areas, and a BIOS 121, a dedicated loader 122, and a temporary GDT (Global Descriptor Table) 123 are expanded in a startup memory area 120 of 0 MB to 1 MB. When the terminal 1 is activated, the BIOS 121 is expanded from the BIOS memory 11B to the activation memory area 120 of 0 to 1 MB in the RAM 12, and then the dedicated loader 122 is read from the HD 11. As described above, the dedicated loader 122 can rewrite the entire activation memory area 120. In this case, so-called reset (clear) processing is performed, and at the same time, the BIOS 121 is erased. Note that the entire RAM 12 may be reset. As a result, all the files before clearing in the RAM 12 are erased.

一時的GDT123は専用ローダ122によって作成されたもので、専用ローダ122によって1MB〜100MBに管理ファイル124をアンリアルモード(Unreal mood)でロードするためのアドレッシング用である。アンリアルモードとは、リアルモード環境においてチップセット内の図略のデータセグメントレジスタのアクセスリミットを4GBに変更することによって、データアクセスのみ1MB以上、すなわち起動メモリ領域120外に対してアクセスを可能にした特殊な状態を指す。   The temporary GDT 123 is created by the dedicated loader 122 and is used for addressing for loading the management file 124 in the Unreal mood from 1 MB to 100 MB by the dedicated loader 122. Unreal mode means that data access is only 1MB or more, that is, access to the outside of the startup memory area 120 is enabled by changing the access limit of the data segment register (not shown) in the chipset to 4 GB in the real mode environment. Refers to a special condition.

また、RAM12の1MB〜100MBの領域には管理ファイル124、管理用GDT125及び管理用IDT126が展開されている。専用ローダ処理部1011は、HD11内の管理ファイルをRAM12の1MB〜100MBの所定位置に読み込む処理及びこれに関連する処理を行う。より具体的には、専用ローダ処理部1011は、まず、RAM12の1MB〜100MBへのアクセスを可能にするための処理、例えば一時的GDT123の作成、チップセット内の各種レジスタに対する設定を行う。この場合に、管理ファイル動作環境設定部1012によって、一時的GDT123は、管理ファイル124を構成するプログラムや管理テーブルの全て(のセグメントディスプリクタ)に対して特権レベルであるDPL(Description Privilege Level)に“0”(いわゆるリング“0”)を設定することによって、管理ファイル124を1MB〜100MBの所定位置に最も高い特権レベルでロード可能にしている他、この領域に設定される情報に対して全てDPL“0”でのロードを実現している。DPLとは、公知のように、メモリ空間の特権レベルを記述するもので、DPL“0”からDPL“3”までの4ランクがある。DPL値が小さい程、特権のレベルが高い。例えば、DPL値の相対的に大きい値として記述された空間で動作するプログラムはDPL値がそれより小さい値で記述された空間側にアクセスすることはできない。すなわち、この場合は特権レベル違反として、後述する一般保護例外(#GP)あるいはページフォルト(#PF)が発行され、アクセスは無効とされる。一方、DPL値の相対的に小さい値として記述された空間で動作するプログラムはDPL値がそれより大きい値で記述された空間側にアクセスしたり閲覧したりすることができる。これによって、不適当なアクセスか否かの判断が事前に可能となる。   A management file 124, a management GDT 125, and a management IDT 126 are expanded in the 1 MB to 100 MB area of the RAM 12. The dedicated loader processing unit 1011 performs a process for reading a management file in the HD 11 into a predetermined position of 1 MB to 100 MB in the RAM 12 and a process related thereto. More specifically, the dedicated loader processing unit 1011 first performs processing for enabling access to 1 MB to 100 MB of the RAM 12, for example, creation of a temporary GDT 123 and setting for various registers in the chipset. In this case, the management file operation environment setting unit 1012 causes the temporary GDT 123 to set DPL (Description Privilege Level) which is a privilege level for all of the programs and management tables (segment descriptors) constituting the management file 124. By setting “0” (so-called ring “0”), the management file 124 can be loaded at the highest privilege level at a predetermined position of 1 MB to 100 MB, and all the information set in this area can be loaded. Load with DPL "0" is realized. As is well known, DPL describes the privilege level of the memory space, and there are four ranks from DPL “0” to DPL “3”. The smaller the DPL value, the higher the privilege level. For example, a program that operates in a space described as a relatively large value of the DPL value cannot access the space side described as a value having a smaller DPL value. That is, in this case, a general protection exception (#GP) or page fault (#PF) described later is issued as a privilege level violation, and access is invalidated. On the other hand, a program operating in a space described as a relatively small value of the DPL value can access or browse the space side where the DPL value is described as a larger value. This makes it possible to determine in advance whether or not the access is inappropriate.

また、専用ローダ処理部1011は、管理レジスタのうちのレジスタCR0に対してフラグを設定することで、1MB〜100MBの領域へのアクセスをプロテクトモードで行う他、別途、リアルモードにおいて、一時的GDT123のセグメントリミットを1M以上、ここでは4Gに設定したことで、アンリアルモードでの動作を可能としている。このアンリアルモードで、管理ファイル124がロードされ、次いで管理用GDT125がロードされ、また管理用IDT(管理用割込ベクタテーブル)126がロードされる。管理用GDT125、管理用IDT126の各セグメントディスクリプタは、当該時点で必要なテーブル部分までが予め作成されており、専用ローダ処理部1011によってロードされる。専用ローダ処理部1011は、これら必要な情報のロード後、CPU10の制御を管理ファイル124に渡す(ジャンプする)。   The dedicated loader processing unit 1011 sets a flag for the register CR0 of the management registers to access the 1 MB to 100 MB area in the protected mode, and separately in the real mode, the temporary GDT 123 The segment limit is set to 1M or more, here 4G, thereby enabling operation in the unreal mode. In this unreal mode, the management file 124 is loaded, then the management GDT 125 is loaded, and the management IDT (management interrupt vector table) 126 is loaded. Each segment descriptor of the management GDT 125 and the management IDT 126 is created in advance up to the table portion required at that time, and is loaded by the dedicated loader processing unit 1011. The dedicated loader processing unit 1011 passes the control of the CPU 10 to the management file 124 (jumps) after loading the necessary information.

図8は、1MB〜100MBの領域にTSS127、PTE(Page Table Entry)128及び管理用割込ハンドラ129が作成された状態のメモリマップである。また、図には示していないが、必要に応じてタスク毎のLDT(Local Descriptor Table)が作成される。管理ファイル動作環境設定部1012は、また、管理ファイル124のプログラムによって、TSS127、PTE(Page Table Entry)128、管理用割込ハンドラ129及び必要なLDTを作成する。なお、TSS127及びPTE128は、後述するように、101MB以上で動作するタスク(主に、HD11からのOSのロード)を監視するための管理用(プロテクト)モード用のテーブルと、100MB〜101MBで動作するタスクを監視するVM8086モード用のテーブルとを備えている。モードを図略のタスクスイッチで適宜切り替えることで、OSを構成する各プログラムのロードと当該OSの各プログラムのセグメントディスプリクタを管理用GDT125,IDT126にそれぞれ追加する処理が可能となる。   FIG. 8 is a memory map in a state in which a TSS 127, a PTE (Page Table Entry) 128, and a management interrupt handler 129 are created in an area of 1 MB to 100 MB. Although not shown in the figure, an LDT (Local Descriptor Table) for each task is created as necessary. The management file operation environment setting unit 1012 also creates a TSS 127, a PTE (Page Table Entry) 128, a management interrupt handler 129, and a necessary LDT according to the program of the management file 124. As will be described later, the TSS 127 and the PTE 128 operate in a management (protect) mode table for monitoring tasks (mainly, loading of the OS from the HD 11) operating at 101 MB or more, and operating from 100 MB to 101 MB. And a table for VM8086 mode for monitoring the task to be performed. By appropriately switching the mode with a task switch (not shown), it is possible to load each program constituting the OS and add a segment descriptor of each program of the OS to the management GDT 125 and IDT 126, respectively.

TSS127は、管理ファイル124内の各管理用のプログラム(タスク)の各々に対応付けて作成されている。すなわち、TSS127は動作状態に応じたプログラムを稼働させるべく、タスクスイッチによって必要なプログラムに実行状態を移し、かつ直前のプログラムの処理内容を対応する個々のTSSにコンテキストすることで、現状復帰を可能にしている。PTE128は、GDT125で作成されたリニアアドレスを物理アドレスに変換するためのもので、各情報(各プログラムコード、各データ、各スタック、存在フラグP)について対応して設けられている。   The TSS 127 is created in association with each management program (task) in the management file 124. In other words, the TSS 127 can return to the current state by transferring the execution state to a necessary program by a task switch and contexting the processing contents of the immediately preceding program to the corresponding TSS in order to run the program according to the operation state. I have to. The PTE 128 is for converting the linear address created by the GDT 125 into a physical address, and is provided corresponding to each piece of information (each program code, each data, each stack, and presence flag P).

ここで、図11〜図14を用いて、GDT125及びPTE128と、リニアアドレスから物理アドレスへの変換との関係を説明する。まず、端末1が起動する際のモードである16ビットのプログラムで動作するリアルモードでは、セグメント値とオフセット値とを用いてアドレスが決定され、公知のように、セグメント値を4ビットずらした値(16倍した値)にオフセット値を加算することで、最大、(1MB+64KB)までのアドレス(リニアアドレス)が直ちに物理アドレスとして算出できる。一方、それ以上のアドレスに対しては、プロテクトモードが採用されており、例えば32ビットのプログラムで動作する態様では、4GBまでアドレス指定が可能となる。なお、それぞれの情報(タスク)毎に、異なるアドレスを設定することで、仮想アドレス空間が設定できることから、情報(タスク)を所要データ量ずつに分けて、格納することが可能である。   Here, the relationship between the GDT 125 and the PTE 128 and the conversion from the linear address to the physical address will be described with reference to FIGS. First, in the real mode that operates with a 16-bit program that is a mode when the terminal 1 is activated, the address is determined using the segment value and the offset value, and, as is well known, a value obtained by shifting the segment value by 4 bits By adding the offset value to (multiplied by 16), a maximum address (linear address) up to (1 MB + 64 KB) can be immediately calculated as a physical address. On the other hand, the protect mode is adopted for addresses higher than that, and for example, in the mode of operation with a 32-bit program, it is possible to specify addresses up to 4 GB. Since a virtual address space can be set by setting a different address for each piece of information (task), the information (task) can be stored separately for each required data amount.

図11は、かかる情報格納態様に対応するもので、情報の格納箇所を示すGDT125の全体概要を示している。GDT125は、例えば8バイト単位で各情報の格納箇所を管理するセグメントディスクリプタのリストである。各セグメントディスクリプタは、4つの属性を有している。属性は、情報の「種別」(プログラムコード、データ、スタック)と、「ベースアドレス」と、「リミット」と、「DPL」である。「ベースアドレス」は、情報のRAM12内における格納基準(スタート)アドレスを示している。「リミット」は、情報のアクセス範囲を示す。DPLは、前述した特権レベルを示す。アドレッシングにおいて採用されるセグメントディスクリプタは、リニアアドレスからの変換に際して使用されるセグメントセレクタの情報を介して選択される。また、タスクのアクセスが許可されるものか否かは、アクセス要求時に、チップセット内に書き込まれたレジスタ(例えばレジスタCS,DS,SSのいずれかの)内のCPL(Current Privilege Level)及びRPL(Requested Privilege Level)と、GDT125の対応するセグメントディスクリプタとを照合することで決定される。この技術を利用し、特定のタスク(プログラム)がアクセス可能(使用可能)なメモリの領域を限定するようにすれば、他のタスク(プログラム)への干渉を防ぎ、端末1を安全かつ安定して稼働させることができる。   FIG. 11 corresponds to such an information storage mode, and shows an overall outline of the GDT 125 indicating information storage locations. The GDT 125 is a list of segment descriptors for managing the storage location of each information in units of 8 bytes, for example. Each segment descriptor has four attributes. The attributes are “type” of information (program code, data, stack), “base address”, “limit”, and “DPL”. The “base address” indicates a storage reference (start) address of information in the RAM 12. “Limit” indicates an access range of information. DPL indicates the privilege level described above. The segment descriptor adopted in the addressing is selected via the information of the segment selector used for conversion from the linear address. Whether or not task access is permitted depends on the CPL (Current Privilege Level) and RPL in the register (for example, one of the registers CS, DS, and SS) written in the chipset when the access is requested. It is determined by comparing (Requested Privilege Level) with the corresponding segment descriptor of GDT125. If this technology is used to limit the memory area that can be accessed (used) by a specific task (program), interference with other tasks (programs) can be prevented, and the terminal 1 can be made safe and stable. Can be operated.

図12は、PTEのメモリマップを示す。各ページデータは所定のデータ量、例えば4KB毎に分割されており、各ページデータは、物理アドレスとアクセス属性とが設定されている。各ページデータは、プログラムコード、データ、スタック、存在フラグPの種類が含まれる。物理アドレスは、リニアアドレスをRAM12内の所定の位置に移動させるためのものである。アクセス属性は、特権レベルに相当するもので、「スーパーバイザー」と「ユーザ」とを有する。「スーパーバイザー」は特権レベルDPL“0”〜DPL“2”に該当し、「ユーザ」は特権レベルDPL“3”に該当する。また、データに該当するページにNX−Bit(Non eXecute Bit)を保有し、当該ページからCPU10に命令コードが発行できなくする。そして、CPU10からのアクセスが特権レベル違反となる場合には、例外割込の一般保護例外(#GP)が発行され、一方、アクセス属性違反となる場合には、ページフォルト(#PF)が発行される。いずれの場合にも、割込ハンドラ129を経てアクセスを無効とする処理が実行される。なお、アクセスの無効とは、アクセス自体をシャットダウンする態様、改変された特権レベル値を正しい値に書き直す態様を含む。存在フラグPは、変換後のアドレスにデータが存在している場合か否かを存在フラグPが“0”かどうかで判断し、存在フラグPが“0”であれば、このアドレスの情報を一旦退避する処理を行うようにしている。そして、変換後のアドレスが、かかるアドレスに該当した場合に、ページフォルト(#PF)が発行されるようにしている。この機能を利用して、すなわち特定のタスク(プログラム)が動作するメモリ領域に対してページフォルトが発生するようにし、管理ファイルがフック(Hook)して、この特定のタスク(プログラム)の実行を管理ファイルの管理下で行うようにすれば、他のタスク(プログラム)からのアクセスを防ぎ、特定のタスク(プログラム)のみをメモリ上で隔離し、かつ保護することができる。   FIG. 12 shows a PTE memory map. Each page data is divided into a predetermined amount of data, for example, every 4 KB, and each page data is set with a physical address and an access attribute. Each page data includes the type of program code, data, stack, and presence flag P. The physical address is for moving the linear address to a predetermined position in the RAM 12. The access attribute corresponds to a privilege level, and has “supervisor” and “user”. “Supervisor” corresponds to privilege level DPL “0” to DPL “2”, and “user” corresponds to privilege level DPL “3”. Further, NX-Bit (None Execute Bit) is held in the page corresponding to the data, and the instruction code cannot be issued to the CPU 10 from the page. If the access from the CPU 10 violates the privilege level, an exception interrupt general protection exception (#GP) is issued. On the other hand, if the access attribute violates, a page fault (#PF) is issued. Is done. In either case, processing for invalidating access is executed via the interrupt handler 129. The invalidation of access includes a mode of shutting down access itself and a mode of rewriting a modified privilege level value to a correct value. The presence flag P determines whether or not data exists at the converted address based on whether or not the presence flag P is “0”. If the presence flag P is “0”, information on this address is stored. The evacuation process is performed once. A page fault (#PF) is issued when the converted address corresponds to the address. By using this function, that is, a page fault occurs in the memory area where a specific task (program) operates, and the management file is hooked to execute this specific task (program). If it is performed under the management of the management file, access from other tasks (programs) can be prevented, and only specific tasks (programs) can be isolated on the memory and protected.

図13は、リニアアドレスから物理アドレスに変換する変換方法を図で示したものである。CPU10で作成された、ある情報をアクセスするためのリニアアドレスは、GDT125のセグメントセレクタとベースアドレス、さらにPTE128の物理アドレスとを用いて物理アドレスに変換されることとなる。図14は、プロテクトモードにおけるリニアアドレスと物理アドレスとの関係の一例を示すものである。まず、リアルモードでは、リニアアドレスの0MB〜1MBは、物理アドレスの0MB〜1MBに対応する。この範囲は16ビット仕様であり、両者は一致する。ところで、PTE128は、後述するように管理用(100MB以下の領域)とVM8086用(100MB〜101MBの領域)とが準備される。ここでは、プロテクトモードにおける管理用のアドレッシングについて説明する。すなわち、リニアアドレスの0MB〜1MBを、物理アドレスの100MB〜101MBに対応するようにしている。このように、物理アドレスの100MB(あるいは101MBでもよい)以上の所定の値をPTE128内の管理用側のテーブルの各タスクの物理アドレスの項に設定するようにしている。この物理アドレスの設定により、PTE128のタスク(代表的にはOSのロード、あるいはOSの実行)は、全て100MB(あるいは101MB)以上の設定アドレスにロード、あるいは展開されることになる。換言すれば、PTE128によって100MB(あるいは101MB)以上のあるアドレスにページングされる結果、管理ファイル124及びGDT125、IDT126,TSS127、PTE128、割込ハンドラ129が配置されている100MB以下にアクセスされることはなく、従って、GDT125その他のテーブル内の内容の改変はできず、かつそもそも100MB以下は見えない(存在しない)ことと等価となる。   FIG. 13 is a diagram illustrating a conversion method for converting a linear address into a physical address. A linear address for accessing certain information created by the CPU 10 is converted into a physical address using the segment selector and base address of the GDT 125 and the physical address of the PTE 128. FIG. 14 shows an example of the relationship between the linear address and the physical address in the protect mode. First, in the real mode, linear addresses 0 MB to 1 MB correspond to physical addresses 0 MB to 1 MB. This range is a 16-bit specification, and they are the same. By the way, as described later, the PTE 128 is prepared for management (area of 100 MB or less) and for VM8086 (area of 100 MB to 101 MB). Here, the management addressing in the protect mode will be described. That is, the linear addresses 0 MB to 1 MB correspond to the physical addresses 100 MB to 101 MB. As described above, a predetermined value of 100 MB (or 101 MB) or more of the physical address is set in the physical address of each task in the management side table in the PTE 128. With this physical address setting, all the tasks of PTE128 (typically OS loading or OS execution) are loaded or expanded at a setting address of 100 MB (or 101 MB) or more. In other words, as a result of paging to a certain address of 100 MB (or 101 MB) or more by the PTE 128, the management file 124 and the GDT 125, IDT 126, TSS 127, PTE 128, and the interrupt handler 129 are accessed 100 MB or less. Therefore, the contents in the GDT 125 and other tables cannot be altered, and this is equivalent to the fact that 100 MB or less is not visible (does not exist) in the first place.

図14は、100MB〜101MBの領域に0MB〜1MBの専用ローダがコピーされ、及び同領域の所定位置にOS等をロードするためのOSローダ130が作成された状態、さらにその後の、OS133、必要に応じて読み出されたDATA134、及び必要に応じて読み出されたAP135の各ファイルが101MB以上の領域にロードされた状態のメモリマップである。OS133は、第1のOS、第2OSの双方あるいは選択された一方のOSのファイルを含む。100MB〜101MBへの情報の書込処理はVM8086モードで行われる。なお、VM8086モードとは、プロテクトモード実行中に、リアルモードに切り替える処理を行うと管理の煩雑さ等を考慮すれば効率が低下することから、EFLAGSレジスタのVMビットを切り替えてリアルモードのアドレス演算を行うようにし、16ビット用のプログラムを実行可能にするものである。この期間において、当該領域から0MB〜100MBの情報へのアクセスをページングによって無効にしている。   FIG. 14 shows a state in which an exclusive loader of 0 MB to 1 MB is copied to an area of 100 MB to 101 MB, and an OS loader 130 for loading an OS or the like is created in a predetermined position of the same area. This is a memory map in a state in which each file of DATA 134 read in response to the data and AP 135 read out as needed is loaded in an area of 101 MB or more. The OS 133 includes files of both the first OS and the second OS or one selected OS. The process of writing information to 100 MB to 101 MB is performed in the VM8086 mode. Note that the VM8086 mode means that if the process for switching to the real mode is performed during the execution of the protect mode, the efficiency will be reduced if the complexity of management is taken into consideration. Therefore, the VM bit of the EFLAGS register is switched to perform the address calculation in the real mode. This makes it possible to execute a 16-bit program. During this period, access to information of 0 MB to 100 MB from the area is invalidated by paging.

OSローダ処理部1013は、端末1側に読み出される0MB〜1MBの専用ローダ122をRAM12の100MB〜101MBにロードする処理、及びOSローダ130をロードする処理を行う。OSローダ130は、管理ファイル124から読み出され、あるいはMBR110から読み取ったプログラムである。   The OS loader processing unit 1013 performs a process of loading the 0 MB to 1 MB dedicated loader 122 read to the terminal 1 side into the 100 MB to 101 MB of the RAM 12 and a process of loading the OS loader 130. The OS loader 130 is a program read from the management file 124 or read from the MBR 110.

また、図9中、破線で示すOS用GDT131、OS用IDT132は、OS133が自己の挙動を記述するためのテーブルを作成したものである。   In FIG. 9, OS GDT 131 and OS IDT 132 indicated by broken lines are tables in which the OS 133 describes its own behavior.

OSローダ処理部1013は、まず、VM8086モード(すなわちCPL“3”)に設定した状態で、制御レジスタCR3に物理アドレスを設定して、OSローダ130を起動させてHD11からOS133を構成する各プログラムを順次RAM12の101MB以上の領域にロードするものである。HD11からロードされてきたOS133は、自己の動きを記述するOS用のGDTを作成するべく、チップセットのレジスタGDTRの内容を書き換えようとするLGDT要求を出す。一方、チップセットのレジスタGDTRへのアクセス(書き替え要求)はCPL“0”でのみ許可されるものであるから、管理部105は、このアクセスに対して、例外としての一般保護例外(#GP)を発行する。そして、この一般保護例外は、IDT126を介して、管理ファイル124の割込ハンドラ129に移行する。管理部105は、割込ハンドラ129を介して、プログラムカウンタを用いてCPU10が次に実行するべき命令(プログラム)の格納場所を指すレジスタEIPを参照して、不当なアクセス要求をしているプログラムのアクセスを特定し、レジスタGDTRの書き替えを禁止すると共に、当該不当なプログラムに対し、改変された特権レベルを元の値に書き直す等の割込ハンドラ処理を実行する。また、管理視部105は、この不当なプログラムをGDT125に新たなセグメントディスクリプタとして追加し、特権レベルの項目にDPL“2”を設定し、かつPTE128の管理用のテーブルに新たなページングテーブルとして追加し、物理アドレスとして少なくとも101M(あるいは100M)以上の所定のアドレス値を設定する。これにより、GDT125のアクセス権がDPL“2”に設定されることで、以後、OS側から0MB〜100MB内へのアクセスは不当アクセスとして無効にされ、かつPTE128によってOSからは100M以下の物理アドレス変換が不可能となる。   The OS loader processing unit 1013 first sets the physical address in the control register CR3 in the state set in the VM8086 mode (that is, CPL “3”), starts the OS loader 130, and configures each program that configures the OS 133 from the HD 11 Are sequentially loaded into an area of 101 MB or more in the RAM 12. The OS 133 loaded from the HD 11 issues an LGDT request to rewrite the contents of the chip set register GDTR in order to create an OS GDT describing its own motion. On the other hand, since the access (rewrite request) to the register GDTR of the chipset is permitted only with CPL “0”, the management unit 105 makes a general protection exception (#GP) as an exception to this access. ). Then, the general protection exception is transferred to the interrupt handler 129 of the management file 124 via the IDT 126. The management unit 105 refers to the register EIP indicating the storage location of the instruction (program) to be executed next by the CPU 10 using the program counter via the interrupt handler 129, and makes a program making an unauthorized access request. And the rewriting of the register GDTR is prohibited, and interrupt handler processing such as rewriting the modified privilege level to the original value is executed for the unauthorized program. In addition, the management view unit 105 adds the illegal program as a new segment descriptor to the GDT 125, sets DPL “2” in the privilege level item, and adds it as a new paging table to the management table of the PTE 128. Then, a predetermined address value of at least 101M (or 100M) or more is set as the physical address. As a result, the access right of the GDT 125 is set to DPL “2”, so that access from 0 MB to 100 MB from the OS side is invalidated as an unauthorized access, and a physical address of 100 M or less from the OS by the PTE128. Conversion is impossible.

情報処理部103は、第1のOS環境で所望するAPをHD11のパーティション(1)から読み出して実行させ、あるいは第2のOS環境で所望するAPをHD11のパーティション(2)から読み出して実行させるものである。   The information processing unit 103 reads and executes a desired AP from the partition (1) of the HD 11 in the first OS environment, or reads and executes a desired AP from the partition (2) of the HD 11 in the second OS environment. Is.

図10は、端末1のCPU10によって実行されるブート処理の手順を説明するフローチャートである。まず、端末1の電源投入後、BIOS121がRAM12に読み込まれて、BIOS処理が開始される(ステップS31)。すなわち、BIOS121が起動され、次いでPOST処理が実行される。そして、POST処理によってHD11の先頭セクタのMBR110が選択されて専用ローダ122が読み込まれる(ステップS33)。次いで、CPU10の制御が専用ローダ122に渡されて、専用ローダ122が起動され、管理ファイル124の読み込みが行われる(ステップS35)。次いで、管理ファイル動作環境設定処理が実行され、例えばRAM12の領域内に特権レベルが設定される(ステップS37)。そして、最後に、それぞれのOS133、各種のDATA134及びそれぞれのAP135がロードされる(ステップS39)。   FIG. 10 is a flowchart for explaining a procedure of boot processing executed by the CPU 10 of the terminal 1. First, after the terminal 1 is powered on, the BIOS 121 is read into the RAM 12 and the BIOS process is started (step S31). That is, the BIOS 121 is activated, and then the POST process is executed. Then, the MBR 110 of the head sector of the HD 11 is selected by the POST process, and the dedicated loader 122 is read (step S33). Next, the control of the CPU 10 is transferred to the dedicated loader 122, the dedicated loader 122 is activated, and the management file 124 is read (step S35). Next, a management file operation environment setting process is executed, and for example, a privilege level is set in the area of the RAM 12 (step S37). Finally, each OS 133, various types of DATA 134, and each AP 135 are loaded (step S39).

図15は、CPU10によって実行される、OSブート後における管理ファイル124の処理を示すフローチャートである。まず、0MB〜100MBにOS(あるいはAP)のプログラムから管理用GDT125にアクセスがなされたか否かが判断される(ステップS51)。管理用GDT125にアクセスがなければ、通常のOS(あるいはAP)処理であるとして、管理されることなく本フローを抜ける。一方、管理用GDT125にアクセスがあれば、アクセスしてきたOSの特権レベルとレジスタGDTRの特権レベルとの照合によって一般保護例が発行される(ステップS53)。そして、管理用IDT126から一般保護例外に対応する割込ハンドラ129へのジャンプが実行される(ステップS55)。その結果、割込ハンドラ129の処理が実行される(ステップS57)。ここでの割込ハンドラ129の処理は、管理用GDT125へのアクセスの拒否、あるいはアクセスされたことを想定して、正常な内容に書き直す処理を行うようにしてもよい。かかる処理によって、OS側からの管理ファイル124に対する改竄目的等の不当なアクセスを拒絶することができ、管理ファイル124がセキュアな状態に維持される。   FIG. 15 is a flowchart showing the processing of the management file 124 after the OS is booted, which is executed by the CPU 10. First, it is determined whether or not the management GDT 125 is accessed from the OS (or AP) program from 0 MB to 100 MB (step S51). If there is no access to the management GDT 125, it is assumed that it is a normal OS (or AP) process, and this flow is exited without management. On the other hand, if there is an access to the management GDT 125, a general protection example is issued by collating the privilege level of the accessed OS with the privilege level of the register GDTR (step S53). Then, a jump from the management IDT 126 to the interrupt handler 129 corresponding to the general protection exception is executed (step S55). As a result, the processing of the interrupt handler 129 is executed (step S57). The processing of the interrupt handler 129 here may be processing to rewrite the normal contents on the assumption that access to the management GDT 125 is denied or accessed. By such processing, unauthorized access to the management file 124 from the OS side such as falsification purposes can be rejected, and the management file 124 is maintained in a secure state.

続いて、図16以降において、管理ファイル124による管理処理、より具体的には、メモリチップ11Aからの情報の取り出しに対する管理処理について説明する。   Subsequently, a management process using the management file 124, more specifically, a management process for extracting information from the memory chip 11A will be described with reference to FIG.

メモリチップ11Aには、前述したように総LBAの情報が含まれている。一方、図2(C)のメモリマップ及び図5のインストール実行処理フローチャートに示すように、HD11の最終パーティション(図2の例ではパーティション(3))の終了LBAを所定値だけ先頭側にずらし、これにより、この部分に「空き領域」を設定して管理ファイルを格納した。すなわち、HD11の記憶容量は、最終パーティション(3)の終了LBAが「空き領域」分だけ小さく設定されたことになる。図2(B),(C)の例では、本来はLBA100,000であるが、パーティションテーブルPT111上では、LBA90,000に設定されている。従って、OSからパーティションテーブルPT111の当該終了LBAを参照しても、このままでは、管理ファイルの存在を知得することはできない。   The memory chip 11A includes information on the total LBA as described above. On the other hand, as shown in the memory map of FIG. 2 (C) and the installation execution process flowchart of FIG. 5, the end LBA of the last partition of HD 11 (partition (3) in the example of FIG. 2) is shifted to the top by a predetermined value, As a result, the “free area” is set in this portion and the management file is stored. In other words, the storage capacity of the HD 11 is set so that the end LBA of the last partition (3) is reduced by the “free area”. In the example of FIGS. 2B and 2C, the LBA is originally 100,000, but is set to LBA 90,000 on the partition table PT111. Therefore, even if the OS refers to the end LBA of the partition table PT111, the existence of the management file cannot be known as it is.

管理ファイルは、前述したように、端末1による処理を監視するものである。従って、不当なアクセスから、典型的にはウイルス等のマルウエアによる攻撃によって管理ファイル内のプログラムが改竄されたり、損傷を受けたりして、機能が損なわれることを阻止する必要がある。そこで、HD11の記憶容量を書き替えて、すなわちパーティションテーブルPT111の最終パーティションの終了LBAの値を書き替えて、パーティションテーブルPT111上は、HD11内に管理ファイルが所在しないことと等価とした。   As described above, the management file is used to monitor processing by the terminal 1. Therefore, it is necessary to prevent the function from being damaged due to an unauthorized access, typically, a program in the management file being altered or damaged by an attack by malware such as a virus. Therefore, the storage capacity of the HD 11 is rewritten, that is, the value of the end LBA of the last partition of the partition table PT111 is rewritten, which is equivalent to the absence of the management file in the HD 11 on the partition table PT111.

ところで、端末1が起動した後は、前述したように、RAM12内の管理ファイル124によって特権レベルDPL0が設定され、管理ファイル124は不当なマルウエアからの攻撃に対抗することができる。一方、管理ファイルが格納されている元の記憶媒体であるHD11側へのマルウエアの攻撃に対抗する処置は、パーティションテーブルPT111に対する対策に加えて、メモリチップ11Aに対する対策も必要である。   By the way, after the terminal 1 is activated, as described above, the privilege level DPL0 is set by the management file 124 in the RAM 12, and the management file 124 can counter an attack from unauthorized malware. On the other hand, in order to counter the malware attack on the HD 11 side that is the original storage medium in which the management file is stored, a countermeasure against the memory chip 11A is required in addition to the countermeasure against the partition table PT111.

端末1が起動した後に、OSあるいはAPのファイルの実行とは別に、マルウエアが起動して、メモリチップ11A内の総LBAの値が参照されてしまうと、パーティションテーブルPT111内の最終パーティションの終了LBAとの不一致が検知され、HD11に「空き領域」が存在することが知られてしまう。そして、この「空き領域」に、マルウエアが処理乃至は作成した結果物のファイルが書き込まれることが考えられる。その結果、このマルウエアに実行に起因した結果物たるファイルが、「空き領域」の管理ファイルに上書きされて、HD11上から管理ファイルが削除、破壊、改変されることにもなりかねない。HD11内の「空き領域」に格納された管理ファイルが、一旦削除、破壊されると、次回の端末1の起動時に管理ファイル124がRAM12上に展開されず、管理ファイルの機能が損なわれることになりかねない。あるいは、HD11上の管理ファイルが改変されると、次回の端末1に起動後に、管理ファイルは異なる内容で、すなわちマルウエアによって挙動される、偽の管理ファイルで実行される可能性もある。   After the terminal 1 is activated, when the malware is activated separately from the execution of the OS or AP file and the value of the total LBA in the memory chip 11A is referred to, the end LBA of the last partition in the partition table PT111 is referred to. Is detected, and it is known that the “free area” exists in the HD 11. Then, it is conceivable that a resultant file processed or created by the malware is written in this “free area”. As a result, the resultant file resulting from the execution of this malware may be overwritten on the management file of “free space”, and the management file may be deleted, destroyed, or altered from the HD 11. Once the management file stored in the “free area” in the HD 11 is deleted or destroyed, the management file 124 is not expanded on the RAM 12 at the next startup of the terminal 1, and the function of the management file is impaired. It can be. Alternatively, if the management file on the HD 11 is altered, the management file may be executed with a fake management file with different contents, that is, behaved by malware, after the next startup on the terminal 1.

外部(OS133、AP135又はマルウエア等)からメモリチップ11Aがアクセスされる態様としては、I/Oポート10A(図16参照)を経由する場合と、メモリマップドI/O(MMIO)を経由する場合とがある。そこで、これらのアクセスに対抗する方法として、メモリチップ11Aから総LBAが読み取られることのない保護機能を、本実施例では管理ファイル内に設けている。より具体的には、管理ファイルは、外部(OS、AP又はマルウエア等)からのメモリチップ11Aへのアクセスをフックし、かつ、アクセスに基づいて読み出された情報を外部(OS、AP又はマルウエア等)が閲覧する前に、読み出された内容(総LBA)を、前記フック動作を活用して書き替える処理を行う。   As modes in which the memory chip 11A is accessed from the outside (OS 133, AP 135, malware, etc.), the case is via the I / O port 10A (see FIG. 16) and the case via the memory mapped I / O (MMIO) There is. Therefore, as a method for countering these accesses, a protection function in which the total LBA is not read from the memory chip 11A is provided in the management file in this embodiment. More specifically, the management file hooks access to the memory chip 11A from the outside (OS, AP, malware, etc.), and reads information read based on the access to the outside (OS, AP, malware). Etc.), the read content (total LBA) is rewritten using the hook operation.

図16は、かかるフック機能のうち、I/Oポート10Aを経由する場合の実施形態を説明するための機能構成図である。図16において、I/Oポート10Aは、CPU10に対応して設けられているもので、HD11(乃至はメモリチップ11A)をアクセスする場合に用いられる。以後、HD11乃至はメモリチップ11Aへのアクセスを、HD11等へのアクセスという。I/Oポート10Aの各ポートは、CPU10から見たHD11等のアドレスに対応している。メモリチップ11Aの総LBAの読み出し処理は、I/Oポート10A内の、データレジスタ(アドレス0x01f0)、ステータスレジスタ及びコマンドレジスタ(いずれもアドレス0x01f7)を用いて行われる。ステータスレジスタは、HD11側が読み書き中(Busy)か、データ転送要求がある状態であることを示すものである。コマンドレジスタは、メモリチップ11Aのデータを読み出すためのコマンドであるデバイス情報取得パラメータ「Oxec:IDENTIFY DEVICE」をセットするためのものである。データレジスタは、読み出しコマンドによって読み出されるデータの読出先のレジスタである。なお、読み出される情報量は、512B(1セクタ分)であり、一方、総LBAのデータサイズは、そのうちの2Bである。また、I/Oポート10A内のデータレジスタの容量は、16ビットであることから、512Bの読み出しに際しては、データレジスタで複数回の繰り返し処理が実行されて、レジスタ群内の1つの汎用レジスタに書き込まれることになる。   FIG. 16 is a functional configuration diagram for explaining an embodiment of the hook function via the I / O port 10A. In FIG. 16, an I / O port 10A is provided corresponding to the CPU 10, and is used when accessing the HD 11 (or the memory chip 11A). Hereinafter, access to the HD 11 or the memory chip 11A is referred to as access to the HD 11 or the like. Each port of the I / O port 10 </ b> A corresponds to an address such as HD 11 as viewed from the CPU 10. The read processing of the total LBA of the memory chip 11A is performed using the data register (address 0x01f0), status register, and command register (all addresses 0x01f7) in the I / O port 10A. The status register indicates that the HD 11 side is reading / writing (Busy) or that there is a data transfer request. The command register is for setting a device information acquisition parameter “Oxec: IDENTIFY DEVICE” which is a command for reading data of the memory chip 11A. The data register is a register to which data read by a read command is read. The amount of information to be read is 512B (for one sector), while the data size of the total LBA is 2B of that. In addition, since the capacity of the data register in the I / O port 10A is 16 bits, when reading 512B, the data register is repeatedly processed a plurality of times, so that one general-purpose register in the register group is stored. Will be written.

また、TSS127は、各プログラム(タスク)の各々に対応付けて作成されており、それぞれにI/O許可ビットマップを持っている。そこで、データレジスタ(アドレス0x01f0)へのアクセスに対応するタスクのI/O許可ビットマップにフラグ1を設定しておくことで、管理部105は、アクセスと同時にこのアクセスをフックする処理を実行する。レジスタ群内のTRレジスタには、TSS127の現タスクのセグメントが設定され、これを参照することで、I/O許可ビットマップのフラグの内容を検知することができる。管理部105は、かかるフックを検出すると、例外割込を発生させ、管理ファイル124を介して割込ハンドラ129に移行し、所定の割込処理プログラムを実行する。割込処理プログラムは、汎用レジスタに書き込まれたデータを取り出し、その内の総LBAのデータについて、予め設定されている所定値を減算し、新たな値を元の汎用レジスタに書き込む処理である。予め設定されている減算する所定値とは、「空き領域」分を差し引いた値であり、図2(B),(C)の例では、セクタ数で10,000である。割込ハンドラ129はこの処理の後、CPU10に制御を返す。従って、データレジスタ(アドレス0x01f0)をアクセスした外部(OS、AP又はマルウエア等)は、書き替え後の総LBAを取得することになる。この結果、「空き領域」の存在は検知されず、HD11内の管理ファイルが削除等されることはない。   The TSS 127 is created in association with each program (task) and has an I / O permission bitmap. Therefore, by setting flag 1 in the I / O permission bitmap of the task corresponding to the access to the data register (address 0x01f0), the management unit 105 executes processing for hooking this access simultaneously with the access. . In the TR register in the register group, the segment of the current task of the TSS 127 is set. By referring to this, the contents of the flag of the I / O permission bitmap can be detected. When detecting the hook, the management unit 105 generates an exception interrupt, shifts to the interrupt handler 129 via the management file 124, and executes a predetermined interrupt processing program. The interrupt processing program is a process of taking out the data written in the general-purpose register, subtracting a predetermined value set in advance from the total LBA data, and writing a new value in the original general-purpose register. The predetermined value to be subtracted is a value obtained by subtracting the “empty area”, and in the examples of FIGS. 2B and 2C, the number of sectors is 10,000. After this process, the interrupt handler 129 returns control to the CPU 10. Therefore, the outside (OS, AP, malware, etc.) accessing the data register (address 0x01f0) acquires the total LBA after rewriting. As a result, the existence of the “free area” is not detected, and the management file in the HD 11 is not deleted.

図17は、フック処理Iの流れを説明するフローチャートである。まず、外部(OS、AP又はマルウエア等)、例えばOS133からI/Oポート10Aのステータスレジスタの内容の読み込みが行われる(ステップS61)[図16中の(1)]。このとき、I/Oポート10Aがビジー又はデータ転送要求有りであれば、すなわち少なくとも一方の状態にあれば(ステップS63でNo)、この状態が終わるまで待機する。一方、いずれの状態にもなければ(ステップS63でYes)[図16中の(2)]、I/Oポート10Aのコマンドレジスタにデータ読み出し要求のコマンドが送出される(ステップS65)[図16中の(3)]。次いで、I/Oポート10Aのデータレジスタへのアクセスが行われ(ステップS67)、メモリチップ11Aから読み出され[図16中の(4)]、このデータの閲覧(読み込み)が行われようとする。一方、このアクセスの時点で例外が発生し(ステップS69)[図16中の(3)]、次いで、この例外に基づいて割込処理Iが実行される(ステップS71)[図16中の(5)]。   FIG. 17 is a flowchart for explaining the flow of the hook process I. First, the contents of the status register of the I / O port 10A are read from the outside (OS, AP, malware, etc.), for example, the OS 133 (step S61) [(1) in FIG. 16]. At this time, if the I / O port 10A is busy or there is a data transfer request, that is, if it is in at least one state (No in step S63), it waits until this state ends. On the other hand, if it is not in any state (Yes in step S63) [(2) in FIG. 16], a data read request command is sent to the command register of the I / O port 10A (step S65) [FIG. Inside (3)]. Next, the data register of the I / O port 10A is accessed (step S67), read from the memory chip 11A [(4) in FIG. 16], and this data is viewed (read). To do. On the other hand, an exception occurs at the time of this access (step S69) [(3) in FIG. 16], and then interrupt processing I is executed based on this exception (step S71) [(in FIG. 5)].

図18は、割込処理Iの流れを説明するフローチャートを示す。先ず、管理ファイル124によって、I/Oポート10Aのコマンドレジスタから読み出されたデータが書き込まれた汎用レジスタがアクセスされてデータの読み出し要求が行われる(ステップS81)。なお、管理ファイル124は特権レベルDPL0であるから、このアクセスで例外が発生することはない。   FIG. 18 is a flowchart for explaining the flow of the interrupt process I. First, the management file 124 accesses a general-purpose register in which data read from the command register of the I / O port 10A is written, and a data read request is made (step S81). Since the management file 124 is at the privilege level DPL0, no exception occurs during this access.

次いで、アクセスされた汎用レジスタ内のデータの内の総LBAに対応する位置のデータから「空き領域」分のセクタ数が減算される(ステップS83)。そして、減算して得られた値が元の汎用レジスタに書き込まれ(ステップS85)、すなわち値が書き替えられ、この後、割込が終了する。次いで、OS133は、汎用レジスタにデータを閲覧しに行く[図16中の(6)]。この結果、OS133は、メモリチップ11Aに格納されている本来の総LBAではなく、書き替え後の総LBAを取得することになる。   Next, the number of sectors corresponding to “empty area” is subtracted from the data at the position corresponding to the total LBA in the accessed data in the general-purpose register (step S83). Then, the value obtained by subtraction is written into the original general-purpose register (step S85), that is, the value is rewritten, and then the interrupt is completed. Next, the OS 133 goes to browse data in the general-purpose register [(6) in FIG. 16]. As a result, the OS 133 acquires the rewritten total LBA, not the original total LBA stored in the memory chip 11A.

なお、割込処理は、汎用レジスタに一旦書き込まれたデータを読み出して減算処理する方法に代えて、I/Oポート10A内のデータレジスタに読み込まれるデータを取り込み、減算処理を施してから、レジスタ群内の所定の汎用レジスタに書き込むという方法であってもよい。   Note that the interrupt process is not a method of reading and subtracting data once written to the general-purpose register, but fetching data read into the data register in the I / O port 10A and applying the subtraction process to the register. A method of writing to a predetermined general-purpose register in the group may be used.

図19は、MMIOを経由する場合の実施形態を説明するための機能構成図である。図19においては、RAM12は、説明の便宜上CPU10から見たアドレス空間を示すシステムメモリマップとして表記している。RAM12は、チップセット内のアクセスに関するシステムレジスタ領域、バスマスタ式のPCI(Peripheral Component Interconnect)のアドレス空間であってMMIOが展開されている領域、管理ファイル124が格納されるセキュア領域、及びOS133等が展開される領域に区分されている。   FIG. 19 is a functional configuration diagram for explaining an embodiment in the case of passing through the MMIO. In FIG. 19, the RAM 12 is represented as a system memory map indicating an address space viewed from the CPU 10 for convenience of explanation. The RAM 12 includes a system register area related to access in the chipset, a bus master type PCI (Peripheral Component Interconnect) address space in which MMIO is expanded, a secure area in which the management file 124 is stored, an OS 133, and the like. It is divided into areas to be expanded.

MMIOは、CPU10が各I/Oデバイス(HD11も含む)にアクセスするための命令を、RAM12へアクセスするための命令と同一のアドレス空間で扱えるようにした方式である。MMIOは、I/Oデバイスに対するデバイスドライバに対応するI/Oレジスタで構成されている。CPU10は、かかるI/Oレジスタに動作許可等の情報の読み書きをすることで、対応するI/Oデバイスの制御を行うようにしている。MMIOの展開領域内には、「HD用I/Oデバイス」と示しているように、HD11に対応するI/Oレジスタ領域が設けられている。そして、HD11に対応するI/Oレジスタを介してHD11側にアクセスすることができるようになっている。   MMIO is a method in which the CPU 10 can handle an instruction for accessing each I / O device (including the HD 11) in the same address space as an instruction for accessing the RAM 12. MMIO is composed of I / O registers corresponding to device drivers for I / O devices. The CPU 10 controls the corresponding I / O device by reading and writing information such as operation permission in the I / O register. In the MMIO expansion area, an I / O register area corresponding to HD11 is provided as indicated by “HD I / O device”. The HD 11 side can be accessed via an I / O register corresponding to the HD 11.

AHCI(Advanced Host Controller Interface)16は、RAM12とHD11側との間に介在され、RAM12とHD11側との間でのデータ転送を行うためのコントローラである。より詳細には、AHCI16は、その下層のATA、あるいはSATAの通信規約に則ったデバイスを有し、FIS(Frame Information Structure)という構造を有するデータをバスマスタ式で、RAM12側からHD11側に、またHD11側からRAM12側にデータを転送する。RAM12側からHD11側に転送されるデータは、REGHDFIS161の構造体で行われ、HD11側からRAM12側に戻されるデータは、REGDHFIS162の構造体で行われる。   The AHCI (Advanced Host Controller Interface) 16 is a controller that is interposed between the RAM 12 and the HD 11 side and performs data transfer between the RAM 12 and the HD 11 side. More specifically, the AHCI 16 has a device conforming to the communication protocol of ATA or SATA below it, and data having a structure called FIS (Frame Information Structure) is a bus master type from the RAM 12 side to the HD 11 side, Data is transferred from the HD 11 side to the RAM 12 side. Data transferred from the RAM 12 side to the HD 11 side is performed by a REGHDFIS 161 structure, and data returned from the HD 11 side to the RAM 12 side is performed by a REGDHFIS 162 structure.

チップセット内のデバッグレジスタDR7には、RAM12のMMIO内の「HD用I/Oデバイス」のアドレスが書き込まれている。すなわち、CPU10がこの「HD用I/Oデバイス」のアドレスをデータ読み取りとしてアクセスすると、このアクセスが管理ファイル124によって、デバッグ例外としてフックされるようになっている。管理ファイル124は、このフックに基づいて、割込ハンドラ129を経て所定の割込処理を実行させる。割込処理は、「HD用I/Oデバイス」からREGDHFIS162の内容を読み出し、「空き領域」分のセクタ数を差し引いて、元に戻す処理である。管理部105は、特権レベルがDPL0であることから、HD11に該当するMMIO内の「HD用I/Oデバイス」のアドレスを常時監視しておき、読み出しタスク時に、当該アドレスをデバッグレジスタDR7に書き込むようにすることで、デバッグ例外を発生させ、外部(OS、AP又はマルウエア等)によるメモリチップ11A内の総LBAの知得を阻止する。   The address of the “HD I / O device” in the MMIO of the RAM 12 is written in the debug register DR7 in the chipset. That is, when the CPU 10 accesses the address of the “HD I / O device” as data read, the access is hooked by the management file 124 as a debug exception. Based on this hook, the management file 124 causes the interrupt handler 129 to execute a predetermined interrupt process. The interrupt process is a process of reading the contents of the REGDHFIS 162 from the “HD I / O device”, subtracting the number of sectors corresponding to the “empty area”, and restoring it. Since the privilege level is DPL0, the management unit 105 constantly monitors the address of the “HD I / O device” in the MMIO corresponding to HD11, and writes the address to the debug register DR7 at the time of a read task. By doing so, a debug exception is generated, and acquisition of the total LBA in the memory chip 11A by the outside (OS, AP, malware, etc.) is prevented.

図20は、フック処理IIの流れを説明するフローチャートである。まず、外部(OS、AP又はマルウエア等)から、メモリチップ11A内の総LBAを読み出す要求情報がREGHDFIS161に設定される(ステップS91)[図19中の(1)]。より具体的には、REGHDFIS161にHD11側(詳細にはメモリチップ11A)の番号情報が、コマンドにデバイス情報取得パラメータ(0xec:IDENTIFY DEVICE)がセットされ、AHCI16を介してHD11側に転送され[図19中の(1)]、HD11側で処理が行われて、デバイスのステータスが返され、更にREGDHFIS162にIdentify Dataである総LBAを含むデータがセットされ、返送されることとなる[図19中の(2)]。   FIG. 20 is a flowchart for explaining the flow of the hook process II. First, request information for reading the total LBA in the memory chip 11A from the outside (OS, AP, malware, etc.) is set in REGHDFIS 161 (step S91) [(1) in FIG. 19]. More specifically, the number information on the HD 11 side (specifically, the memory chip 11A) is set in the REGHDFIS 161, the device information acquisition parameter (0xec: IDENTIFY DEVICE) is set in the command, and transferred to the HD 11 side via the AHCI 16 [FIG. 19 (1)], the processing is performed on the HD 11 side, the device status is returned, and the data including the total LBA which is Identify Data is set in the REGDHFIS 162 and returned [in FIG. (2)].

次いで、REGDHFIS162がHD11側に対するMMIO内の「HD用I/Oデバイス」のアドレスに書き込まれる(ステップS93)。続いて、外部(OS、AP又はマルウエア等)から、REGDHFIS162の書き込まれたアドレスに対して、メモリチップ11Aの総LBAを読み出すためのアクセスがあると(ステップS95)[図19中の(3)]、直ちにデバッグ例外が発生する(ステップS97)[図19中の(4)]。次いで、このデバッグ例外に基づいて割込処理IIが実行される(ステップS99)[図19中の(5)]。   Next, the REGDHFIS 162 is written to the address of “HD I / O device” in the MMIO for the HD 11 side (step S 93). Subsequently, when there is an access from outside (OS, AP, malware, or the like) to read the total LBA of the memory chip 11A to the address written in the REGDHFIS 162 (step S95) [(3) in FIG. A debug exception occurs immediately (step S97) [(4) in FIG. 19]. Next, interrupt processing II is executed based on this debug exception (step S99) [(5) in FIG. 19].

図21は、割込処理IIの流れを説明するフローチャートを示す。先ず、管理ファイル124によって、REGDHFIS162内のHD11の総LBAが書き込まれている「HD用I/Oデバイス」がアクセスされる(ステップS111)。なお、管理ファイル124は特権レベルDPL0であるから、このアクセスで例外が発生することはない。   FIG. 21 is a flowchart for explaining the flow of the interrupt process II. First, the “HD I / O device” in which the total LBA of the HD 11 in the REGHFIS 162 is written is accessed by the management file 124 (step S111). Since the management file 124 is at the privilege level DPL0, no exception occurs during this access.

次いで、アクセスしたREGDHFIS162内のHD11の総LBAから空き領域分のセクタ数が減算され(ステップS113)、減算された値がREGDHFIS162の元の位置に戻される、すなわち書き替えられる(ステップS115)。この後、割込が終了する。次いで、OS133は、「HD用I/Oデバイス」にデータを閲覧するためにアクセスする。この結果、OS133は、メモリチップ11Aに格納されている本来の総LBAではなく、書き替え後の総LBAを取得することになる。   Next, the number of sectors corresponding to the empty area is subtracted from the total LBA of the HD 11 in the accessed REGDHFIS 162 (step S113), and the subtracted value is returned to the original position of the REGDHFIS 162, that is, rewritten (step S115). After this, the interrupt ends. Next, the OS 133 accesses the “HD I / O device” to view data. As a result, the OS 133 acquires the rewritten total LBA, not the original total LBA stored in the memory chip 11A.

図22は、フック処理IIIの流れを説明するフローチャートである。フック処理IIIは、図19の機能構成図に対して以下の構成を備えている。RAM12には、図9のPTE128が形成されている。このPTE128は、前述したように存在フラグPを有しており、MMIO内の「HD用I/Oデバイス」のアドレスへのアクセスのタスクをチップセット内のページテーブルレジスタCR3に、フラグ0として設定する。このようにすると、外部(OS、AP又はマルウエア等)から「HD用I/Oデバイス」のアドレスがアクセスされると、直ちにページフォルトが発生するようになっている。   FIG. 22 is a flowchart for explaining the flow of the hook process III. The hook process III has the following configuration with respect to the functional configuration diagram of FIG. In the RAM 12, the PTE 128 of FIG. 9 is formed. The PTE 128 has the presence flag P as described above, and the task of accessing the address of the “HD I / O device” in the MMIO is set as the flag 0 in the page table register CR3 in the chipset. To do. In this way, when the address of “HD I / O device” is accessed from the outside (OS, AP, malware, etc.), a page fault occurs immediately.

図22では、まず、HDの総LBA読出要求がREGHDFIS161に設定される(ステップS121)。より具体的には、REGHDFIS161にHD11側(詳細にはメモリチップ11A)の番号情報が、コマンドにデバイス情報取得パラメータ(0xec:IDENTIFY DEVICE)がセットされ、AHCI16を介してHD11側に転送され、HD11側で処理が行われて、デバイスのステータスが返され、更にREGDHFIS162にIdentify Dataである総LBAを含むデータがセットされ、返送されることとなる。   In FIG. 22, first, an HD total LBA read request is set in REGHDFIS 161 (step S121). More specifically, the number information on the HD 11 side (specifically, the memory chip 11A) is set in the REGHDFIS 161, the device information acquisition parameter (0xec: IDENTIFY DEVICE) is set in the command, and is transferred to the HD 11 side via the AHCI 16 and transferred to the HD 11 The device status is returned, the device status is returned, and data including the total LBA as Identify Data is set in the REGDHFIS 162 and returned.

次いで、REGDHFIS162がHD11側に対するMMIO内の「HD用I/Oデバイス」のアドレスに書き込まれる(ステップS123)。続いて、REGDHFIS162の書き込まれたMMIOのアドレスに対して、ページテーブルレジスタCR3の存在フラグPがフラグ0かどうか判断される(ステップS125)。ページテーブルレジスタCR3の存在フラグPがフラグ0でなければ、本フローを抜ける。一方、ページテーブルレジスタCR3の存在フラグPがフラグ0であれば、直ちにページフォルトの例外が発生し(ステップS127)、次いで、割込処理IIIが実行される(ステップS129)。なお、割込処理IIIは、図19に示す割込処理IIと同様である。   Next, the REGDHFIS 162 is written to the address of “HD I / O device” in the MMIO for the HD 11 side (step S123). Subsequently, it is determined whether or not the presence flag P of the page table register CR3 is the flag 0 with respect to the address of the MMIO written in the REGDHFIS 162 (step S125). If the presence flag P of the page table register CR3 is not the flag 0, the present flow is exited. On the other hand, if the presence flag P of the page table register CR3 is the flag 0, a page fault exception is immediately generated (step S127), and then the interrupt process III is executed (step S129). The interrupt process III is the same as the interrupt process II shown in FIG.

図23は、フック処理IVの流れを説明するフローチャートである。フック処理IVは、図19の機能構成図に対して以下の構成を備えている。図19に示すAHCI16は、REGHDFIS161によるHD11へのアクセスに対応して作成されたREGDHFIS162が返送されると、ハードウエア割込(IRQ)を発行するようなっている。そして、このハードウエア割込(IRQ)を受けて、外部(OS、AP又はマルウエア等)から、HD11側に対するMMIO内の「HD用I/Oデバイス」のアドレスへの読出のためのアクセスが行われるようになっている。一方、管理ファイル124は、このハードウエア割込(IRQ)を検知(フック)して、RAM12のセキュア領域に作成されている割込ディスクリプタテーブルIDT126から、割込ハンドラ129で所定の割込処理が実行される。なお、割込処理IVは、図19に示す割込処理IIと同様である。   FIG. 23 is a flowchart for explaining the flow of the hook process IV. The hook process IV has the following configuration with respect to the functional configuration diagram of FIG. The AHCI 16 shown in FIG. 19 issues a hardware interrupt (IRQ) when the REGDHFIS 162 created in response to the access to the HD 11 by the REGHDFIS 161 is returned. In response to this hardware interrupt (IRQ), access from the outside (OS, AP, malware, etc.) for reading to the address of the “HD I / O device” in the MMIO to the HD 11 side is performed. It has come to be. On the other hand, the management file 124 detects (hooks) this hardware interrupt (IRQ), and from the interrupt descriptor table IDT 126 created in the secure area of the RAM 12, the interrupt handler 129 performs a predetermined interrupt process. Executed. The interrupt process IV is the same as the interrupt process II shown in FIG.

以上のように、管理ファイルのHD11内での格納位置をマルウエアに知得されることがないため、マルウエアによって管理ファイルが破壊、削除、改変等されることが阻止でき、端末1の動作環境をセキュアな管理ファイルによって監視される。また、管理ファイルの環境下で動作可能なOS乃至APを、RAM12上の管理ファイル124と同一特権レベル内にロードするようにすれば、高いセキュリティで当該APの処理を実行することが可能となる。   As described above, since the storage location of the management file in the HD 11 is not known to the malware, it is possible to prevent the management file from being destroyed, deleted, modified, etc. by the malware. Monitored by a secure management file. If an OS or AP that can operate under the management file environment is loaded within the same privilege level as that of the management file 124 on the RAM 12, the processing of the AP can be executed with high security. .

次に、図24〜図26は、管理ファイルの環境下で特定のアプリケーションをセキュアに実行する他の実施形態を説明するための図である。図24(A)(B)は、特定アプリケーションのRAMへのロードを説明するための図、図25は、管理ファイル環境の下での特定アプリケーションの実行方法を説明するための図、図26は、CPU10によって実行される特定アプリケーションの実行手順を説明するフローチャートである。   Next, FIG. 24 to FIG. 26 are diagrams for explaining another embodiment in which a specific application is executed securely under the management file environment. 24A and 24B are diagrams for explaining the loading of the specific application to the RAM, FIG. 25 is a diagram for explaining the execution method of the specific application under the management file environment, and FIG. FIG. 11 is a flowchart for explaining an execution procedure of a specific application executed by the CPU 10.

前記端末1は、パーソナルコンピュータ、モバイル等にも適用される。このような場合、端末1は、OS環境下で利用可能な各種の汎用アプリケーション(AP)を備える一方で、特定のアプリケーションについては高いセキュリティ環境で使用することが望まれる。端末1を、例えば電子商取引、電子決済、個人情報が関連する情報の取得等の手段(特定AP)としても適用する場合である。そこで、前述した管理ファイル124によってセキュアに制御される端末1において、OS133で動作する各種の汎用のAPの領域に特定APを配置しても、高いセキュリティ環境で使用し得るようにした。以下、説明する。   The terminal 1 is also applied to a personal computer, a mobile and the like. In such a case, the terminal 1 is provided with various general-purpose applications (AP) that can be used in the OS environment, but it is desired that a specific application be used in a high security environment. This is a case where the terminal 1 is also applied as means (specific AP) such as electronic commerce, electronic payment, acquisition of information related to personal information, and the like. Therefore, the terminal 1 that is securely controlled by the management file 124 described above can be used in a high security environment even if a specific AP is arranged in the area of various general-purpose APs operating on the OS 133. This will be described below.

図24(A)に示すように、ROM11のパーティション(1)〜(3)のいずれか、ここではパーティション(1)の適所には所定サイズのダミーAP1351が予めインストールされている。また、前述の「空き領域」にインストールされた管理ファイル内には、特定AP1352が含まれている。特定AP1352はダミーAP1351のデータサイズと等しいか、あるいは対応するものである。   As shown in FIG. 24A, a dummy AP 1351 of a predetermined size is installed in advance at any one of the partitions (1) to (3) of the ROM 11, here the partition (1). In addition, the specific AP 1352 is included in the management file installed in the “free area” described above. The specific AP 1352 is equal to or corresponds to the data size of the dummy AP 1351.

ダミーAP1351は、RAM12へのロードの際には、OS133によって、汎用のAP135と同じ領域の所定箇所に、ダミーAP1351としてロードされる。続いて、特定AP1352は、管理ファイル124によって、RAM12上のダミーAP1351に重畳(一部重畳も含む)してロードされる。   When loading into the RAM 12, the dummy AP 1351 is loaded as a dummy AP 1351 by the OS 133 at a predetermined location in the same area as the general-purpose AP 135. Subsequently, the specific AP 1352 is loaded by being superposed (including partly superposed) on the dummy AP 1351 on the RAM 12 by the management file 124.

図24(A)(B)では、操作部13から、特定APの実行指令が入力されると、OS133はこの指示を受け付けて、ダミーAP1351をロードする。続いて、特権レベルDPL0の管理ファイル124が特定APを上書きロードする。特権レベルDPL0の管理ファイル124によって行われる処理は、相対的に特権レベルが低いOSからは関与し得ない。従って、OS133やOS133のロード領域にマルウエアが存在していたとしても、ダミーAP1351が特定AP1352に更新されたことを知得することはできない。   24A and 24B, when an execution instruction for a specific AP is input from the operation unit 13, the OS 133 receives this instruction and loads the dummy AP 1351. Subsequently, the management file 124 of the privilege level DPL0 overwrites and loads the specific AP. The processing performed by the management file 124 of the privilege level DPL0 cannot be involved from an OS having a relatively low privilege level. Therefore, even if malware exists in the OS 133 or the load area of the OS 133, it cannot be known that the dummy AP 1351 has been updated to the specific AP 1352.

さらに、管理ファイル124は、特定AP1352に対応する、システムテーブル内のGDTもしくはLDTのテーブルのベースアドレス及びリミットを当該特定AP1352のロード位置を含めて設定する。特定AP1352は、かかるベースアドレス及びリミットで記述される領域1352a(図25参照)内で動作が制限され、他のAPに影響を与えない。かつ、管理ファイル124は、このアドレスへのアクセスに対してページフォルトを発生するよう設定する。ページフォルトが発生すると、管理ファイル124はこれをフックし、割込ハンドラ129(図25参照)を介して、特定APの実行を許可する。   Further, the management file 124 sets the base address and limit of the GDT or LDT table in the system table corresponding to the specific AP 1352 including the load position of the specific AP 1352. The operation of the specific AP 1352 is limited in the area 1352a (see FIG. 25) described by the base address and limit, and does not affect other APs. The management file 124 is set to generate a page fault for access to this address. When a page fault occurs, the management file 124 hooks it and permits execution of the specific AP via the interrupt handler 129 (see FIG. 25).

なお、図25において、ドライバ群136は、各種のドライバ、例えばシスプレイドライバとかネットワークドライバ等を含む。Agent137は、特定AP1352の動作の間、管理ファイル124によって特定AP1352にアクセスできる権限を有するようにされ、発生したイベントをログ出力したり、管理ファイル124とOS側のAPの中継(IFの役割)をしたり、ユーザーからみた場合の管理画面の役割を担うものである。また、通信時にOSのドライバを使用するため、特定AP1352で作成されたデータをネットワーク上のサーバ等へ送信するといった役割も担うものである。符号化処理138はこの場合に、作成されたデータに暗号化、加工を施す符号化処理を行って難読性を持たせることで、仮にドライバ136を介してデータが漏洩したとしても対処できるという耐タンパ性を確保している。   In FIG. 25, the driver group 136 includes various drivers such as a sysplay driver and a network driver. The Agent 137 has an authority to access the specific AP 1352 by the management file 124 during the operation of the specific AP 1352, logs an event that has occurred, and relays the management file 124 and the AP on the OS side (role of IF) It plays the role of a management screen when viewed from the user's perspective. Further, since the OS driver is used during communication, it also plays a role of transmitting data created by the specific AP 1352 to a server on the network. In this case, the encoding process 138 performs an encoding process that encrypts and processes the generated data to make it obfuscated so that even if data leaks through the driver 136, the encoding process 138 can cope with it. Tampering is ensured.

図26において、まず、操作部13からの特定AP1352に対する処理の指示の有無が判断される。特定AP1352に対する処理の指示とは、例えば、端末1の画面で、特定APに対応付けられている処理、例えば電子決済のアイコン(あるいはボタンやキー)が選択された場合等である。なお、この指示は、OS133との関係でダミーAPとも対応付けられている(従って、この指示の発生に伴って、OS135はダミーAP1351をRAM12内にロードする。)。指示がなければ、本フローを抜ける(ステップS151)。なお、他の処理(汎用のAP等)の指示である場合には、当該指示に対応付けされた処理が実行される。   In FIG. 26, first, it is determined whether or not there is a processing instruction for the specific AP 1352 from the operation unit 13. The process instruction for the specific AP 1352 is, for example, a process associated with the specific AP on the screen of the terminal 1, for example, when an electronic payment icon (or button or key) is selected. This instruction is also associated with a dummy AP in relation to the OS 133 (therefore, the OS 135 loads the dummy AP 1351 into the RAM 12 when this instruction is generated). If there is no instruction, this flow is exited (step S151). In the case of an instruction of another process (general-purpose AP or the like), a process associated with the instruction is executed.

一方、ステップS151で指示があったのであれば、OS133によるダミーAP1351のロードが実行される(ステップS153)。管理ファイル124は、かかるOS133によるダミーAP1351のロードを監視しており、そのロード位置を取得して、ロード処理に引き続いて、同一位置に特定APをロードする処理を行う(ステップS155)。次いで、管理ファイル124は、当該アドレスへのアクセスに対して(すなわち、特定AP1352へのアクセスに対して)、ページフォルトを設定し、及び本実施形態では当該位置にGDTのベースアドレス及びリミットを書き替えて、ページフォルト領域1352aを設定し、特定AP1352の動作領域を制限するようにした(ステップS157)。   On the other hand, if there is an instruction in step S151, loading of the dummy AP 1351 by the OS 133 is executed (step S153). The management file 124 monitors the loading of the dummy AP 1351 by the OS 133, acquires the loading position, and performs the process of loading the specific AP at the same position following the loading process (step S155). Next, the management file 124 sets a page fault for the access to the address (that is, for the access to the specific AP 1352), and writes the base address and limit of the GDT at the position in this embodiment. Instead, the page fault area 1352a is set to restrict the operation area of the specific AP 1352 (step S157).

かかる処理が終了した段階で、管理ファイル124は、CPU10をOS135に戻す。OS135は、ロードしたダミーAP1351を実行させるつもりで、この位置をアクセスすることになる。その結果、OS133によってページフォルトの発生を行わせる(ステップS159)。このページフォルトは管理ファイル124によってフックされ(ステップS161)、管理ファイル124から割込ハンドラ129を介して、特定AP1352の実行が許可される(ステップS163)。ページフォルトによる処理であるため、仮にマルウエアが存在しても、その期間、ページフォルト領域1352aへは関与できないこととなる。そして、特定APの処理が終了すると、本フローを終了する。   At the stage where such processing is completed, the management file 124 returns the CPU 10 to the OS 135. The OS 135 accesses this location with the intention of executing the loaded dummy AP 1351. As a result, the OS 133 causes a page fault to occur (step S159). This page fault is hooked by the management file 124 (step S161), and execution of the specific AP 1352 is permitted from the management file 124 via the interrupt handler 129 (step S163). Since the process is based on a page fault, even if malware exists, the page fault area 1352a cannot be involved during that period. Then, when the process of the specific AP is finished, this flow is finished.

なお、図26の処理は、フローチャートのとおり、操作部13からの特定APの処理の指示が受け付けられる毎に行われるため、毎回確実に特定AP1352がロードされ、高いセキュリティ環境で実行される。   The process in FIG. 26 is performed every time an instruction for a specific AP process is received from the operation unit 13 as shown in the flowchart, so that the specific AP 1352 is reliably loaded every time and executed in a high security environment.

なお、本発明は、以下の態様を採用することが可能である。   The present invention can employ the following modes.

(1)RAM12のメモリマップにおいて、OS133、DATA134、AP135を0MB側に配置し、管理ファイル124等のセキュア領域をその状側に配置するようにしてもよい。これによれば、アドレスを小さい値とすることで、繰り返し読み書きされるOS,APの読み書き処理を容易かつ、その速度を高速に行うことができる。 (1) In the memory map of the RAM 12, the OS 133, DATA 134, and AP 135 may be arranged on the 0 MB side, and a secure area such as the management file 124 may be arranged on the state side. According to this, by setting the address to a small value, read / write processing of the OS and AP that are repeatedly read and written can be performed easily and at high speed.

(2)管理部105によるフック処理として、I〜IVの実施例を説明したが、要するにメモリチップ11Aに書き込まれている総LBA値を読み出す処理に関連して、結果的にその総LBA値が外部アクセスから知得されないようにする処理であればよい。 (2) Although the embodiments I to IV have been described as the hook processing by the management unit 105, in short, in relation to the processing of reading the total LBA value written in the memory chip 11A, as a result, the total LBA value is Any process may be used as long as it is not obtained from external access.

(3)本実施形態では、RAM12上の管理ファイル124を特権レベルを用いてOS等からのアクセスに対抗し得るものとしたが、HD11からロードされる管理ファイル12が正常であれば、格別の保護機能は備えず、あるいは他の保護機能で対応するようにしてもよい。 (3) In the present embodiment, the management file 124 on the RAM 12 can be countered against access from the OS or the like using a privilege level. However, if the management file 12 loaded from the HD 11 is normal, it is exceptional. A protection function is not provided, or other protection functions may be used.

(4)なお、特定AP1352をページフォルトに起因して実行する方法は、管理ファイルがHD11からロードされる態様に限定されず、本出願人による特許文献3,4、PCT/JP2010/68346、日本特許出願2011−235386に記載の外部ブート技術を採用した場合でもよい。 (4) Note that the method of executing the specific AP 1352 due to the page fault is not limited to the mode in which the management file is loaded from the HD 11, and the patent documents 3 and 4, PCT / JP2010 / 68346, Japan by the present applicant. The external boot technique described in Patent Application 2011-235386 may be adopted.

(5)上記実施形態では、BIOSを用いた例で説明したが、本発明は、次世代用のUEFI(Unified Extensible Firmware Interface)を使用する場合にも同様に適用可能である。 (5) In the above-described embodiment, the example using the BIOS has been described. However, the present invention is also applicable to the case where a next-generation UEFI (Unified Extensible Firmware Interface) is used.

UEFIでは、現行のMBR、PTは使用されず、PTに代えて、GPT(GUID パーティションテーブル)という新しい構成が使用される。GPTでは、LBA1〜LBA33のセクタが使用される。LBA1には第1GPTヘッダが格納され、ユーザが使用可能なHD11の範囲を定義している。また、LBA1では、GPTエントリ(各パーティションの定義情報を持つ)のエントリ数とサイズとが定義されている。また、第1GPTに異常が発生した場合に差し替えるための第2GPT(常にHD11の最後のセクタに設定されている)の位置とサイズも保持している。さらに、GPTの内容を改竄されないように、GPT自身のチェックサム値もGPTヘッダに保持されている。GPTエントリには、各パーティションの定義が記載されている。   In UEFI, the current MBR and PT are not used, and a new configuration called GPT (GUID partition table) is used instead of PT. In GPT, sectors LBA1 to LBA33 are used. LBA1 stores the first GPT header and defines the range of HD11 that can be used by the user. In LBA1, the number and size of GPT entries (having definition information for each partition) are defined. Also, the position and size of the second GPT (always set to the last sector of the HD 11) to be replaced when an abnormality occurs in the first GPT are also held. Further, the checksum value of the GPT itself is also held in the GPT header so that the contents of the GPT are not falsified. The GPT entry describes the definition of each partition.

GPTを使用している端末に、本発明に係る管理ファイルをインストールする場合、インストールのタイミングは、第2GPTの前であって、最終パーティションの後である。この場合、第1GPTの最終パーティションの終了セクタ位置を書き換えると同時に、チェックサムの値を再計算し、第1GPTヘッダの値を書き換え、整合性を保つようにすればよい。同時に第2GPTの値(第1GPTでもよい)を、本発明に係る管理ファイルの領域にバックアップを取り、第2GPTを第1GPT同様に書き換えるようにすればよい。   When the management file according to the present invention is installed in a terminal using GPT, the installation timing is before the second GPT and after the final partition. In this case, the end sector position of the last partition of the first GPT may be rewritten, and at the same time, the checksum value may be recalculated and the value of the first GPT header may be rewritten to maintain consistency. At the same time, the value of the second GPT (or the first GPT) may be backed up in the management file area according to the present invention, and the second GPT may be rewritten in the same manner as the first GPT.

その後の動作については、GPT参照時やHD11のREGHDFIS等の値をフック(Hook)し、書き替えることで対応が可能である。   The subsequent operation can be handled by hooking and rewriting the value such as REGHDFIS of HD11 when referring to the GPT.

(6)また、本実施形態では、特定のファイル情報の一例としての管理ファイルの保護を例に挙げているが、保護の対象は、後述のとおり、それに限られない。通常、パーティション内のデータはOSやアプリケーションからアクセスが可能である。作成データ、メール、アンチウイルスソフトやファイアウォール等のセキュリティ対策ソフト、更には暗号化で使用される鍵情報や暗号化のロジックもHDのパーティション内に記憶されている。これらに対して、OSからアクセスが可能であるということは、マルウエア等のウイルスからも同様にアクセスが可能ということになる。これに対して、本技術によって作られるパーティション外の隔離保護領域は、OSやアプリケーションからアクセスできない。これはウイルスからもアクセスすることができない領域であることを意味する。これにより、ID、パスワード、暗号化の鍵情報、暗号化のロジック、セキュリティ対策ソフト、Firewall、機密情報やメール等の特定のファイル情報をウイルスから保護しつつ(高いセキュリティーの下で)、HDに記憶することが可能である。また、本発明は、パーソナルコンピュータに限らず、CPU、HD(SSDを含む)の構成を持つ、コピー機、スマートフォン、タブレット等の情報処理装置にも同様に適用が可能である。 (6) Further, in the present embodiment, protection of a management file as an example of specific file information is taken as an example, but the protection target is not limited to that as described later. Usually, data in a partition can be accessed from an OS or an application. Security data such as creation data, e-mail, anti-virus software and firewall, as well as key information used for encryption and encryption logic are also stored in the HD partition. On the other hand, being accessible from the OS means that it can also be accessed from viruses such as malware. On the other hand, the isolation protection area outside the partition created by the present technology cannot be accessed from the OS or application. This means that the area cannot be accessed from viruses. This protects specific file information such as IDs, passwords, encryption key information, encryption logic, security software, Firewall, confidential information and emails from viruses (under high security) It is possible to memorize. In addition, the present invention is not limited to a personal computer, and can be similarly applied to an information processing apparatus such as a copier, a smartphone, or a tablet having a configuration of CPU and HD (including SSD).

1 端末(情報処理装置)
10 CPU
1002 インストール処理部
11 HD(ハードディスク)
110 MBR
111 パーティションテーブル
11A メモリチップ(メモリ部材)
12 RAM(主メモリ)
1011 専用ローダ処理部
1012 管理ファイル動作環境設定部
1013 OSローダ処理部
2B インストーラ
22 インストールプログラムメモリ
24 管理ファイルメモリ
122 専用ローダ
124 管理ファイル
1 terminal (information processing equipment)
10 CPU
1002 Installation processing unit 11 HD (hard disk)
110 MBR
111 Partition table 11A Memory chip (memory member)
12 RAM (main memory)
1011 Dedicated loader processing unit 1012 Management file operation environment setting unit 1013 OS loader processing unit 2B Installer 22 Installation program memory 24 Management file memory 122 Dedicated loader 124 Management file

Claims (12)

先頭セクタにMBRが、その後方側に少なくともOSが格納されたハードディスクと、前記ハードディスクに対応付けられ、当該ハードディスクの総容量情報が少なくとも格納されたメモリ部材と、CPUと、前記CPUによる前記MBRの起動を経て前記ハードディスクの記憶内容が読み出される主メモリとを含む情報処理装置において、
前記ハードディスクは、前記先頭セクタ以降に順に少なくとも1以上のパーティションに区分けされ、最終のパーティションの終了セクタの後方領域に管理ファイルが格納されており、
前記MBRは、各パーティションの先頭セクタ及び終了セクタに関する情報が書き込まれたパーティションテーブルと、前記管理ファイルを前記情報処理装置の起動時に最初に前記主メモリに読み出す専用ローダとを格納しており、
前記管理ファイルは、前記情報処理装置の起動後に、前記メモリ部材に格納されている前記総容量情報の読み出し指令が発生した時、前記指令に対応して読み出された情報を前記最終のパーティションの終了セクタの情報に書き替える処理プログラムを含むものであることを特徴とする情報処理装置。
MBR in the first sector, at least the OS stored on the rear side thereof, a memory member that is associated with the hard disk and stores at least the total capacity information of the hard disk, a CPU, and the MBR of the MBR by the CPU In an information processing apparatus including a main memory from which the storage contents of the hard disk are read out after being activated,
The hard disk is sequentially divided into at least one partition after the first sector, and a management file is stored in the rear area of the end sector of the last partition,
The MBR stores a partition table in which information on the first sector and the end sector of each partition is written, and a dedicated loader that first reads the management file into the main memory when the information processing apparatus is activated,
When the read command for the total capacity information stored in the memory member is generated after the information processing apparatus is activated, the management file stores the information read corresponding to the command in the final partition. An information processing apparatus comprising a processing program for rewriting information of an end sector.
前記管理ファイルは、前記主メモリ上で前記OSより相対的に小さい特権レベルに設定されたものであることを特徴とする請求項1に記載の情報処理装置。 The information processing apparatus according to claim 1, wherein the management file is set to a privilege level relatively lower than that of the OS on the main memory. 前記専用ローダは、前記MBRに予め格納されていたブートストラップローダが書き替えられたものであることを特徴とする請求項1又は2に記載の情報処理装置。 3. The information processing apparatus according to claim 1, wherein the dedicated loader is obtained by rewriting a bootstrap loader previously stored in the MBR. 4. 前記MBRに予め格納されていたブートストラップローダは、前記専用ローダが書き込まれる前に前記最終のパーティションの終了セクタの後方領域に退避されていることを特徴とする請求項3に記載の情報処理装置。 4. The information processing apparatus according to claim 3, wherein the bootstrap loader previously stored in the MBR is saved in a region behind the end sector of the final partition before the dedicated loader is written. . 前記最終のパーティションの終了セクタは、前記管理ファイルの格納に際して元々のセクタから先頭側に狭められたものであることを特徴とする請求項1〜4のいずれかに記載の情報処理装置。 5. The information processing apparatus according to claim 1, wherein an end sector of the final partition is narrowed from an original sector to a head side when the management file is stored. 前記管理ファイルの格納領域は、前記最終のパーティションの終了セクタの後方側の全領域であることを特徴とする請求項1〜5のいずれかに記載の情報処理装置。 6. The information processing apparatus according to claim 1, wherein the management file storage area is an entire area on the rear side of an end sector of the final partition. 前記管理ファイルは、前記総容量情報から前記最終のパーティションの終了セクタの後方側の全領域分を差し引いて最終のパーティションの終了セクタを算出するものであることを特徴とする請求項1〜6のいずれかに記載の情報処理装置。 7. The management file according to claim 1, wherein the management file calculates an end sector of the final partition by subtracting the entire area behind the end sector of the final partition from the total capacity information. The information processing apparatus according to any one of the above. 前記管理ファイルは、前記メモリ部材に格納されている前記総容量情報の読み出し指令を受けて割込を実行することで、前記情報の書き替えを行うものであることを特徴とする請求項1〜7のいずれかに記載の情報処理装置。 The management file is a file for rewriting the information by executing an interrupt in response to a read command for the total capacity information stored in the memory member. The information processing apparatus according to any one of 7. 前記割込は、I/Oポートのうちの前記メモリ部材に対応するデータレジスタへの前記CPUによるアクセスを受けて行うことを特徴とする請求項8に記載の情報処理装置。 9. The information processing apparatus according to claim 8, wherein the interrupt is performed in response to an access by the CPU to a data register corresponding to the memory member in an I / O port. 前記割込は、メモリマップドI/Oのうちの前記メモリ部材に対応する前記CPUによるアクセスを、デバッグ例外、ページフォルト、及びハードウエア割込のうちの1つを受けて行うことを特徴とする請求項8に記載の情報処理装置。 The interrupt is performed by the CPU corresponding to the memory member of the memory mapped I / O by receiving one of a debug exception, a page fault, and a hardware interrupt. The information processing apparatus according to claim 8. 先頭セクタにMBRが格納され、前記先頭セクタ以降に少なくとも1つのOSが格納されるパーティションに区分けされたハードディスクに対して、インストーラを用いてファイルのインストールを行う方法であって、
前記ファイルは、前記ハードディスクに対応付けられ、当該ハードディスクの総容量情報が少なくとも格納されたメモリ部材から前記総容量情報に対する読み出し指令が、前記ハードディスクが搭載された情報処理装置の起動後に発生した時、前記指令に対応して読み出された情報を最終のパーティションの終了セクタの情報に書き替える処理プログラムを有する管理ファイルであり、
前記最終パーティションの終了セクタを少なくとも前記ファイルの容量に対応する容量分だけ先頭側に移動させて新たな終了セクタを設定するステップと、
前記新たな終了セクタから最終側に向けて前記ファイルを格納するステップと、
前記MBRに書き込まれている前記最終パーティションの終了セクタを新たな最終セクタに書き替えるステップと、
前記情報処理装置の起動時に前記ファイルを最初に前記情報処理装置の主メモリに読み出す専用ローダを前記MBRに書き込むステップとを有することを特徴とするファイルのインストール方法。
A method of installing a file by using an installer on a hard disk partitioned into partitions in which MBR is stored in a head sector and at least one OS is stored after the head sector,
The file is associated with the hard disk, and when a read command for the total capacity information from a memory member in which the total capacity information of the hard disk is stored is generated after the information processing apparatus on which the hard disk is mounted, A management file having a processing program for rewriting information read in response to the command to information on the end sector of the final partition;
Moving the end sector of the last partition to the start side by a capacity corresponding to at least the capacity of the file, and setting a new end sector;
Storing the file from the new end sector toward the end;
Rewriting the end sector of the last partition written in the MBR to a new last sector;
And a step of writing a dedicated loader that first reads the file into the main memory of the information processing apparatus when the information processing apparatus is activated.
前記専用ローダは、前記MBRに予め格納されていたブートストラップローダが書き替えられたものであることを特徴とする請求項11に記載のファイルのインストール方法。 12. The file installation method according to claim 11, wherein the dedicated loader is obtained by rewriting a bootstrap loader previously stored in the MBR.
JP2012266387A 2012-12-05 2012-12-05 Information processor, and method of installing file Pending JP2014112304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012266387A JP2014112304A (en) 2012-12-05 2012-12-05 Information processor, and method of installing file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012266387A JP2014112304A (en) 2012-12-05 2012-12-05 Information processor, and method of installing file

Publications (1)

Publication Number Publication Date
JP2014112304A true JP2014112304A (en) 2014-06-19

Family

ID=51169402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012266387A Pending JP2014112304A (en) 2012-12-05 2012-12-05 Information processor, and method of installing file

Country Status (1)

Country Link
JP (1) JP2014112304A (en)

Similar Documents

Publication Publication Date Title
US10810309B2 (en) Method and system for detecting kernel corruption exploits
CN110998582B (en) Secure storage device and computer security method
EP3123311B1 (en) Malicious code protection for computer systems based on process modification
JP6761476B2 (en) Systems and methods for auditing virtual machines
CN107977573B (en) Method and system for secure disk access control
KR101946982B1 (en) Process Evaluation for Malware Detection in Virtual Machines
US8856473B2 (en) Computer system protection based on virtualization
US9202046B2 (en) Systems and methods for executing arbitrary applications in secure environments
JP7036821B2 (en) Event filtering for virtual machine security application examples
Vasudevan et al. Lockdown: Towards a safe and practical architecture for security applications on commodity platforms
CN111353162B (en) TrustZone kernel-based asynchronous execution active trusted computing method and system
JP6370098B2 (en) Information processing apparatus, information processing monitoring method, program, and recording medium
US10430589B2 (en) Dynamic firmware module loader in a trusted execution environment container
CN105512550A (en) Systems and methods for active operating system kernel protection
Chubachi et al. Hypervisor-based prevention of persistent rootkits
WO2013069587A1 (en) Information processing space management method, external device, and information processing device
KR20170060815A (en) A Electronic Device And Method For Protecting The Kernel Space of the Memory
CN106775941A (en) A kind of virtual machine kernel completeness protection method and device
JP2014112304A (en) Information processor, and method of installing file
JP2018036695A (en) Information processing monitoring device, information processing monitoring method, monitoring program, recording medium, and information processing apparatus
Chen et al. DScope: To Reliably and Securely Acquire Live Data from Kernel-Compromised ARM Devices
KR20140059967A (en) Method and apparatus for detecting hacking process

Legal Events

Date Code Title Description
A625 Written request for application examination (by other person)

Free format text: JAPANESE INTERMEDIATE CODE: A625

Effective date: 20151202