JP2010020621A - Program recovery system and method - Google Patents

Program recovery system and method Download PDF

Info

Publication number
JP2010020621A
JP2010020621A JP2008181730A JP2008181730A JP2010020621A JP 2010020621 A JP2010020621 A JP 2010020621A JP 2008181730 A JP2008181730 A JP 2008181730A JP 2008181730 A JP2008181730 A JP 2008181730A JP 2010020621 A JP2010020621 A JP 2010020621A
Authority
JP
Japan
Prior art keywords
domain
program
main domain
state
main
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
JP2008181730A
Other languages
Japanese (ja)
Inventor
Hisashi Oguma
寿 小熊
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.)
Toyota Motor Corp
Toyota InfoTechnology Center Co Ltd
Original Assignee
Toyota Motor Corp
Toyota InfoTechnology Center Co Ltd
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 Toyota Motor Corp, Toyota InfoTechnology Center Co Ltd filed Critical Toyota Motor Corp
Priority to JP2008181730A priority Critical patent/JP2010020621A/en
Publication of JP2010020621A publication Critical patent/JP2010020621A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Hardware Redundancy (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program recovery system for recovering a program at fault while restraining primary processing from being affected. <P>SOLUTION: The program recovery system for recovering a program when a fault occurs in a main domain for executing a predetermined program in a multi-core system for providing at least two domains has, in one or more subdomains different from the main domain, a checking means for checking the state of the main domain; a restoring means for restoring the program when a fault occurs in the main domain; an emergency processing means for performing alternative processing of the program when the fault occurs in the main domain. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、マルチコアシステムにおけるプログラム修復システムおよび方法に関する。   The present invention relates to a program restoration system and method in a multi-core system.

継続的な運転が要求される計算機において、OSやプログラムが正常に運転を続けているか監視するための方式としてウォッチドッグタイマが知られている。OSやプログラムは、正常に動作している場合には、定期的にウォッチドッグタイマに信号を送る。一方、障害が発生すると、ウォッチドッグタイマには信号が入力されなくなる。一定時間以上信号の入力がないと、ウォッチドッグタイマはシステムをハードウェア的にリセットする。このような方法によるシステム監視では、再起動の間、計算機が一切のサービスを提供できないという問題がある。   In a computer that requires continuous operation, a watchdog timer is known as a method for monitoring whether an OS or a program continues to operate normally. If the OS or program is operating normally, it periodically sends a signal to the watchdog timer. On the other hand, when a failure occurs, no signal is input to the watchdog timer. If no signal is input for a certain period of time, the watchdog timer resets the system in hardware. The system monitoring by such a method has a problem that the computer cannot provide any service during the restart.

これに対し、特許文献1には、サービスを継続して提供するために、二重系システムによってサービス機能を部分的に維持する手法が開示されている。特許文献1では、二重系システムにおける各計算機が、サービスを提供するプログラムと、自己の故障を検出するプログラムとを1つのCPUで実行し、故障が修復可能であれば修復を行い、修復不可能であれば機能を部分的に維持して縮退運転を行う。
特開2007−140885号公報
On the other hand, Patent Document 1 discloses a technique for partially maintaining service functions using a dual system in order to provide services continuously. In Patent Document 1, each computer in a dual system executes a program that provides a service and a program that detects its own fault with a single CPU. If the fault can be repaired, it is repaired. If possible, perform partial operation while maintaining partial functionality.
JP 2007-140885 A

しかしながら、上記のような従来技術の場合には、1つのCPUで本来の処理と障害の有無を検査する処理を行っているため、本来の処理へのCPU割当時間の減少などによる悪影響が問題となりうる。厳しいリアルタイム性が要求されるシステムでは、CPU割当時間の減少に伴う遅延によって、リアルタイム要件を満足できなくなる場合がある。   However, in the case of the prior art as described above, since the original process and the process of checking for the presence or absence of a failure are performed by one CPU, an adverse effect due to a reduction in CPU allocation time for the original process becomes a problem. sell. In a system that requires strict real-time characteristics, real-time requirements may not be satisfied due to a delay associated with a decrease in CPU allocation time.

本発明は上記実情に鑑みてなされたものであって、その目的とするところは、本来の処理に対する影響を抑制しつつ、障害が発生したプログラムを修復する安全機能を付与する技術を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a technology for providing a safety function for repairing a program in which a failure has occurred while suppressing an influence on an original process. It is in.

上記目的を達成するために本発明では、以下の手段または処理によって障害が発生したプログラムの修復を行う。   In order to achieve the above object, the present invention repairs a program in which a failure has occurred by the following means or processing.

本発明は、マルチコアシステム上に構築されるプログラム修復システムであり、少なくとも2つの仮想的な実行環境であるドメインを提供し、主ドメインで実行中のプログラムに障害が発生したときにこれを修復するプログラム修復システムである。   The present invention is a program repair system constructed on a multi-core system, and provides a domain that is at least two virtual execution environments, and repairs a program that is running in a main domain when a failure occurs. It is a program repair system.

本明細書において、マルチコアシステムとは、複数のプロセッサコアを有するコンピュータシステムのことを意味する。したがって、1つのプロセッサパッケージの中に複数のプロセッサコアを含むシステムや、それぞれが1つのプロセッサコアを有する複数のプロセッサを含むシステムや、これらの組み合わせが、本明細書におけるマルチコアシステムに該当する。   In this specification, a multi-core system means a computer system having a plurality of processor cores. Therefore, a system including a plurality of processor cores in one processor package, a system including a plurality of processors each having one processor core, and a combination thereof correspond to the multi-core system in this specification.

本明細書において、ドメインとは、プログラムが実行される仮想的な領域・環境を表し、各ドメインは互いに独立しており原則として他のドメインにアクセスすることができない。したがって、各ドメイン内でプログラムに異常が発生した場合であっても、他のドメ
インに影響を与えることがない。
In this specification, a domain represents a virtual area / environment in which a program is executed. Each domain is independent of each other and cannot access other domains in principle. Therefore, even if an abnormality occurs in the program in each domain, it does not affect other domains.

このようなシステムにおいて、主ドメイン内で、ユーザにサービスを提供するためのプログラムを実行する。   In such a system, a program for providing a service to a user is executed in the main domain.

一方、主ドメインとは異なる1または複数のサブドメイン内で、主ドメインの状態を検査する検査手段と、主ドメインに障害が発生した場合に、上記プログラムを復元する復元手段と、主ドメインに障害が発生した場合に、上記プログラムの代替処理を行う緊急処理手段と、を有する。検査手段と復元手段とを1つのドメインで実行し、緊急処理手段を別のドメインで実行することが好ましいが、全ての手段を1つのドメインで実行してもよい。   On the other hand, in one or more subdomains different from the main domain, an inspection unit that checks the state of the main domain, a restoration unit that restores the above program when a failure occurs in the main domain, and a failure in the main domain Emergency processing means for performing a substitute process for the program in the event of occurrence of a problem. It is preferable that the inspection unit and the restoration unit are executed in one domain and the emergency processing unit is executed in another domain, but all the units may be executed in one domain.

本発明によれば、マルチコアシステムを採用しているため、サービス提供のためのプログラムと、検査のためのプログラムとを独立して動作させることができる。したがって、安全機能の付加が与える本来の処理への悪影響を最小限とすることができる。また、プログラムの復元中に、緊急処理手段によって代替処理を行うことができるので、少なくとも最低限の機能は維持しつつシステムの復元を行うことができる。   According to the present invention, since the multi-core system is adopted, the service providing program and the inspection program can be operated independently. Therefore, the adverse effect on the original processing given by the addition of the safety function can be minimized. In addition, since the substitute process can be performed by the emergency processing means during the restoration of the program, the system can be restored while maintaining at least the minimum functions.

本発明において、ユーザにサービスを提供するプログラムを提供する主ドメインはサブドメインへのアクセスが不可能なドメインであることが好適である。また、上記プログラムの検査・復元処理を行うサブドメインは、信頼されたプログラムのみを実行可能であり、主ドメインにアクセス可能なドメインであることが好適である。検査・復元処理を行うプログラムは、システム全体のセキュリティを担保するものであるので、これらのプログラムが改ざんされないようにセキュリティが確保されたドメイン内で実行することが好ましい。   In the present invention, it is preferable that a main domain that provides a program for providing a service to a user is a domain that cannot access a sub-domain. Further, it is preferable that the sub-domain that performs the program inspection / restoration processing is a domain that can execute only the trusted program and can access the main domain. Since the program for performing the inspection / restoration process guarantees the security of the entire system, it is preferable to execute the program in a domain in which security is ensured so that these programs are not tampered with.

本発明に係るプログラム修復システムにおいて、通常時は、前記検査手段と主ドメイン内のプログラムとが並列に実行されると共に、プログラム復元時は、前記復元手段と前記緊急処理手段が並列に実行されることが好適である。   In the program restoration system according to the present invention, the inspection unit and the program in the main domain are normally executed in parallel, and the restoration unit and the emergency processing unit are executed in parallel at the time of program restoration. Is preferred.

このようにすれば、検査処理や復元処理を実行中であっても、本来の処理や緊急処理が妨げられない。   In this way, even if the inspection process and the restoration process are being executed, the original process and the emergency process are not hindered.

また、本発明に係るプログラム修復システムは、主ドメイン内に、主ドメインの状態を記憶する状態記憶手段と、状態記憶手段を更新する状態変更手段を有することが好適である。この場合、上述の検査手段は、主ドメイン内にある状態記憶手段を参照して主ドメインの状態を検査する。   The program repair system according to the present invention preferably includes, in the main domain, state storage means for storing the state of the main domain and state change means for updating the state storage means. In this case, the above-described inspection unit inspects the state of the main domain with reference to the state storage unit in the main domain.

このようにすれば、主ドメイン内で行う必要のある処理は、自ドメイン内の状態記憶手段を更新する処理だけであり、作業コストが小さいものとなる。また、検査手段は状態記憶手段を参照することで、主ドメインの状態を検査することができる。したがって、プログラムを修復するための安全機能の付加が与える本来の処理への悪影響を最小限とすることができる。   In this way, the only process that needs to be performed in the main domain is the process of updating the state storage means in the own domain, and the work cost is low. Moreover, the inspection means can inspect the state of the main domain by referring to the state storage means. Therefore, it is possible to minimize the adverse effect on the original processing given by the addition of the safety function for restoring the program.

また、本発明における状態変更手段は、主ドメイン内で割り込み処理が発生するタイミングで、前記状態記憶手段を更新することが好適である。   In addition, it is preferable that the state change unit in the present invention updates the state storage unit at a timing when interrupt processing occurs in the main domain.

割り込み処理は主ドメインにおいて必須の機能であり、また、頻繁に行われるものであるため、状態記憶手段の更新も頻繁にされることになる。   Since the interrupt process is an essential function in the main domain and is frequently performed, the state storage means is frequently updated.

なお、本発明は、上記手段の少なくとも一部を有するプログラム修復システムとして捉えることができる。また、本発明は、上記処理の少なくとも一部を含むプログラム修復方法、または、かかる方法を実現するためのプログラムとして捉えることもできる。上記手段および処理の各々は可能な限り互いに組み合わせて本発明を構成することができる。   The present invention can be understood as a program repair system having at least a part of the above means. The present invention can also be understood as a program restoration method including at least a part of the above processing or a program for realizing such a method. Each of the above means and processes can be combined with each other as much as possible to constitute the present invention.

本発明によれば、本来の処理に与える影響を抑制しつつ、プログラムの障害発生の検出および修復を行うことが可能となる。   According to the present invention, it is possible to detect and repair the occurrence of a program failure while suppressing the influence on the original processing.

以下に図面を参照して、この発明の好適な実施の形態を例示的に詳しく説明する。   Exemplary embodiments of the present invention will be described in detail below with reference to the drawings.

本実施形態は、マルチプロセッサコアのCPUを有し、複数のドメインを有する処理システムである。各ドメインは、基本的に互いに独立した実行環境であり、他のドメインにアクセスすることができない。ただし、ドメイン間のアクセスを制御する機構を設けることで、他のドメインに対するアクセスが許可されたドメインを設けることができる。例えば、ARM社のTrustZone(登録商標)技術は安全ドメインと非安全ドメインを提供できるため、マルチコアプロセッサ上でTrustZoneを用いることで、複数のドメインを有する本処理システムを好適に実現可能である。   The present embodiment is a processing system having a multiprocessor core CPU and having a plurality of domains. Each domain is basically an execution environment independent of each other and cannot access other domains. However, by providing a mechanism for controlling access between domains, it is possible to provide a domain in which access to other domains is permitted. For example, ARM's TrustZone (registered trademark) technology can provide a secure domain and a non-secure domain, and therefore, by using TrustZone on a multi-core processor, this processing system having a plurality of domains can be suitably realized.

本処理システムで作動する種々のプログラムの概略図を図1に示す。このシステムでは、安全ドメイン120と非安全ドメイン130の2つのドメインが提供される。また、特権モードで動作し、安全ドメイン120と非安全ドメイン130との間の全ての変更を両方向に管理するモニタプログラム110が設けられる。   A schematic diagram of various programs operating in the processing system is shown in FIG. In this system, two domains are provided, a secure domain 120 and a non-secure domain 130. Also, a monitor program 110 is provided that operates in a privileged mode and manages all changes between the secure domain 120 and the non-secure domain 130 in both directions.

安全ドメイン120内では、安全オペレーティングシステム(OS)122が実行され、その上で複数の安全アプリケーションプログラム(AP)124,126が実行される。安全ドメイン120は、信頼されたプログラムのみが実行可能な環境であり、安全OS122や、安全AP124,126は、その信頼性が保証されたプログラムである。   Within the secure domain 120, a secure operating system (OS) 122 is executed, on which a plurality of safety application programs (AP) 124, 126 are executed. The safety domain 120 is an environment in which only a trusted program can be executed, and the safety OS 122 and the safety APs 124 and 126 are programs whose reliability is guaranteed.

非安全ドメイン130内では、非安全OS132が実行され、その上で複数の非安全AP134,136が実行される。これらの非安全AP134,136は、非安全OS132と協働して実行される。   In the non-secure domain 130, a non-secure OS 132 is executed, and a plurality of non-secure APs 134 and 136 are executed thereon. These non-secure APs 134 and 136 are executed in cooperation with the non-secure OS 132.

これらの実行環境は互いに独立しているため、あるドメインで異常が発生しても他のドメインに対して悪影響を及ぼすことがない。非安全ドメイン130側から安全ドメイン120側へのアクセスは、モニタプログラム110によって禁止されるので、非安全AP134,136が改ざんされたりしても、安全ドメイン120を改ざんしたりすることはできない。一方、安全ドメイン120側から非安全ドメイン130側へのアクセスは許可されるため、安全AP124,126は非安全ドメイン130に割り当てられたメモリにアクセスし、正常に動作しているかを検査したり、リセットをかけたりすることができる。   Since these execution environments are independent of each other, even if an abnormality occurs in one domain, it does not adversely affect other domains. Since the monitor program 110 prohibits access from the non-secure domain 130 side to the secure domain 120 side, the secure domain 120 cannot be tampered with even if the non-secure APs 134 and 136 are tampered with. On the other hand, since access from the secure domain 120 side to the non-secure domain 130 side is permitted, the secure APs 124 and 126 access the memory allocated to the non-secure domain 130 to check whether they are operating normally, It can be reset.

また、本処理システムはマルチコアプロセッサを採用しているため、安全ドメイン120内の安全AP124,126や、非安全ドメイン130内の非安全AP134,136は並列に実行可能である。   In addition, since this processing system employs a multi-core processor, the secure APs 124 and 126 in the secure domain 120 and the non-secure APs 134 and 136 in the non-secure domain 130 can be executed in parallel.

〈機能構成〉
次に、本実施形態に係るプログラム修復システムの機能構成を、図2を参照して説明する。本システムでは、主ドメイン10,検査ドメイン20、および緊急処理ドメイン30の3つのドメインを定義する。
<Functional configuration>
Next, the functional configuration of the program repair system according to the present embodiment will be described with reference to FIG. In this system, three domains are defined: a main domain 10, an inspection domain 20, and an emergency processing domain 30.

主ドメイン10は、ユーザにサービス機能を提供するアプリケーションプログラムが実行されるドメインであり、上述の非安全ドメインに相当する。   The main domain 10 is a domain in which an application program that provides a service function to a user is executed, and corresponds to the above-described non-secure domain.

また、検査ドメイン20は、主ドメイン10のサービス機能の状態が正常であるか検査し、異常が発生した場合には主ドメイン10を復元するプログラムが実行されるドメインであり、上述の安全ドメインに相当する。また、緊急処理ドメイン30は、主ドメイン10の復元中に、サービス機能の代替処理を行うプログラムが実行されるドメインであり、上述の安全ドメインに相当する。なお、ここでは、検査ドメイン20と緊急処理ドメイン30とを異なるドメインとしているが、これらを1つのドメイン(安全ドメイン)で構成しても構わない。   Further, the inspection domain 20 is a domain in which a program for restoring the main domain 10 is executed when the service function state of the main domain 10 is normal and an abnormality occurs. Equivalent to. Further, the emergency processing domain 30 is a domain in which a program for performing a service function substitution process is executed during the restoration of the main domain 10, and corresponds to the above-described safety domain. Here, although the inspection domain 20 and the emergency processing domain 30 are different domains, they may be configured as one domain (safety domain).

検査ドメイン20および緊急処理ドメイン30は、改ざんされないことが必要である。これらのドメインを非安全ドメインから独立した安全ドメインとすることで、悪意のある非安全ドメイン内のプログラムからの改ざんを防ぐことができる。さらに、ROMに格納されたプログラムイメージ自体の改ざんを防ぐために、セキュアブートを利用して攻撃や事故などを防ぐことが好ましい。セキュアブートは、電源投入直後に起動されるブートROMやBIOSを検証し、ブートプロセスにおける信用の連鎖を確立しながら、プラットフォームが改ざんされていないことを保証する技術である。   The inspection domain 20 and the emergency processing domain 30 need not be tampered with. By making these domains secure domains independent of non-secure domains, it is possible to prevent tampering with programs in malicious non-secure domains. Furthermore, in order to prevent falsification of the program image itself stored in the ROM, it is preferable to prevent attacks and accidents by using secure boot. Secure boot is a technology that ensures that the platform has not been tampered with while verifying the boot ROM and BIOS that are activated immediately after power-on, and establishing a chain of trust in the boot process.

主ドメイン10は、ユーザにサービス機能を提供するアプリケーションプログラム以外に、割り込み処理部11、主ドメイン状態変更部12、および主ドメイン状態記憶部13を有する。   The main domain 10 includes an interrupt processing unit 11, a main domain state change unit 12, and a main domain state storage unit 13 in addition to an application program that provides a service function to a user.

検査ドメイン20は、主ドメイン状態参照部21、主ドメイン状態比較部22、主ドメイン前状態記憶部23、比較処理制御部24、緊急状態制御部25、および主ドメイン復元部26を有する。   The inspection domain 20 includes a main domain state reference unit 21, a main domain state comparison unit 22, a main domain pre-state storage unit 23, a comparison processing control unit 24, an emergency state control unit 25, and a main domain restoration unit 26.

緊急処理ドメイン30は、緊急処理用ソフトウェア31を有する。   The emergency processing domain 30 has emergency processing software 31.

なお、上記の各機能部は、ROMに格納されたプログラムがCPUによって実行されることで、その機能が実現されるが、一部についてはハードウェアとして実装しても構わない。   In addition, although each said function part implement | achieves the function by the program stored in ROM being performed by CPU, a part may be mounted as hardware.

各機能部について、その処理内容を示すフローチャート共に説明する。図3は主ドメイン10による処理、図4は検査ドメイン20による検査処理、図5は検査ドメイン20による復元処理および緊急処理ドメイン30による緊急処理を示すフローチャートである。   Each functional unit will be described together with a flowchart showing the processing contents. FIG. 3 is a flowchart showing processing by the main domain 10, FIG. 4 is inspection processing by the inspection domain 20, and FIG. 5 is a flowchart showing restoration processing by the inspection domain 20 and emergency processing by the emergency processing domain 30.

〈主ドメインの処理〉
まず、主ドメイン10の各機能部について、図3のフローチャートとともに説明する。主ドメイン10では、割り込みが発生すると、割り込み信号が割り込み処理部11に通知される。このような割り込み信号は、主ドメインで行われるページフォルトやI/O制御の際に生じる。割り込み処理部11は、割り込み信号に対する本来の処理の前に、主ドメイン状態変更部12を起動する(ステップS10)。
<Main domain processing>
First, each functional unit of the main domain 10 will be described with reference to the flowchart of FIG. In the main domain 10, when an interrupt occurs, an interrupt signal is notified to the interrupt processing unit 11. Such an interrupt signal is generated when a page fault or I / O control is performed in the main domain. The interrupt processing unit 11 activates the main domain state changing unit 12 before the original processing for the interrupt signal (step S10).

すると、主ドメイン状態変更部12は、主ドメイン状態記憶部13の内容を更新する(ステップS11)。なお、主ドメイン状態記憶部13に記憶されるデータのことを、主ドメイン10の状態値、または単に、状態値と呼ぶことにする。割り込み信号は頻繁に発生するので、主ドメイン10が正常に稼働していれば主ドメイン状態記憶部13の状態値は、常時更新されることになる。なお、主ドメイン状態変更部12による状態値の更新は、
短期間の間に重複した値をとらないことが望ましい。例えば、主ドメイン状態変更部12は、状態値を単にインクリメントしても良い。
Then, the main domain state change unit 12 updates the contents of the main domain state storage unit 13 (step S11). The data stored in the main domain state storage unit 13 is referred to as a state value of the main domain 10 or simply a state value. Since interrupt signals are frequently generated, if the main domain 10 is operating normally, the state value of the main domain state storage unit 13 is constantly updated. The update of the state value by the main domain state changing unit 12 is
It is desirable not to take duplicate values for a short period of time. For example, the main domain state changing unit 12 may simply increment the state value.

主ドメイン10の状態値が更新されると、割り込み処理部11が、割り込み信号に対する本来の処理を実行する(ステップS13)。なお、ここでは割り込み信号処理の前に状態値の更新を行っているが、割り込み信号処理の後に状態の更新を行っても構わない。   When the state value of the main domain 10 is updated, the interrupt processing unit 11 executes original processing for the interrupt signal (step S13). Although the state value is updated before interrupt signal processing here, the state may be updated after interrupt signal processing.

〈検査ドメインによる検査処理〉
次に、検査ドメイン20の各機能部について、図4のフローチャートとともに説明する。検査ドメイン20では、定期的に主ドメイン10の検査を行い、異常が発生していれば主ドメイン10の復元処理を行う。なお、本システムは、マルチコアシステムで動作しているため、主ドメインの処理と検査ドメインの処理とを並行して実行可能であり、検査ドメインによる検査処理が主ドメインの動作に悪影響を及ぼさない。
<Inspection processing by inspection domain>
Next, each functional unit of the inspection domain 20 will be described with reference to the flowchart of FIG. In the inspection domain 20, the main domain 10 is periodically inspected, and if an abnormality has occurred, the main domain 10 is restored. Since the present system operates in a multi-core system, the processing of the main domain and the processing of the inspection domain can be executed in parallel, and the inspection processing by the inspection domain does not adversely affect the operation of the main domain.

まず、比較処理制御部24が起動して(ステップS20)処理が開始される。比較処理制御部24は、主ドメイン状態比較部22を起動する(ステップS21)。主ドメイン状態比較部22は、主ドメイン前状態記憶部23を参照する(ステップS22)。なお、主ドメイン前状態記憶部23には、後述するように、検査処理を行うたびにドメインの状態値が格納されるので、直近の検査処理後の状態値を取得することができる。また、主ドメイン状態参照部21が、主ドメイン状態記憶部13を参照して、現在の主ドメインの状態値を取得する(ステップS23)。上述したように、検査ドメインは主ドメインよりもセキュリティレベルが高いので、検査ドメインからは主ドメインを参照することが可能である。   First, the comparison process control unit 24 is activated (step S20), and the process is started. The comparison process control unit 24 activates the main domain state comparison unit 22 (step S21). The main domain state comparison unit 22 refers to the main domain pre-state storage unit 23 (step S22). As will be described later, since the state value of the domain is stored in the state storage unit 23 before the main domain every time the inspection process is performed, the state value after the latest inspection process can be acquired. Further, the main domain state reference unit 21 refers to the main domain state storage unit 13 and acquires the current state value of the main domain (step S23). As described above, since the inspection domain has a higher security level than the main domain, it is possible to refer to the main domain from the inspection domain.

そして、主ドメイン状態比較部22が、ステップS22で取得した主ドメインの直前の状態値と、ステップS23で取得した主ドメインの現在の状態値とを比較する(ステップS24)。主ドメインの状態値は、主ドメインが正常に稼働している間は、主ドメイン状態変更部12によって随時更新されるものであるので、異なるタイミングで取得した2つの状態値は異なるものとなる。逆に、2つの状態値が一致している場合には、主ドメインに異常が発生したとみなすことができる。このようにして、主ドメインが動作しているか、または障害により停止しているかを判断することができる。   Then, the main domain state comparison unit 22 compares the state value immediately before the main domain acquired in step S22 with the current state value of the main domain acquired in step S23 (step S24). Since the state value of the main domain is updated as needed by the main domain state changing unit 12 while the main domain is operating normally, the two state values acquired at different timings are different. Conversely, when the two state values match, it can be considered that an abnormality has occurred in the main domain. In this way, it can be determined whether the main domain is operating or has stopped due to a failure.

そこで、ステップS24の比較結果として、2つの状態値が異なる場合(S25:NO)は、主ドメインは正常であると判断し、今回取得した状態値を主ドメイン前状態記憶部23に格納して、処理を終わる(ステップS26)。そして、一定時間が経過した後、検査処理が再び実行される。   Therefore, if the two state values are different as a comparison result in step S24 (S25: NO), it is determined that the main domain is normal, and the state value acquired this time is stored in the main domain pre-state storage unit 23. The process ends (step S26). Then, after a certain time has passed, the inspection process is executed again.

一方、ステップS24の比較結果として、2つの状態値が一致する場合(S25:YES)は、主ドメインに異常が発生したと判断し、復元処理を開始する(ステップS27)。復元処理については、以下で説明する。   On the other hand, if the two state values match as a comparison result in step S24 (S25: YES), it is determined that an abnormality has occurred in the main domain, and the restoration process is started (step S27). The restoration process will be described below.

〈検査ドメインによる復元処理および緊急処理ドメインによる緊急処理〉
主ドメイン10に異常が発生したことが検知されると、主ドメイン状態比較部22は主ドメイン10を停止し、緊急状態制御部25が緊急処理ドメイン30を起動させる(ステップS30)。緊急処理用ソフトウェア31は、主ドメイン10のユーザにサービスを提供しているプログラムの代替処理を実行する(ステップS31)。緊急処理用ソフトウェア31は、主ドメインソフトウェアと同等の機能を提供しても良いが、緊急処理に備えて容量の大きなプログラムを格納しておくとメモリ使用効率が悪いので、サービスを続行するために最低限必要な機能のみを提供すればよい。
<Restoration process by inspection domain and emergency process by emergency process domain>
When it is detected that an abnormality has occurred in the main domain 10, the main domain state comparison unit 22 stops the main domain 10, and the emergency state control unit 25 activates the emergency processing domain 30 (step S30). The emergency processing software 31 executes an alternative process for a program that provides a service to the user of the main domain 10 (step S31). The emergency processing software 31 may provide a function equivalent to that of the main domain software. However, if a large-capacity program is stored in preparation for emergency processing, the memory use efficiency is poor. It is sufficient to provide only the minimum necessary functions.

そして、主ドメイン復元部26が、主ドメインのソフトウェアを復元する(ステップS32)。これは、例えば、主ドメインのサービス提供プログラムを再起動したり、主ドメインのOSを再起動したりすることで実行可能である。主ドメイン10が復旧するまで待機する(ステップS33)が、この間は、緊急処理用ソフトウェア31がサービスを提供し続ける。本システムは、マルチコアシステムであるので、主ドメイン10の復元処理と、緊急処理用ソフトウェア31を並行して実行可能であり、主ドメイン10を復元中であってもサービスの提供を続行可能である。   Then, the main domain restoring unit 26 restores the software of the main domain (step S32). This can be executed, for example, by restarting the service providing program of the main domain or restarting the OS of the main domain. While waiting until the main domain 10 is restored (step S33), the emergency processing software 31 continues to provide services during this period. Since this system is a multi-core system, the restoration process of the main domain 10 and the emergency processing software 31 can be executed in parallel, and the provision of services can be continued even while the main domain 10 is being restored. .

主ドメイン10が復旧したら、主ドメイン状態参照部21が、主ドメイン状態記憶部13を参照して、その状態値を主ドメイン前状態記憶部23に保存する(ステップS34)。これにより、その後の検査処理が正しく行えるようになる。また、主ドメイン復元部26が、比較処理制御部24の次回の起動時期を決定する(ステップS35)。以上により、主ドメイン復元部26の処理は終了する。   When the primary domain 10 is restored, the primary domain state reference unit 21 refers to the primary domain state storage unit 13 and stores the state value in the pre-main domain state storage unit 23 (step S34). As a result, the subsequent inspection process can be performed correctly. Further, the main domain restoring unit 26 determines the next activation timing of the comparison processing control unit 24 (step S35). Thus, the process of the main domain restoring unit 26 is finished.

そして、緊急処理ドメイン30から主ドメイン10に切り替える(ステップS36)ことで、ユーザにサービスを提供するプログラムを本来のものに戻し、正常状態に復帰する。これ以降は、比較処理制御部24が、所定の間隔で実行されて、再び主ドメイン10を監視することになる。   Then, by switching from the emergency processing domain 30 to the main domain 10 (step S36), the program that provides the service to the user is returned to the original one, and the normal state is restored. Thereafter, the comparison processing control unit 24 is executed at a predetermined interval and monitors the main domain 10 again.

〈本実施形態の作用・効果〉
本実施形態のプログラム修復システムでは、各コアが並列に動作するマルチコアシステムを利用して、サービス機能を動作させる主ドメインと、主ドメインを監視する検査ドメインを並列に実行可能である。したがって、検査ドメインによる検査処理が、主ドメインの処理に対して与える悪影響を抑制することができる。
<Operation and effect of this embodiment>
In the program repair system of this embodiment, a main domain that operates a service function and a test domain that monitors the main domain can be executed in parallel using a multi-core system in which each core operates in parallel. Therefore, it is possible to suppress the adverse effect of the inspection processing by the inspection domain on the processing of the main domain.

また、この検査処理のために、主ドメイン側が追加で行わなければならない処理は、割り込み発生時の主ドメイン状態記憶部の更新処理だけである。この処理は、負荷の軽い処理であるので、主ドメインに与える悪影響を少なくすることができる。割り込みは頻繁に発生するものなので、状態値は随時更新されることになる。また、割り込みハンドラに状態更新処理を追加するだけでよいので、主ドメイン側のプログラム変更も最小限とすることができる。   In addition, the only process that the main domain side has to perform for this inspection process is the update process of the main domain state storage unit when an interrupt occurs. Since this process is a process with a light load, adverse effects on the main domain can be reduced. Since interrupts occur frequently, the status value is updated from time to time. Further, since it is only necessary to add state update processing to the interrupt handler, program change on the main domain side can be minimized.

また、緊急処理用ソフトウェアを用意し、主ドメインのプログラム復元時にこの緊急処理プログラムを動作させることで、復元処理の間も最低限の機能の提供は継続することができる。   Also, by providing emergency processing software and operating this emergency processing program when restoring the main domain program, it is possible to continue providing the minimum functions during the restoration processing.

このように、本実施形態のプログラム修復システムでは、通常時に余計な負荷を与えず、また、異常発生時であってもサービス機能の提供を継続できる。つまり、本来の処理に対する悪影響を最小限としつつも、障害が発生したプログラムを修復することが可能となる。   As described above, in the program repair system of this embodiment, an extra load is not given during normal times, and the provision of service functions can be continued even when an abnormality occurs. That is, it is possible to repair a program in which a failure has occurred while minimizing the adverse effect on the original processing.

(変形例)
上記の実施形態では、主ドメインで状態値を更新・格納しておき、復元ドメインがこの値の変化を監視することで、主ドメインが正常に動作しているか否かを判断していた。しかしながら、主ドメインが正常に動作しているか否かの検査は、このような方法に限られるものではない。例えば、検査ドメインは、主ドメイン内のプログラムの正しいハッシュ値を記憶しておき、検査の際にはプログラムのハッシュ値を求めて記憶しておいたものと一致するか否かを判断してもよい。この方法によれば、主ドメイン内のプログラムの改ざんを検出することが可能である。なお、このように、プログラムの改ざんも「障害」に該当する。
(Modification)
In the above embodiment, the state value is updated and stored in the main domain, and the restoration domain monitors the change in this value to determine whether or not the main domain is operating normally. However, checking whether or not the main domain is operating normally is not limited to such a method. For example, the inspection domain stores the correct hash value of the program in the main domain, and determines whether or not the hash value of the program matches the stored hash value at the time of inspection. Good. According to this method, it is possible to detect falsification of a program in the main domain. In this way, alteration of the program also corresponds to “failure”.

また、複数のドメインを提供するための仕組みは、図1で説明したようにモニターソフトウェアによってドメインを区切る方法に限られるものではない。例えば、図6に示すように、各コアに固有のRAM領域を割り当て、その上でそれぞれがOSを稼働する。そして、チップとバスとの間に設けたフィルタによって、あるコアからの別のコアに割り当てられたRAM領域へのアクセスを禁止することでドメインの分離が実現できる。さらに、あるコアから他のコアに対してアクセスを許可するようにしておけば、安全ドメインと非安全ドメインとの区別を設けることができる。   Further, the mechanism for providing a plurality of domains is not limited to the method of dividing the domains by the monitor software as described in FIG. For example, as shown in FIG. 6, a unique RAM area is allocated to each core, and each of them operates the OS. Domain separation can be realized by prohibiting access from one core to a RAM area allocated to another core using a filter provided between the chip and the bus. Further, if access is permitted from one core to another core, it is possible to distinguish between a secure domain and a non-secure domain.

また、図7に示すように、マルチコアシステム上でホストOSを実行、その中で仮想マシン環境(プログラム)を実現し、仮想マシン環境上でゲストOSを実行することで、ドメインを区切ってもよい。各ゲストOSは、仮想的に独立した実行環境である。そして、ゲストOSからはホストOSに対してアクセスができないものの、ホストOSはゲストOSに対してアクセスすることができる。よって、ホストOSが安全ドメインで、ゲストOSが非安全ドメインとすることができる。   Further, as shown in FIG. 7, the host OS may be executed on the multi-core system, the virtual machine environment (program) may be realized therein, and the guest OS may be executed on the virtual machine environment to divide the domains. . Each guest OS is a virtually independent execution environment. Although the guest OS cannot access the host OS, the host OS can access the guest OS. Therefore, the host OS can be a secure domain and the guest OS can be a non-secure domain.

安全ドメインと非安全ドメインを説明する図である。It is a figure explaining a safety domain and a non-safety domain. 本実施形態に係るプログラム修復システムの機能ブロック図を示す図である。It is a figure which shows the functional block diagram of the program restoration system which concerns on this embodiment. 主ドメインによる処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the process by a main domain. 検査ドメインによる検査処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the inspection process by an inspection domain. 検査ドメインによる復元処理および緊急処理ドメインによる緊急処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the restoration process by a test | inspection domain, and the emergency process by an emergency process domain. 安全ドメインと非安全ドメインを実現する別の例を示す図である。It is a figure which shows another example which implement | achieves a safety domain and a non-safety domain. 安全ドメインと非安全ドメインを実現する別の例を示す図である。It is a figure which shows another example which implement | achieves a safety domain and a non-safety domain.

符号の説明Explanation of symbols

10 主ドメイン
11 割り込み処理部
12 主ドメイン状態変更部
13 主ドメイン状態記憶部
20 検査ドメイン
21 主ドメイン状態参照部
22 主ドメイン状態比較部
23 主ドメイン前状態記憶部
24 比較処理制御部
25 緊急状態制御部
26 主ドメイン復元部
30 緊急処理ドメイン
31 緊急処理用ソフトウェア
DESCRIPTION OF SYMBOLS 10 Main domain 11 Interrupt processing part 12 Main domain state change part 13 Main domain state memory | storage part 20 Inspection domain 21 Main domain state reference part 22 Main domain state comparison part 23 Main domain previous state memory part 24 Comparison process control part 25 Emergency state control 26 Main domain restoration unit 30 Emergency processing domain 31 Emergency processing software

Claims (10)

少なくとも2つのドメインを提供するマルチコアシステムにおいて、所定のプログラムを実行する主ドメインに障害が発生した場合に、当該プログラムを修復するプログラム修復システムであって、
主ドメインとは異なる1または複数のサブドメイン内に、
主ドメインの状態を検査する検査手段と、
主ドメインに障害が発生した場合に前記プログラムを復元する復元手段と、
主ドメインに障害が発生した場合に前記プログラムの代替処理を実行する緊急処理手段と、
を有することを特徴とするプログラム修復システム。
In a multi-core system that provides at least two domains, when a failure occurs in a main domain that executes a predetermined program, a program repair system that repairs the program,
In one or more subdomains different from the primary domain,
Inspection means for inspecting the state of the main domain;
A restoring means for restoring the program when a failure occurs in the primary domain;
Emergency processing means for executing alternative processing of the program when a failure occurs in the main domain;
A program repair system comprising:
主ドメインは、前記サブドメインにアクセス不可能であり、
前記サブドメインは、信頼されたプログラムのみを実行可能であり、かつ、主ドメインにアクセス可能である、
ことを特徴とする請求項1に記載のプログラム修復システム。
The primary domain is inaccessible to the subdomain;
The sub-domain can only execute trusted programs and can access the primary domain;
The program repair system according to claim 1.
通常時は、前記検査手段と前記プログラムとが並列に実行され、
プログラム復元時は、前記復元手段と前記緊急処理手段とが並列に実行される、
ことを特徴とする請求項1または2に記載のプログラム修復システム。
Normally, the inspection means and the program are executed in parallel,
At the time of program restoration, the restoration means and the emergency processing means are executed in parallel.
The program restoration system according to claim 1 or 2, wherein
主ドメインの状態を記憶する状態記憶手段と、
前記状態記憶手段を更新する状態変更手段と、
を主ドメイン内に有し、
前記検査手段は、前記状態記憶手段を参照して主ドメインの状態を検査する
ことを特徴とする請求項1〜3のいずれか1項に記載のプログラム修復システム。
State storage means for storing the state of the main domain;
State changing means for updating the state storage means;
In the main domain,
The program repair system according to any one of claims 1 to 3, wherein the checking unit checks the state of the main domain with reference to the state storage unit.
前記状態変更手段は、主ドメイン内で割り込み処理が発生するタイミングで、前記状態記憶手段を更新する
ことを特徴とする請求項4に記載のプログラム修復システム。
The program restoration system according to claim 4, wherein the state change unit updates the state storage unit at a timing when an interrupt process occurs in the main domain.
少なくとも2つのドメインを提供するマルチコアシステムにおいて、所定のプログラムを実行する主ドメインに障害が発生した場合に、当該プログラムを修復するプログラム修復方法であって、
主ドメインとは異なる1または複数のサブドメイン内において、
主ドメインの状態を検査する工程と、
主ドメインに障害が発生した場合に前記プログラムを復元する工程と、
主ドメインに障害が発生した場合に前記プログラムの代替処理を実行する工程と、
を実行することを特徴とするプログラム修復方法。
In a multi-core system providing at least two domains, when a failure occurs in a main domain that executes a predetermined program, a program repair method for repairing the program,
Within one or more subdomains different from the main domain,
Inspecting the state of the main domain;
Restoring the program in the event of a failure in the primary domain;
Executing a replacement process of the program when a failure occurs in the main domain;
A program repairing method characterized by executing
主ドメインは、前記サブドメインにアクセス不可能であり、
前記サブドメインは、信頼されたプログラムのみを実行可能であり、かつ、主ドメインにアクセス可能である、
ことを特徴とする請求項6に記載のプログラム修復方法。
The primary domain is inaccessible to the subdomain;
The sub-domain can only execute trusted programs and can access the primary domain;
The program repair method according to claim 6.
通常時は、前記検査する工程と前記プログラムとを並列に実行し、
プログラム復元時は、前記復元する工程と前記代替処理を行う工程とを並列に実行する
ことを特徴とする請求項6または7に記載のプログラム修復方法。
Usually, the step of inspecting and the program are executed in parallel,
8. The program restoration method according to claim 6, wherein at the time of program restoration, the step of restoring and the step of performing the substitution process are executed in parallel.
主ドメイン内で、主ドメインの状態を記憶する状態記憶手段を更新する工程を実行し、
前記検査する工程では、前記状態記憶手段を参照して主ドメインの状態を検査する
ことを特徴とする請求項6〜8のいずれか1項に記載のプログラム修復方法。
In the main domain, execute a step of updating the state storage means for storing the state of the main domain,
The program repair method according to claim 6, wherein in the checking step, the state of the main domain is checked with reference to the state storage unit.
前記状態記憶手段を更新する工程は、主ドメイン内で割り込み処理が発生するタイミングで行われる
ことを特徴とする請求項9に記載のプログラム修復方法。
The program repair method according to claim 9, wherein the step of updating the state storage unit is performed at a timing at which an interrupt process occurs in the main domain.
JP2008181730A 2008-07-11 2008-07-11 Program recovery system and method Pending JP2010020621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008181730A JP2010020621A (en) 2008-07-11 2008-07-11 Program recovery system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008181730A JP2010020621A (en) 2008-07-11 2008-07-11 Program recovery system and method

Publications (1)

Publication Number Publication Date
JP2010020621A true JP2010020621A (en) 2010-01-28

Family

ID=41705433

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008181730A Pending JP2010020621A (en) 2008-07-11 2008-07-11 Program recovery system and method

Country Status (1)

Country Link
JP (1) JP2010020621A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013132646A1 (en) * 2012-03-09 2013-09-12 パイオニア株式会社 Information processing device, information processing method, recording medium on which an information processing program is recorded, and information processing program
CN105247491A (en) * 2013-06-07 2016-01-13 三菱电机株式会社 Computer system and control method
JP2017033236A (en) * 2015-07-31 2017-02-09 日立オートモティブシステムズ株式会社 Vehicle controller
JP2021096729A (en) * 2019-12-19 2021-06-24 日立Astemo株式会社 Electronic control apparatus for automobile

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001101032A (en) * 1999-09-29 2001-04-13 Hitachi Ltd Os monitoring system under inter-different kind of os control
JP2001101034A (en) * 1999-09-29 2001-04-13 Hitachi Ltd Fault restoring method under inter-different kind of os control
JP2003186681A (en) * 2001-12-18 2003-07-04 Hitachi Ltd Multiple computer system
JP2007226277A (en) * 2004-04-02 2007-09-06 Matsushita Electric Ind Co Ltd Method and apparatus for virtual machine alteration inspection
WO2008062647A1 (en) * 2006-11-02 2008-05-29 Nec Corporation Multiprocessor system, system configuration method in multiprocessor system, and program thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001101032A (en) * 1999-09-29 2001-04-13 Hitachi Ltd Os monitoring system under inter-different kind of os control
JP2001101034A (en) * 1999-09-29 2001-04-13 Hitachi Ltd Fault restoring method under inter-different kind of os control
JP2003186681A (en) * 2001-12-18 2003-07-04 Hitachi Ltd Multiple computer system
JP2007226277A (en) * 2004-04-02 2007-09-06 Matsushita Electric Ind Co Ltd Method and apparatus for virtual machine alteration inspection
WO2008062647A1 (en) * 2006-11-02 2008-05-29 Nec Corporation Multiprocessor system, system configuration method in multiprocessor system, and program thereof

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013132646A1 (en) * 2012-03-09 2013-09-12 パイオニア株式会社 Information processing device, information processing method, recording medium on which an information processing program is recorded, and information processing program
CN105247491A (en) * 2013-06-07 2016-01-13 三菱电机株式会社 Computer system and control method
US9880888B2 (en) 2013-06-07 2018-01-30 Mitsubishi Electric Corporation Executing an operating system in a multiprocessor computer system
CN105247491B (en) * 2013-06-07 2019-03-12 三菱电机株式会社 Computer system and controlling method
JP2017033236A (en) * 2015-07-31 2017-02-09 日立オートモティブシステムズ株式会社 Vehicle controller
CN107533498A (en) * 2015-07-31 2018-01-02 日立汽车系统株式会社 Controller of vehicle
US10788826B2 (en) 2015-07-31 2020-09-29 Hitachi Automotive Systems, Ltd. Vehicle control device
CN107533498B (en) * 2015-07-31 2020-10-30 日立汽车系统株式会社 Vehicle control device
JP2021096729A (en) * 2019-12-19 2021-06-24 日立Astemo株式会社 Electronic control apparatus for automobile
JP7397655B2 (en) 2019-12-19 2023-12-13 日立Astemo株式会社 Automotive electronic control unit

Similar Documents

Publication Publication Date Title
US8122285B2 (en) Arrangements detecting reset PCI express bus in PCI express path, and disabling use of PCI express device
JP4708414B2 (en) Autonomous memory checker for runtime security assurance
US8219851B2 (en) System RAS protection for UMA style memory
US9205809B2 (en) Vehicle unit and method for operating the vehicle unit
JP2008305317A (en) Multiprocessor system and control method thereof
WO2020239060A1 (en) Error recovery method and apparatus
BRPI0720666A2 (en) AUTOMATIC VULNERABILITY DETECTION AND RESPONSE
WO2007080931A1 (en) Debug supporting device, and program for causing computer to execute debug processing method
WO2006086302A1 (en) Method and system for validating a computer system
US20140025991A1 (en) Core diagnostics and repair
US8930764B2 (en) System and methods for self-healing from operating system faults in kernel/supervisory mode
EP3314515B1 (en) Notice of intrusion into firmware
CN110069361A (en) Method and device for TPM (trusted platform Module) failover
US20170177431A1 (en) Computer system
JP2010020621A (en) Program recovery system and method
JP5716824B2 (en) Multi-core processor system
Larrucea et al. A modular safety case for an IEC 61508 compliant generic COTS processor
US20210149756A1 (en) Variable memory diagnostics
JP2009282751A (en) Program inspection system and method
WO2008004330A1 (en) Multiple processor system
US11256499B2 (en) Hotfix-firmware having updates to a firmware at runtime
KR20090000576A (en) Apparatus and method for providing security
JP5920509B2 (en) Controller control program and controller control method
CA2498656A1 (en) Method for synchronizing events, particularly for processors of fault-tolerant systems
JP4066950B2 (en) Computer system and maintenance method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101126

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121029

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121106

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130305