JP7081805B2 - Information processing equipment, load module generation methods and programs, and dynamic program update systems and methods - Google Patents
Information processing equipment, load module generation methods and programs, and dynamic program update systems and methods Download PDFInfo
- Publication number
- JP7081805B2 JP7081805B2 JP2018117827A JP2018117827A JP7081805B2 JP 7081805 B2 JP7081805 B2 JP 7081805B2 JP 2018117827 A JP2018117827 A JP 2018117827A JP 2018117827 A JP2018117827 A JP 2018117827A JP 7081805 B2 JP7081805 B2 JP 7081805B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- module
- target
- function
- memory
- 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.)
- Active
Links
Images
Description
本発明は、情報処理装置、ロードモジュール生成方法及びプログラム、並びに、動的プログラム更新システム及び方法に関し、特に、プログラムを動的に更新するための情報処理装置、ロードモジュール生成方法及びプログラム、並びに、動的プログラム更新システム及び方法に関する。 The present invention relates to an information processing apparatus, a load module generation method and program, and a dynamic program update system and method, and in particular, an information processing apparatus for dynamically updating a program, a load module generation method and program, and a dynamic program update system and method. Regarding dynamic program update system and method.
特許文献1には、サービスの無中断が要求されるオンラインシステム等におけるプログラム更新方法に関する技術が開示されている。特許文献1にかかるプログラム更新方法では、まず、プログラム内の複数の関数のうち変更対象の関数のみ、変更後のコードを実装した関数モジュール(新ロードモジュール)を作成する。そして、当該プログラム更新方法では、新ロードモジュールをメモリへロードし、メモリ上のアドレスを決定する。その後、当該プログラム更新方法では、元のプログラムにおけるメモリ上の変更対象の関数の先頭アドレスに、新ロードモジュールの先頭アドレスへのジャンプ命令を書き込む。
特許文献2には、特許文献1におけるパッチ適用の度にメモリ使用量が増加する課題を解決するためになされた、プログラム動的更新システムに関する技術が開示されている。特許文献2にかかるシステムの管理サーバは、更新後関数と共に、更新後関数の相対アドレスを含めた更新情報ファイルを作成する。そして、組込み機器は、更新情報ファイルを読み込み、更新後関数のメモリ上のアドレスを決定し、更新前関数内の制御移行先に決定されたアドレスを書き込む。併せて、組込み機器は、当該更新前関数の先頭アドレスに当該制御移行先を宛先として参照する制御移行命令を書き込む。そのため、プログラムの実行時には、更新前関数の先頭アドレスにおいて、制御移行先のアドレスへの制御移行命令が処理され、更新前関数の内容が処理されずに、更新後関数の内容が処理される。
特許文献3には、共有ライブラリを参照する実行可能ファイルを管理する方法に関する技術が開示されている。特許文献3にかかる方法では、動的実行可能ファイルから参照する共有ライブラリを修正するために、参照ファイル(META)とサービスファイルを作成する。ここで、参照ファイルは、共有ライブラリ内の修正対象の関数が動的実行可能ファイルから参照される際におけるリンク先の定義を数式で記述したものである。また、サービスファイルは、修正対象の関数の記述である。そして、当該方法では、動的実行可能ファイルの実行開始時に、参照ファイルをメモリにロードし、参照ファイル内の定義を優先して、動的実行可能ファイル内の各関数と参照ファイル内の関数定義とをリンクする。また、参照ファイル内に関数定義がない場合には、動的実行可能ファイル内の関数と共有ライブラリ内の関数とをリンクする。 Patent Document 3 discloses a technique relating to a method of managing an executable file that refers to a shared library. In the method according to Patent Document 3, a reference file (META) and a service file are created in order to modify the shared library referenced from the dynamically executable file. Here, the reference file describes the definition of the link destination when the function to be modified in the shared library is referenced from the dynamically executable file by a mathematical formula. The service file is a description of the function to be modified. Then, in this method, when the execution of the dynamically executable file is started, the reference file is loaded into the memory, the definition in the reference file is prioritized, and each function in the dynamically executable file and the function definition in the reference file are defined. Link with. If there is no function definition in the reference file, the function in the dynamically executable file and the function in the shared library are linked.
ここで、特許文献3にかかる技術を実現するには、修正対象の関数のリンク先の定義を数式で記述した参照ファイルを読み込んだ際に、当該参照ファイル内の数式を解析して動的リンク編集処理を行う実装が必要となる。そのため、特許文献3には、既存の動的リンク編集処理に参照ファイルの解析処理を追加しなければならない。また、特許文献2にかかる技術は、更新情報ファイルの作成処理と、更新情報ファイルの解析処理との実装が必要であり、既存の処理系に更新情報ファイルの解析処理を追加しなければならない。そのため、特許文献2及び3にかかる技術では、プログラムを動的に更新するために既存の処理に追加が発生するため、導入に際して困難性があるという問題点がある。
Here, in order to realize the technique according to Patent Document 3, when a reference file in which the definition of the link destination of the function to be modified is described by a mathematical formula is read, the mathematical formula in the reference file is analyzed and dynamically linked. An implementation that performs editing processing is required. Therefore, in Patent Document 3, it is necessary to add the analysis process of the reference file to the existing dynamic link editing process. Further, the technique according to
本開示は、このような問題点を解決するためになされたものであり、プログラムを動的に更新する仕組みを容易に導入ができる情報処理装置、ロードモジュール生成方法及びプログラム、並びに、動的プログラム更新システム及び方法を提供することを目的とする。 This disclosure is made to solve such a problem, and is an information processing device, a load module generation method and a program, and a dynamic program that can easily introduce a mechanism for dynamically updating a program. The purpose is to provide an update system and method.
本開示の第1の態様にかかる情報処理装置は、
対象システムで実行させるための複数の関数を含む実行形式のプログラムである対象モジュールの入力を受け付ける受付部と、
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納された前記第1のアドレスに対して処理を移行させる本移行命令と、前記入力された対象モジュールと、を結合してロードモジュールを生成する生成部と、
を備え、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを前記第1のアドレスとして前記アドレス保持領域に格納する処理を含み、
前記生成部は、
前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に前記本移行命令を配置して、前記ロードモジュールを生成し、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである。
The information processing apparatus according to the first aspect of the present disclosure is
A reception unit that accepts input from the target module, which is an executable program that includes multiple functions to be executed on the target system.
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system. The address holding area for holding the first address corresponding to the updated function on the memory and the first address held in the address holding area are stored in the register of the target system, and the register is stored. A generation unit that generates a load module by combining the transfer instruction for migrating the process to the first address stored in the first address and the input target module.
Equipped with
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module as the first address in the address holding area is included.
The generator is
The transfer instruction is placed at a position separated from the start address of the update target function in the target module corresponding to the post-update function by a second address to generate the load module.
The second address is
It is a relative address indicating the migration destination of the process in the provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
本開示の第2の態様にかかるロードモジュール生成方法は、
対象システムで実行させるための複数の関数を含む実行形式のプログラムである対象モジュールの入力を受け付け、
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納された前記第1のアドレスに対して処理を移行させる本移行命令と、前記入力された対象モジュールと、を結合してロードモジュールを生成し、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記ロードモジュールを生成する際に、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に前記本移行命令を配置し、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである。
The load module generation method according to the second aspect of the present disclosure is
Accepts the input of the target module, which is an executable program containing multiple functions to be executed on the target system.
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system. The address holding area for holding the first address corresponding to the updated function on the memory and the first address held in the address holding area are stored in the register of the target system, and the register is stored. The transfer instruction for migrating the process to the first address stored in the first address and the input target module are combined to generate a load module.
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
When the load module is generated, the transition instruction is placed at a position separated from the start address of the update target function in the target module corresponding to the post-update function by a second address.
The second address is
It is a relative address indicating the migration destination of the process in the provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
本開示の第3の態様にかかるロードモジュール生成プログラムは、
対象システムで実行させるための複数の関数を含む実行形式のプログラムである対象モジュールの入力を受け付ける処理と、
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納された前記第1のアドレスに対して処理を移行させる本移行命令と、前記入力された対象モジュールと、を結合してロードモジュールを生成する処理と、
をコンピュータに実行させ、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記ロードモジュールを生成する処理は、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に前記本移行命令を配置し、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである。
The load module generation program according to the third aspect of the present disclosure is
The process of accepting the input of the target module, which is an executable program containing multiple functions to be executed on the target system,
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system. The address holding area for holding the first address corresponding to the updated function on the memory and the first address held in the address holding area are stored in the register of the target system, and the register is stored. A process of combining the transfer command for migrating the process to the first address stored in the input and the input target module to generate a load module.
Let the computer run
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
In the process of generating the load module, the transition instruction is placed at a position separated from the start address of the update target function in the target module corresponding to the update function by a second address.
The second address is
It is a relative address indicating the migration destination of the process in the provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
本開示の第4の態様にかかるプログラムは、
対象システムで実行させるための複数の関数を含む実行形式のプログラムである対象モジュールと、
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、
前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、
前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる本移行命令と、
が結合され、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記本移行命令は、
前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置され、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである。
The program according to the fourth aspect of the present disclosure is
The target module, which is an executable program containing multiple functions to be executed on the target system,
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system.
An address holding area for holding a first address corresponding to the updated function on the memory, and an address holding area.
This migration instruction that stores the first address held in the address holding area in a register of the target system and shifts processing to the address stored in the register, and
Are combined,
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
The transition order is
It is placed at a position separated from the start address of the update target function in the target module corresponding to the updated function by a second address.
The second address is
It is a relative address indicating the migration destination of the process in the provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
本開示の第5の態様にかかる動的プログラム更新システムは、
情報処理装置と、対象システムと、を備え、
前記対象システムは、
複数の関数を含む実行形式のプログラムである対象モジュールと、前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる本移行命令と、が結合されたロードモジュールを前記メモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行し、
前記本移行命令は、
前記ロードモジュール内で、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されており、
前記情報処理装置は、
前記更新後モジュールの入力を受け付け、
前記第2のアドレスを移行先の相対アドレスとして処理を移行させる仮移行命令を生成し、
前記パッチ適用の要求を発生させるために、前記対象モジュールが実行中である前記対象システムに対して、前記更新後モジュール及び前記仮移行命令を転送し、
前記メモリにロードされた前記組込みローダは、
前記対象システムが前記更新後モジュール及び前記仮移行命令を受信後に、前記パッチ適用の要求を検出し、
前記受信した更新後モジュールが前記ロードされた際の前記更新後関数の前記メモリ上の先頭アドレスを前記第1のアドレスとして前記アドレス保持領域に格納し、
前記対象システムは、
前記仮移行命令を、前記メモリ上の前記更新対象関数の先頭アドレスに挿入する。
The dynamic program update system according to the fifth aspect of the present disclosure is
Equipped with an information processing device and a target system,
The target system is
An update that includes an updated function that updates one of the plurality of functions when applying a patch to the target module, which is an executable program containing a plurality of functions, and the target module being executed in the target system. An embedded loader that loads the rear module into the memory of the target system, an address holding area for holding the first address corresponding to the updated function on the memory, and the first address held in the address holding area. The load module in which the
Execute the target module in the load module,
The transition order is
In the load module, it is arranged at a position separated from the start address of the update target function in the target module corresponding to the update function by a second address.
The information processing device is
After accepting the input of the updated module,
Generate a temporary migration instruction to migrate the process using the second address as the relative address of the migration destination.
In order to generate the patch application request, the updated module and the provisional migration instruction are transferred to the target system in which the target module is running.
The built-in loader loaded in the memory
After the target system receives the updated module and the provisional migration instruction, the patch application request is detected.
The start address on the memory of the updated function when the received updated module is loaded is stored in the address holding area as the first address.
The target system is
The provisional transition instruction is inserted into the start address of the update target function on the memory.
本開示の第6の態様にかかる動的プログラム更新方法は、
対象システムにおいて、
複数の関数を含む実行形式のプログラムである対象モジュールと、前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる本移行命令と、が結合されたロードモジュールを前記メモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行し、
前記本移行命令は、
前記ロードモジュール内で、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されており、
情報処理装置において、
前記更新後モジュールの入力を受け付け、
前記第2のアドレスを移行先の相対アドレスとして処理を移行させる仮移行命令を生成し、
前記パッチ適用の要求を発生させるために、前記対象モジュールが実行中である前記対象システムに対して、前記更新後モジュール及び前記仮移行命令を転送し、
前記メモリにロードされた前記組込みローダにおいて、
前記対象システムが前記更新後モジュール及び前記仮移行命令を受信後に、前記パッチ適用の要求を検出し、
前記受信した更新後モジュールが前記ロードされた際の前記更新後関数の前記メモリ上の先頭アドレスを前記第1のアドレスとして前記アドレス保持領域に格納し、
前記対象システムにおいて、
前記仮移行命令を、前記メモリ上の前記更新対象関数の先頭アドレスに挿入する。
The dynamic program update method according to the sixth aspect of the present disclosure is
In the target system
An update that includes an updated function that updates one of the plurality of functions when applying a patch to the target module, which is an executable program containing a plurality of functions, and the target module being executed in the target system. An embedded loader that loads the rear module into the memory of the target system, an address holding area for holding the first address corresponding to the updated function on the memory, and the first address held in the address holding area. The load module in which the
Execute the target module in the load module,
The transition order is
In the load module, it is arranged at a position separated from the start address of the update target function in the target module corresponding to the update function by a second address.
In information processing equipment
After accepting the input of the updated module,
Generate a temporary migration instruction to migrate the process using the second address as the relative address of the migration destination.
In order to generate the patch application request, the updated module and the provisional migration instruction are transferred to the target system in which the target module is running.
In the built-in loader loaded in the memory
After the target system receives the updated module and the provisional migration instruction, the patch application request is detected.
The start address on the memory of the updated function when the received updated module is loaded is stored in the address holding area as the first address.
In the target system
The provisional transition instruction is inserted into the start address of the update target function on the memory.
本開示の第7の態様にかかる情報処理装置は、
複数の関数を含む実行形式のプログラムである対象モジュールと、組込みローダと、アドレス保持領域と、本移行命令と、が結合されたロードモジュールを記憶するメモリと、
前記メモリに記憶された前記対象モジュールを実行するプロセッサと、
を備え、
前記組込みローダは、
前記プロセッサが実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを前記メモリにロードし、
前記アドレス保持領域は、
前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するための領域であり、
前記本移行命令は、
前記アドレス保持領域に保持された前記第1のアドレスを前記プロセッサのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる命令であり、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記本移行命令は、
前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置され、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである。
The information processing apparatus according to the seventh aspect of the present disclosure is
A memory that stores a load module in which a target module, which is an executable program containing multiple functions, an embedded loader, an address holding area, and this migration instruction are combined,
A processor that executes the target module stored in the memory, and
Equipped with
The built-in loader is
When the processor applies a patch to the target module being executed, the updated module including the updated function that updates any of the plurality of functions is loaded into the memory.
The address holding area is
It is an area for holding the first address corresponding to the updated function on the memory.
The transition order is
It is an instruction to store the first address held in the address holding area in the register of the processor and shift the processing to the address stored in the register.
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
The transition order is
It is placed at a position separated from the start address of the update target function in the target module corresponding to the updated function by a second address.
The second address is
It is a relative address indicating the migration destination of the process in the provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
本開示の第8の態様にかかる動的プログラム更新方法は、
複数の関数を含む実行形式のプログラムである対象モジュールと、組込みローダと、アドレス保持領域と、本移行命令と、が結合されたロードモジュールを前記情報処理装置のメモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行し、
前記メモリにロードされた前記組込みローダが、
前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールと仮移行命令とを受信後に、前記対象モジュールに対する当該更新後モジュールのパッチ適用の要求を検出し、
前記受信した更新後モジュールを前記メモリにロードし、
前記更新後関数の前記メモリ上の先頭アドレスを第1のアドレスとして前記アドレス保持領域に格納し、
前記プロセッサが、
前記仮移行命令を、前記メモリ上の前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスに挿入し、
前記本移行命令は、
前記アドレス保持領域に保持された前記第1のアドレスを前記プロセッサのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる命令であり、
前記ロードモジュール内で、前記更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されており、
前記仮移行命令は、
前記第2のアドレスを移行先の相対アドレスとして処理を移行させる命令である。
The dynamic program update method according to the eighth aspect of the present disclosure is
A load module in which a target module, which is an execution-type program including a plurality of functions, an embedded loader, an address holding area, and this migration instruction are combined, is loaded into the memory of the information processing apparatus.
Execute the target module in the load module,
The built-in loader loaded in the memory
After receiving the updated module including the updated function that updated any of the plurality of functions and the temporary migration instruction, the request for patch application of the updated module to the target module is detected.
The received updated module is loaded into the memory, and the module is loaded into the memory.
The start address in the memory of the updated function is stored in the address holding area as the first address.
The processor
The provisional transition instruction is inserted into the start address of the update target function in the target module corresponding to the updated function on the memory.
The transition order is
It is an instruction to store the first address held in the address holding area in the register of the processor and shift the processing to the address stored in the register.
In the load module, it is located at a position separated from the start address of the function to be updated by a second address.
The provisional transition instruction is
It is an instruction to transfer the process by using the second address as the relative address of the transfer destination.
本開示により、プログラムを動的に更新する仕組みを容易に導入ができる情報処理装置、ロードモジュール生成方法及びプログラム、並びに、動的プログラム更新システム及び方法を提供することができる。 INDUSTRIAL APPLICABILITY According to the present disclosure, it is possible to provide an information processing apparatus, a load module generation method and a program, and a dynamic program update system and a method capable of easily introducing a mechanism for dynamically updating a program.
以下では、本開示の実施の形態について、図面を参照しながら詳細に説明する。各図面において、同一又は対応する要素には同一の符号が付されており、説明の明確化のため、必要に応じて重複説明は省略される。 Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. In each drawing, the same or corresponding elements are designated by the same reference numerals, and duplicate explanations are omitted as necessary for the sake of clarity of explanation.
<実施の形態1>
図1は、本実施の形態1にかかる情報処理装置1の構成を示すブロック図である。情報処理装置1は、対象システム(不図示)で実行させるための複数の関数を含む実行形式のプログラムである対象モジュール131を含めたロードモジュール13を生成するコンピュータシステムである。そのため、情報処理装置1は、ロードモジュール生成装置と呼ぶこともできる。そして、情報処理装置1は、複数台のコンピュータにより実現したものであってもよい。尚、対象システムは、プロセッサとメモリ等を備えたコンピュータサーバ又は組込み機器等の情報処理装置であればよい。
<
FIG. 1 is a block diagram showing a configuration of an
情報処理装置1は、受付部11と、生成部12とを備える。受付部11は、対象モジュール131の入力を受け付ける。ここで、対象モジュール131は、ソースファイルからコンパイル等された機械語のオブジェクトファイルである。また、ソースファイルは、対象システム上で実行されるソフトウェアの処理が実装されたコンピュータプログラムである。尚、対象システム上で実行されるソフトウェアは、OS(Operating System)、ミドルウェア、アプリケーション、ドライバ、各種制御プログラム等であればよい。ソースファイルは、複数の関数が含まれ、例えば、C言語等の手続型言語で記述されたものであるが、これに限定されない。また、ソースファイルは、任意の数の関数の単位で記述された複数のファイルの集合であってもよい。そのため、対象モジュール131は、複数のオブジェクトファイルの集合であってもよい。また、情報処理装置1は、ユーザの操作に応じてソースファイルの作成処理や、コンパイル等を行って対象モジュール131を生成するものであっても良い。
The
また、対象モジュール131は、情報処理装置1の内部又は外部の記憶装置(不図示)に格納されたものである。よって、受付部11は、ユーザの指示等に基づき、当該記憶装置から対象モジュール131を読み出すことで、入力として受け付けるものとする。
Further, the
生成部12は、後述する組込みローダ132と、アドレス保持領域133と、本移行命令134と、入力された対象モジュール131と、を結合してロードモジュール13を生成する。ここで、組込みローダ132は、対象システムで既に実行中の対象モジュールに対してパッチ適用を行う際に、前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードするプログラムモジュールである。つまり、「対象システムで既に実行中の対象モジュール」は、対象モジュール131よりも前のバージョンのモジュールとなる。そのため、組込みローダ132は、対象モジュール131と同様に、プログラム言語で実装された関数等のオブジェクトファイルである。尚、更新後関数は、対象モジュール131に含まれる複数の関数のいずれかを更新した関数プログラムである。更新後関数は、例えば、既存の関数のバグの修正や仕様変更をしたプログラムモジュールである。そして、更新後関数は、対象モジュール131へのパッチ適用時に、対象システムに対して提供されるものである。更新後関数は、例えば、動的リンクライブラリとして提供されてもよい。また、動的リンクライブラリには、複数の更新後関数が含まれていても良い。
The
また、アドレス保持領域133は、対象システムのメモリ上における更新後関数に対応する第1のアドレスを保持するための記憶領域である。また、アドレス保持領域133は、対象モジュール131に含まれる複数の関数のそれぞれに対応する複数の記憶領域を定義した情報である。ここで、アドレス保持領域133は、複数のアドレス値をデータとして保持するための複数の記憶領域が定義されたプログラムモジュールである。また、アドレス保持領域133は、例えば、所定サイズの配列や、複数の変数を定義した構造体等であり、対象モジュール131と同様のプログラム言語で実装された関数、構造体等のオブジェクトファイルである。
Further, the
本移行命令134は、アドレス保持領域133に保持された第1のアドレスを対象システムのレジスタに格納し、当該レジスタに格納された第1のアドレスに対して処理を移行させる処理が実装されたプログラムモジュールである。また、本移行命令134は、対象モジュール131に含まれる複数の関数のそれぞれに対応する複数の命令群の集合である。そして、本移行命令134は、命令群ごとに、例えば、次の第1の命令と第2の命令とを少なくとも含むものである。ここで、第1の命令は、アドレス保持領域133のうち、指定された関数に対応する記憶領域のアドレス値を上記レジスタに格納させる命令である。また、第2の命令は、第1の命令により格納されたレジスタ値を、処理の移行先として指定した移行命令である。例えば、第2の命令は、レジスタ間接アドレッシング方式を利用したジャンプ命令である。よって、本移行命令134は、対象モジュール131と同様のプログラム言語で実装された、第1の命令と第2の命令とを少なくとも含む関数等のオブジェクトファイルである。
This
ここで、上述した組込みローダ132は、さらに次の第1の処理を含めて実装されたものである。第1の処理は、(対象システム上で対象モジュール131が実行中において対象システムの)メモリにロードされた更新後モジュール内の更新後関数のメモリ上の先頭アドレスを第1のアドレスとしてアドレス保持領域133に格納する処理である。このとき、アドレス保持領域133内で、更新後関数に対応する対象モジュール内の更新対象関数に対応する記憶領域に当該第1のアドレスが格納される。
Here, the above-mentioned embedded
また、生成部12は、更新後関数に対応する対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に本移行命令134を配置して、ロードモジュール13を生成する。ここで、第2のアドレスは、仮移行命令における処理の移行先を示す相対アドレスである。そして、仮移行命令は、パッチ適用時に対象システムのメモリ上の更新対象関数の先頭アドレスに挿入される命令である。つまり、仮移行命令は、更新後関数又は更新対象関数に対応する本移行命令134へ処理を移行させる命令であり、1命令で実現されたものである。例えば、仮移行命令は、対応する本移行命令134の相対アドレスを宛先として指定したジャンプ命令である。
Further, the
図2は、本実施の形態1にかかるロードモジュール生成方法の流れを説明するためのフローチャートである。まず、受付部11は、対象システムで実行させるための複数の関数を含む実行形式のプログラムである対象モジュール131の入力を受け付ける(S11)。次に、生成部12は、組込みローダ132と、アドレス保持領域133と、本移行命令134と、対象モジュール131を結合してロードモジュール13を生成する(S12)。
FIG. 2 is a flowchart for explaining the flow of the load module generation method according to the first embodiment. First, the
この後、生成されたロードモジュール13が対象システム内のメモリにロードされて、対象システムのプロセッサがロードモジュール13内の対象モジュール131を実行することで、アプリケーションとして機能する。そして、対象モジュール131の実行中に、複数の関数のいずれかを更新した更新後関数を含む更新後モジュールについてのパッチ適用の要求が発生したものとする。この場合、対象システムのメモリにロード済みの組込みローダ132は、パッチ適用要求を検出し、適宜、更新後モジュールをメモリにロードする。そして、組込みローダ132は、その際に確定するメモリ上の更新後関数の先頭アドレスを、同じくメモリにロード済みのアドレス保持領域133内の更新後関数に対応する記憶領域に格納する。続いて、対象システムは、更新後関数に対応する対象モジュール131内の更新対象関数の先頭アドレスに、仮移行命令を挿入する。ここで、挿入される仮移行命令は、上述した通り、更新後関数又は更新対象関数に対応する本移行命令134へ処理を移行させる命令である。これらにより、パッチ適用がされたことになる。
After that, the generated
そのため、以後、対象モジュール131の実行中に、更新後関数に対応する更新対象関数が呼び出された場合には、先頭アドレスの仮移行命令が実行されて、本移行命令へ遷移する。そして、本移行命令の実行により、更新後関数又は更新対象関数に対応するアドレス保持領域133内の記憶領域に格納された絶対アドレスがレジスタに格納され、当該レジスタの格納値を宛先とした移行命令が実行され、更新後関数へ遷移し、更新後関数の処理が実行される。このようにして、パッチ適用後の処理が実現される。
Therefore, thereafter, when the update target function corresponding to the updated function is called during the execution of the
以上のことから、本実施の形態により、対象システムの稼働の停止や再起動を必要とせずに、対象システムで実行中のソフトウェアの更新を行うことができる。このとき、ソフトウェアの更新を、必要最小限の関数に対するパッチ適用により実現するため、変更対象外の関数への影響を最小限に防ぎ、テスト工数を抑制することができる。 From the above, according to the present embodiment, it is possible to update the software running on the target system without the need to stop or restart the operation of the target system. At this time, since the software is updated by applying the patch to the minimum necessary function, the influence on the function not to be changed can be minimized and the test man-hours can be suppressed.
特に、上述した特許文献3では、更新対象の関数ごとのリンク先のロジックを記述した参照ファイルの作成が煩雑である。また、当該参照ファイルには汎用性がない。これに対して本実施の形態では、対象モジュールごとに、本移行命令、仮移行命令及びアドレス保持領域のロードモジュール内の配置が確定し、組込みローダ132の処理内容は、異なるロードモジュールの間で共通である。よって、パッチデータの作成コストを低減することができる。
In particular, in the above-mentioned Patent Document 3, it is complicated to create a reference file that describes the logic of the link destination for each function to be updated. Moreover, the reference file is not versatile. On the other hand, in the present embodiment, the arrangement of the main migration instruction, the provisional migration instruction, and the address holding area in the load module is determined for each target module, and the processing contents of the embedded
そして、本実施の形態では、実行対象のソフトウェアである対象モジュール131に、組込みローダ132、アドレス保持領域133及び本移行命令134を結合して1つのロードモジュール13として提供するものである。そのため、対象モジュール131をロード及び実行する際に、同一のロードモジュール13内の組込みローダ132等も併せてメモリ上にロードされる。よって、対象モジュール131の実行中にパッチ適用要求が発生した場合に、組込みローダ132がパッチ適用要求を検出可能となる。そして、組込みローダ132が動的に、更新後関数のロード、更新後関数のメモリ上の絶対アドレスの設定を行うことができる。そして、更新後関数に対応する(同一のロードモジュール13内でロード済の)本移行命令への仮移行命令が更新前の関数の先頭アドレスに挿入されることで、上述した通り、更新前の関数が呼び出された際に、更新後関数へ処理を移行させることができる。
In the present embodiment, the embedded
通常、動的なパッチ適用処理を行う場合には、対象のロードモジュールを処理するOS等の既存の処理系により、更新後関数の動的リンク処理等を行う必要がある。一方、本実施の形態では、対象のロードモジュール内の組込みローダ132等により動的なパッチ適用処理を実現できる。よって、既存の処理系に対する追加が不要である。そのため、プログラムを動的に更新する仕組みを容易に導入ができる。
Normally, when performing dynamic patch application processing, it is necessary to perform dynamic link processing of the post-update function by an existing processing system such as an OS that processes the target load module. On the other hand, in the present embodiment, dynamic patch application processing can be realized by the embedded
<実施の形態2>
本実施の形態2は、上述した実施の形態1を具体化かつ改良したものである。
ここで、本実施の形態が解決しようとする課題として、上述した課題に加えて他の側面について説明する。上述した特許文献2にかかる技術は、動的なパッチ適用処理において、更新前関数内の制御移行先に、更新後関数の先頭アドレスを書き込む。併せて、更新前関数の先頭アドレスに、上記制御移行先のアドレス値を宛先とした制御移行命令(ジャンプ命令)を書き込むものである。このように、特許文献2では、直接アドレッシング方式又はメモリ間接アドレッシング方式によるジャンプ命令を、更新前関数の先頭アドレスに挿入するものである。ここで、直接アドレッシング又はメモリ間接アドレッシングにより指定可能なアドレスサイズは、プロセッサのアーキテクチャの制約を受ける。例えば、指定可能なアドレスサイズの上限が128MBである場合がある。一方、パッチ対象の更新後関数を動的リンク処理によりメモリにロードする場合、通常、メモリの最後の領域から割り当てられる。よって、更新後関数のメモリ上の絶対アドレスは、対応する更新前関数の先頭アドレスから128MB以上離れている可能性が高い。そのため、特許文献2にかかる技術は、プロセッサの種類によっては適用できない場合があり、プロセッサのアーキテクチャの制約に依存するという問題点がある。
<
The second embodiment is a concrete and improved version of the first embodiment described above.
Here, as a problem to be solved by this embodiment, other aspects will be described in addition to the above-mentioned problems. In the above-mentioned technique according to
そこで、更新前関数の先頭アドレスに、レジスタ間接アドレッシング方式によるジャンプ命令を挿入することが考えられる。しかしながら、レジスタ間接アドレッシング方式によるジャンプ命令を実現するには、上述した本移行命令のように、少なくとも第1の命令と第2の命令とを挿入する必要がある。ここで、第1の命令は、ジャンプ先の実アドレスをレジスタに格納させる命令であり、第2の命令は、当該レジスタの格納値をジャンプ先として指定したジャンプ命令である。つまり、更新前関数の先頭アドレスに複数命令を挿入する(書き込む)必要がある。但し、更新前関数の先頭箇所に複数命令を書き込むには、複数のクロックを要し、処理に時間がかかってしまう。そのため、当該複数命令の書き込みを実行している最中に、マルチスレッド処理等で他のスレッドの影響を受けるか、他のスレッドに影響を与える可能性がある。よって、無中断でソフトウェアを更新するための動的なパッチ適用処理としてはリスクが大きく、更新前関数の先頭箇所に複数命令を書き込むことは採用できない。 Therefore, it is conceivable to insert a jump instruction by the register indirect addressing method at the start address of the pre-update function. However, in order to realize the jump instruction by the register indirect addressing method, it is necessary to insert at least the first instruction and the second instruction as in the above-mentioned main transition instruction. Here, the first instruction is an instruction for storing the real address of the jump destination in a register, and the second instruction is a jump instruction in which the stored value of the register is designated as the jump destination. That is, it is necessary to insert (write) multiple instructions at the start address of the pre-update function. However, writing multiple instructions at the beginning of the pre-update function requires multiple clocks, which takes time. Therefore, while the writing of the plurality of instructions is being executed, there is a possibility that the other threads will be affected by the multithread processing or the like, or the other threads will be affected. Therefore, there is a large risk as a dynamic patch application process for updating software without interruption, and it is not possible to write multiple instructions at the beginning of the pre-update function.
そのため、本実施の形態では、更新前関数から更新後関数へのジャンプ命令を2段階にしている。すなわち、1回目のジャンプ命令(仮移行命令)では、(本移行命令の)相対アドレスへの1命令によるジャンプとし、更新対象関数の先頭アドレスのみの書換えで他のスレッドへの影響をなくしている。そして、1回目のジャンプ先において、レジスタ間接アドレッシングによるジャンプ処理(本移行命令)を実行するものである。このとき、更新対象関数の先頭アドレスから、当該関数に対応する本移行命令の先頭アドレスまでのアドレス間の距離(アドレスサイズ)は、プロセッサのアーキテクチャの制約の範囲内、例えば、128MB以内とするものである。 Therefore, in the present embodiment, the jump instruction from the pre-update function to the post-update function has two stages. That is, in the first jump instruction (temporary transition instruction), a jump is made by one instruction to the relative address (of this transition instruction), and only the start address of the function to be updated is rewritten to eliminate the influence on other threads. .. Then, at the first jump destination, the jump process (this transition instruction) by register indirect addressing is executed. At this time, the distance (address size) between the start address of the function to be updated and the start address of this migration instruction corresponding to the function is within the range of the restrictions of the processor architecture, for example, 128 MB or less. Is.
すなわち、本実施の形態にかかる前記第2のアドレスのサイズは、前記対象システムのプロセッサのアドレッシングサイズの上限以内である。これにより、プロセッサのアーキテクチャの制約に依存せず、動的なパッチ適用処理が実現可能となる。 That is, the size of the second address according to the present embodiment is within the upper limit of the addressing size of the processor of the target system. This makes it possible to realize dynamic patch application processing without depending on the constraints of the processor architecture.
また、前記受付部は、前記更新後モジュールの入力をさらに受け付け、前記生成部は、前記第2のアドレスに対して処理を移行させる前記仮移行命令を生成するとよい。この場合、前記情報処理装置は、前記パッチ適用の要求を発生させるために、前記対象モジュールが実行中である前記対象システムに対して、前記更新後モジュール及び前記仮移行命令を転送する転送部をさらに備える。これにより、メモリに対象モジュールがロードされて実行中の対象システムに対して、動的にパッチ適用するためのパッチ及び仮移行命令を提供することができる。 Further, the receiving unit may further accept the input of the updated module, and the generating unit may generate the temporary transfer instruction for transferring the process to the second address. In this case, the information processing apparatus provides a transfer unit that transfers the updated module and the provisional transition command to the target system in which the target module is running in order to generate the patch application request. Further prepare. As a result, it is possible to provide a patch and a temporary migration instruction for dynamically applying a patch to the target system in which the target module is loaded and executed in the memory.
さらに、組込みローダは、パッチ適用の要求の検出時に、転送された更新後モジュールをメモリへロードする処理と、更新後関数の先頭アドレスであるメモリ上の絶対アドレスを取得する処理と、取得した絶対アドレスを第1のアドレスとしてアドレス保持領域に格納する処理と、を含むとよい。これにより、組込みローダの処理を効率化できる。 Furthermore, when the embedded loader detects a patch application request, it loads the transferred updated module into memory, acquires the absolute address in memory that is the start address of the updated function, and acquires the absolute address. It may include a process of storing the address as the first address in the address holding area. This makes it possible to streamline the processing of the embedded loader.
また、前記生成部は、前記更新後関数と前記仮移行命令との対応付けを定義したパッチリストをさらに生成し、前記転送部は、前記更新後モジュール及び前記仮移行命令と共に前記パッチリストを転送するとよい。そして、前記組込みローダは、前記パッチ適用の要求の検出時に、前記転送されたパッチリストに基づいて前記更新後モジュールの前記メモリへのロードを開始するとよい。これにより、メモリに対象モジュールがロードされて実行中の対象システムに対して、当該パッチリストに基づき対象モジュールに当該パッチ及び仮移行命令を確実に適用させることができる。 Further, the generation unit further generates a patch list that defines the correspondence between the update function and the provisional transition instruction, and the transfer unit transfers the patch list together with the update module and the provisional transition instruction. You should do it. Then, when the built-in loader detects the patch application request, the embedded loader may start loading the updated module into the memory based on the transferred patch list. As a result, it is possible to reliably apply the patch and the provisional migration instruction to the target module based on the patch list for the target system in which the target module is loaded in the memory and is being executed.
図3は、本実施の形態2にかかる動的プログラム更新システム1000の構成を示すブロック図である。動的プログラム更新システム1000は、ロードモジュール生成装置100と対象システム200とがネットワークNを介して接続されている。ここで、ネットワークNは、有線又は無線の通信回線等の通信ネットワークである。ネットワークNは、単に有線の通信ケーブルであってもよい。
FIG. 3 is a block diagram showing a configuration of the dynamic
ロードモジュール生成装置100は、上述した情報処理装置1の一例である。ロードモジュール生成装置100は、記憶装置110と、プロセッサ120と、メモリ130と、通信部140とを備える。記憶装置110は、ハードディスク又はフラッシュメモリ等の不揮発性記憶装置である。記憶装置110は、オブジェクトモジュール111と、組込みローダ112と、本移行命令群113と、アドレス保持領域群114と、ロードモジュール生成プログラム115と、ロードモジュール116とを記憶する。オブジェクトモジュール111は、上述した対象モジュール131の一例である。また、オブジェクトモジュール111は、複数の関数に対応する複数のオブジェクトファイルの集合であってもよい。
The load
組込みローダ112は、上述した組込みローダ132の一例である。まず、組込みローダ112は、OSその他のプログラムにより発生されるパッチ適用要求のイベントを監視する。組込みローダ112は、上述した第1の処理として以下の処理を含むものである。第1の処理は、まず、パッチ適用要求の検出時に、転送部123により対象システム200へ転送された更新後モジュールを(対象システム200の)メモリ230へロードする処理を含む。さらに、第1の処理は、更新後関数の先頭アドレスであるメモリ230上の絶対アドレスを取得する処理を含む。さらに、第1の処理は、取得した絶対アドレスを第1のアドレスとしてアドレス保持領域に格納する処理を含む。さらに、組込みローダ112は、対象システム200におけるパッチ適用要求の検出時に、転送部123により対象システム200へ転送されたパッチリストに基づいてパッチ適用を行う。
The built-in
本移行命令群113は、オブジェクトモジュール111に含まれる複数の関数のそれぞれに対応する、複数のJUMP関数(本移行命令)をテーブルとして定義したプログラムモジュールである。本移行命令群113内の各本移行命令は、上述した本移行命令134の一例である。尚、本移行命令群113は、JUMP関数テーブルと呼ぶこともできる。
The
アドレス保持領域群114は、オブジェクトモジュール111に含まれる複数の関数のそれぞれに対応する、複数の記憶領域(アドレス保持領域)をテーブルとして定義したプログラムモジュールである。アドレス保持領域群114内の各アドレス保持領域は、上述したアドレス保持領域133の一例である。尚、アドレス保持領域群114は、間接JUMPテーブルと呼ぶこともできる。
The address holding
ロードモジュール生成プログラム115は、本実施の形態にかかるパッチ生成処理及びパッチ転送処理が実装されたコンピュータプログラムである。
The load
ロードモジュール116は、上述したロードモジュール13の一例であり、後述する生成部122によりオブジェクトモジュール111と、組込みローダ112と、本移行命令群113と、アドレス保持領域群114とが結合されたモジュールである。
The
メモリ130は、RAM(Random Access Memory)等の揮発性記憶装置である。通信部140は、ネットワークNを介してロードモジュール生成装置100と、対象システム200を含む外部との通信を行うインタフェースである。例えば、通信部140は、プロセッサ120からの指示に応じて、ネットワークNを介して対象システム200に対して、ロードモジュール、パッチデータ等の送信を行う。また、通信部140は、ネットワークNを介して対象システム200から受信した各種データをプロセッサ120へ出力する。
The
プロセッサ120は、CPU(Central Processing Unit)、MPU(Micro Processing Unit)等の制御装置である。プロセッサ120は、記憶装置110からロードモジュール生成プログラム115をメモリ130へロードして、実行する。これにより、プロセッサ120は、受付部121、生成部122及び転送部123の機能を実現する。
The
受付部121は、上述した受付部11の一例であり、さらに、オブジェクトモジュール111内の複数の関数のいずれかを更新した更新後関数を含むプログラムモジュール(更新後モジュール)を受け付ける。尚、更新後モジュールは、2以上の関数が1つのオブジェクトモジュールに含まれていても良く、複数のオブジェクトモジュールであってもよい。
The
尚、ロードモジュール生成装置100は、ユーザの操作に応じて、オブジェクトモジュール111のソースファイルのうち更新対象の関数の修正したソースファイルを作成してもよい。さらに、ロードモジュール生成装置100は、当該ソースファイルのコンパイル等を行って、更新後関数のオブジェクトモジュールを生成してもよい。
The load
生成部122は、上述した生成部12の一例である。特に、生成部122は、オブジェクトモジュール111内の更新対象関数の先頭アドレスから対象システム200のプロセッサ220のアドレッシングサイズの上限以内である第2のアドレス分の位置に本移行命令群113を配置して、ロードモジュールを生成する。また、生成部122は、第2アドレスに対して処理を移行させるジャンプパッチ(仮移行命令)を生成する。ここで、仮移行命令は、オブジェクトモジュール111内の複数の関数のそれぞれに対応するジャンプ命令の集合である。仮移行命令の各ジャンプ命令は、1命令により指定された相対アドレス(第2のアドレス)への処理の移行を行う。また、生成部122は、更新後関数と仮移行命令との対応付けを定義したパッチリストを生成する。尚、更新後関数は、更新前関数と関数名が同一であるため、パッチリストは、更新前関数と仮移行命令との対応付け、又は、更新対象の関数と仮移行命令との対応付けと同義である。
The
転送部123は、パッチ適用要求を発生させるために、ロードモジュール212内の対象モジュールが実行中である対象システム200に対して、更新後モジュール及び仮移行命令を転送メッセージに含めて転送する。ここで、「パッチ適用要求を発生させるために」とは、例えば、転送メッセージにパッチ適用要求の発生の指示を含めても良い。または、「パッチ適用要求を発生させるために」とは、転送メッセージに伴い、対象システム200における既存の処理系によりパッチ適用要求が発生するものであってもよい。さらに、転送部123は、更新後モジュール及び仮移行命令と共にパッチリストを転送する。
In order to generate a patch application request, the
対象システム200は、コンピュータサーバ、組込み機器等の情報処理装置である。対象システム200は、記憶装置210と、プロセッサ220と、メモリ230と、通信部240とを備える。記憶装置210は、ハードディスク又はフラッシュメモリ等の不揮発性記憶装置である。記憶装置210は、OS211と、ロードモジュール212とを記憶する。OS211は、動的リンク処理等が実装された公知の処理系の一例である。ロードモジュール212は、上述したロードモジュール13の一例であり、ロードモジュール生成装置100により生成されたパッチ適用前の(初回)ロードモジュールである。
The
メモリ230は、RAM等の揮発性記憶装置である。通信部240は、ネットワークNを介して対象システム200と、ロードモジュール生成装置100を含む外部との通信を行うインタフェースである。例えば、通信部240は、ネットワークNを介してロードモジュール生成装置100から受信したロードモジュール、パッチデータ等をプロセッサ220へ出力する。また、通信部240は、プロセッサ220からの指示に応じて、ネットワークNを介してロードモジュール生成装置100に対して、各種データの送信を行う。
The
プロセッサ220は、CPU、MPU等の制御装置である。プロセッサ220は、記憶装置210からOS211及びロードモジュール212をメモリ230へロードして、実行する。これにより、プロセッサ220は、モジュール処理部221、対象アプリ222及び組込みローダ223の機能を実現する。
The
モジュール処理部221は、OS211により実現される処理系であり、通信部240を介した通信処理、ロードモジュール212のメモリ230へのロード等を制御する。また、モジュール処理部221は、転送部123により対象システム200へ転送された仮移行命令を、更新後関数に対応する対象モジュール内の更新対象関数の先頭アドレスに挿入する処理を含む。対象アプリ222は、ロードモジュール212内のオブジェクトモジュール111により実現されるアプリケーションである。組込みローダ223は、ロードモジュール212内の組込みローダ112により実現される。
The
図4は、本実施の形態2にかかる初回ロードモジュールの生成から実行までの流れを説明するためのシーケンス図である。ここでは、対象システム200に対象モジュールがインストールされていない場合を例に挙げて説明し、その際に、ロードされるモジュールを初回ロードモジュールと呼ぶものとする。但し、本実施の形態は、初回以外のロードにおけるモジュールを生成する場合に適用できるのはもちろんである。
FIG. 4 is a sequence diagram for explaining a flow from generation to execution of the initial load module according to the second embodiment. Here, a case where the target module is not installed in the
まず、ロードモジュール生成装置100は、初回ロードモジュールを生成する(S101)。図5は、本実施の形態2にかかる初回ロードモジュールの生成処理の流れを説明するためのフローチャートである。まず、ロードモジュール生成装置100は、オブジェクトモジュール111を生成する(S111)。例えば、受付部121は、ユーザの操作に応じて、対象システム200で実行するためのアプリケーションに対応するプログラムコードの入力を受け付けて、生成部122は、ソースファイルを生成する。そして、生成部122は、生成したソースファイルをコンパイル等して、オブジェクトモジュール111を生成し、記憶装置110に格納する。尚、オブジェクトモジュール111は、ロードモジュール生成装置100の外部で生成され、受付部121が外部からオブジェクトモジュール111の入力を受け付けても良い。また、記憶装置110には、予め組込みローダ112、本移行命令群113、アドレス保持領域群114が格納されているものとする。但し、組込みローダ112等は、ロードモジュール生成装置100の外部で生成され、受付部121が外部から組込みローダ112等の入力を受け付けても良い。
First, the load
次に、ロードモジュール生成装置100は、ロードモジュールを生成する(S112)。具体的には、まず、受付部121は、記憶装置110からオブジェクトモジュール111、組込みローダ112、本移行命令群113及びアドレス保持領域群114を読み出す。そして、生成部122は、オブジェクトモジュール111、組込みローダ112、本移行命令群113及びアドレス保持領域群114を結合してロードモジュールを生成する。このとき、生成部122は、オブジェクトモジュール111に含まれる複数の関数のそれぞれと対応する、本移行命令群113内の各本移行命令を特定する。そして、生成部122は、各関数と対応する本移行命令とのアドレス上の距離(相対アドレス)がプロセッサ220のアドレッシングサイズの上限以内となるように、ロードモジュール内に本移行命令群113を配置する。そして、ロードモジュール生成装置100は、生成したロードモジュール116を記憶装置110に出力、つまり格納する(S113)。ここで、生成されたロードモジュール116を初回ロードモジュール(LM)と呼ぶものとする。
Next, the load
図4に戻り説明を続ける。ロードモジュール生成装置100は、初回ロードモジュールを対象システム200へ転送する(S102)。具体的には、転送部123は、記憶装置110から初回ロードモジュールを読み出し、通信部140を用いてネットワークNを介して初回ロードモジュールを対象システム200へ転送する。
Returning to FIG. 4, the explanation will be continued. The load
対象システム200は、ネットワークNを介して初回ロードモジュールを受信し、記憶装置210にロードモジュール212として保存する。その後、対象システム200は、初回ロードモジュールをメモリ230にロードする(S103)。例えば、モジュール処理部221は、ロードモジュール生成装置100からの初回ロードモジュールの起動指示、又は、ユーザからの指示に応じてロードを行っても良い。または、モジュール処理部221は、初回ロードモジュールの受信に応じてロードを行っても良い。このとき、モジュール処理部221は、記憶装置210からロードモジュール212を読み出し、メモリ230へロードする。そして、対象システム200は、初回ロードモジュールを実行する(S104)。具体的には、モジュール処理部221は、メモリ230内のロードモジュール212のうちオブジェクトモジュール111内のメイン関数の実行を開始する。そのため、プロセッサ220は、対象アプリ222として機能する。このようにして、初回ロードモジュールがロードモジュール生成装置100において生成され、対象システム200において実行される。併せて、プロセッサ220は、組込みローダ223を実行する。これにより、組込みローダ223は、パッチ適用要求のイベントの監視を開始する。
The
図6は、本実施の形態2にかかるロードモジュールの生成及び内訳の概念を説明する図である。まず、オブジェクトモジュール111a、111b及び111cは、オブジェクトモジュール111内の3つの関数のそれぞれに対応し、例えば、ステップS111で生成されたオブジェクトファイルの一例である。また、LM生成ツール1221は、生成部122の一例である。LM生成ツール1221には、オブジェクトモジュール111aから111c、組込みローダ112、本移行命令群113及びアドレス保持領域群114が入力される。そして、LM生成ツール1221は、これらを上述したように結合して、ロードモジュール116として出力する。
FIG. 6 is a diagram illustrating the concept of generation and breakdown of the load module according to the second embodiment. First, the
ここで、ロードモジュール116は、例えば、オブジェクトモジュール111aから111cに相当する“aaa.o”、“bbb.o”、“ccc.o”の順に配置されている。そして、“aaa.o”には、複数の関数“func_a1”、“func_a2”、“func_a3”が含まれ、この順で配置されていることを示す。また、ロードモジュール116は、オブジェクトモジュール111a等より後に組込みローダ112、本移行命令群113及びアドレス保持領域群114が配置されている。ここで、本移行命令群113内には、本移行命令113aから113cが含まれ、アドレス保持領域群114には、アドレス保持領域114aから114cが含まれる。そして、関数“func_a1”と本移行命令113aとが対応し、関数“func_a2”と本移行命令113bとが対応し、関数“func_a3”と本移行命令113cとが対応するものとする。さらに、関数“func_a1”と本移行命令113aとのアドレス距離dは、プロセッサ220のアーキテクチャの制約の範囲内、例えば、128MB以内であるものとする。また、関数“func_a1”とアドレス保持領域114aとが対応し、関数“func_a2”とアドレス保持領域114bとが対応し、関数“func_a3”とアドレス保持領域114cとが対応するものとする。
Here, the
尚、レジスタ群2201は、対象システム200のプロセッサ220内の一時的な記憶領域である。そして、レジスタ群2201は、関数“func_a1”から“func_a3”のそれぞれと対応する複数のレジスタ2201aから2201cを含むものとする。つまり、本移行命令113a、レジスタ2201a及びアドレス保持領域114aは、対応する。同様に、本移行命令113b、レジスタ2201b及びアドレス保持領域114bは、対応する。また、本移行命令113c、レジスタ2201c及びアドレス保持領域114cは、対応する。そして、例えば、本移行命令113aの第1の命令は、アドレス保持領域114aに格納されたアドレスをレジスタ2201aに格納させる命令である。そして、本移行命令113aの第2の命令は、レジスタ2201aに格納されたレジスタ値(アドレス)をジャンプ先としたジャンプ命令である。本移行命令113b及び113cについて同様である。
The
図7は、本実施の形態2にかかるパッチの生成から適用までの流れを説明するためのシーケンス図である。ここでは、対象システム200で実行中の対象アプリ222について一部の機能を修正するものとする。すなわち、ロードモジュール212内のオブジェクトモジュール111に含まれる関数の一部を更新し、対象アプリ222の実行を停止せずにパッチ適用する場合について説明する。そのため、モジュール処理部221は、初回ロードモジュールを実行中である(S120)。つまり、対象アプリ222が実行中であると共に、組込みローダ223は、パッチ適用要求のイベントを監視している。
FIG. 7 is a sequence diagram for explaining a flow from generation to application of the patch according to the second embodiment. Here, it is assumed that some functions of the
そして、ロードモジュール生成装置100は、パッチを生成する(S121)。図8は、本実施の形態2にかかるパッチ生成処理の流れを説明するためのフローチャートである。まず、ロードモジュール生成装置100は、更新後関数のオブジェクトモジュールを生成する(S131)。例えば、受付部121は、ユーザの操作に応じて、オブジェクトモジュール111内の一部の関数を更新するためのプログラムコードの入力を受け付けて、生成部122は、更新前のソースファイルを編集して更新後のソースファイルを生成する。そして、生成部122は、生成した更新後のソースファイルをコンパイル等して、更新後関数のオブジェクトモジュールを生成し、記憶装置110に格納する。尚、更新後関数のオブジェクトモジュールは、ロードモジュール生成装置100の外部で生成され、受付部121が外部から更新後関数のオブジェクトモジュールの入力を受け付けても良い。
Then, the load
次に、ロードモジュール生成装置100は、仮移行命令を生成する(S132)。例えば、受付部121は、ユーザの操作に応じて、相対アドレスを指定したジャンプ命令のコードの入力を受け付け、また、記憶装置110から更新後関数のオブジェクトモジュールを読み出す。生成部122は、更新後関数のオブジェクトモジュールと、入力されたジャンプ命令のコードに基づいて仮移行命令を生成する。このとき、生成部122は、オブジェクトモジュール111を解析して、更新後関数に対応する本移行命令の相対アドレスを特定する。そして、生成部122は、特定された相対アドレスをジャンプ先としたジャンプ命令のコードを仮移行命令として生成する。尚、仮移行命令は、更新対象の関数のそれぞれに対応した複数のジャンプ命令を含むものとする。
Next, the load
続いて、ロードモジュール生成装置100は、複数の更新後関数のオブジェクトモジュールをまとめてパッチDLL(Dynamic Link Library)を生成する(S133)。尚、DLLの生成方法は、公知の手法を適用できる。そして、ロードモジュール生成装置100は、パッチリストを生成する(S134)。すなわち、生成部122は、更新後関数と、当該関数に対応する仮移行命令(のジャンプ命令)との対応付けを定義したファイルを生成する。その後、ロードモジュール生成装置100は、生成した仮移行命令、パッチDLL及びパッチリストをまとめてパッチデータとして出力する(S135)。例えば、生成部122は、パッチデータを記憶装置110に保存する。
Subsequently, the load
図9は、本実施の形態2にかかるパッチの生成及び内訳の概念を説明する図である。まず、更新後オブジェクトモジュール117は、ステップS131で生成される更新後関数のオブジェクトモジュールの一例である。更新後オブジェクトモジュール117は、例えば、上述したオブジェクトモジュール111a内の一部の関数“func_a1”及び“func_a3”に対して所定の更新を行ったオブジェクトモジュールであるものとする。LM生成ツール1221には、更新後オブジェクトモジュール117及びロードモジュール116が入力される。そして、LM生成ツール1221は、これらを用いて上述したように仮移行命令1181、パッチDLL1182及びパッチリスト1183を生成して、出力する。
FIG. 9 is a diagram illustrating the concept of patch generation and breakdown according to the second embodiment. First, the updated
仮移行命令1181は、例えば、ジャンプ命令(のオブジェクトモジュール)“s_001.jp”と“s_003.jp”を含む。ジャンプ命令“s_001.jp”は、例えば、ロードモジュール116内の“func_a1”の先頭アドレスから本移行命令113aの先頭アドレスまでの間の相対アドレスをジャンプ先として指定した1つのジャンプ命令である。また、ジャンプ命令“s_003.jp”は、例えば、ロードモジュール116内の“func_a3”の先頭アドレスから本移行命令113cの先頭アドレスまでの間の相対アドレスをジャンプ先として指定した1つのジャンプ命令である。
The
パッチDLL1182は、更新後オブジェクトモジュール117から生成されたDLLファイル“aaa2.so.I”である。パッチリスト1183は、パッチの対象がDLLファイル“aaa2.so.I”であること、更新対象の関数“func_a1”とジャンプ命令“s_001.jp”との対応付け、更新対象の関数“func_a3”とジャンプ命令“s_003.jp”との対応付けを定義したファイルである。尚、パッチリスト1183の形式は、一例に過ぎず、これに限定されない。
The patch DLL1182 is a DLL file "aaa2.so.I" generated from the updated
図7に戻り説明を続ける。ロードモジュール生成装置100は、生成したパッチデータを対象システム200へ転送する(S122)。具体的には、転送部123は、記憶装置110からパッチデータを読み出し、通信部140を用いてネットワークNを介してパッチデータを対象システム200へ転送する。このとき、ロードモジュール生成装置100は、パッチデータと共にパッチ適用指示を送信してもよい。
Returning to FIG. 7, the explanation will be continued. The load
対象システム200のモジュール処理部221は、ネットワークNを介してパッチデータを受信し、パッチデータ、つまり、仮移行命令、パッチDLL及びパッチリストを記憶装置210に保存する(S123)。その後、モジュール処理部221は、パッチ適用要求のイベントを発生させる(S124)。例えば、モジュール処理部221は、ロードモジュール生成装置100からのパッチ適用指示、又は、ユーザからの指示に応じてパッチ適用要求のイベントを発生させてもよい。または、モジュール処理部221は、パッチデータの受信に応じてパッチ適用要求のイベントを発生させてもよい。
The
そして、組込みローダ223は、パッチ適用要求のイベントを検出し、パッチDLLのロード等を行う(S125)。図10は、本実施の形態2にかかる組込みローダにおけるパッチ適用処理の流れを説明するためのフローチャートである。まず、組込みローダ223は、上述した通り、パッチ適用要求のイベントを検出する(S141)。次に、組込みローダ223は、パッチDLL1182をメモリ230にロードする(S142)。具体的には、組込みローダ223は、パッチリスト1183に基づいて、DLLファイル“aaa2.so.I”を記憶装置210から読み出してメモリ230へロードする。これにより、パッチDLL1182内の各更新後関数のメモリ230上の絶対アドレスが確定する。そして、組込みローダ223は、パッチDLL1182の絶対アドレスを取得する(S143)。例えば、組込みローダ223は、メモリ230内の各更新後関数を検索し、各更新後関数の先頭アドレスを特定する。そして、組込みローダ223は、取得したパッチDLL1182の各関数の絶対アドレスを、アドレス保持領域群114内の更新対象の関数に対応する領域に設定する(S144)。
Then, the embedded
図7に戻り説明を続ける。その後、組込みローダ223は、ステップS125の後、ステップS125の処理が終了した旨をモジュール処理部221へ通知する(S126)。モジュール処理部221は、組込みローダ223からの通知に応じて、更新対象の関数に対応する仮移行命令1181を、対応する更新前関数の先頭アドレスに挿入する(S127)。例えば、モジュール処理部221は、パッチリスト1183に基づいて、更新対象の関数名に対応する更新前関数の先頭アドレスに、対応付けられた仮移行命令のコードを挿入する。このとき、モジュール処理部221は、例えば、ptraceシステムコールを用いて、仮移行命令を挿入してもよい。モジュール処理部221は、パッチ適用後の関数を実行する(S128)。具体的には、モジュール処理部221は、更新前の関数の先頭アドレスのジャンプ命令(仮移行命令)を実行し、JUMP関数(本移行命令)を経由してパッチDLL内の(更新後の)関数を実行する。
Returning to FIG. 7, the explanation will be continued. After that, the embedded
図11は、本実施の形態2にかかるパッチ適用時のメモリ内容の概念を説明する図である。まず、ステップS142によりパッチDLL1182がメモリ230にロードされることにより、更新後関数“func_a1”と“func_a3”の絶対アドレスが確定したことを示す。ここでは、更新後関数“func_a1”のメモリ230上の絶対アドレスが“0xffff ff00”、更新後関数“func_a3”のメモリ230上の絶対アドレスが“0xffff ffa0”となったことを示す。そして、ステップS143及びS144により、更新後関数“func_a1”と“func_a3”の絶対アドレスが、対応するアドレス保持領域114a及び114cにそれぞれ設定されたことを示す。さらに、ステップS127により、本移行命令113aへのジャンプ命令“s_001.jp”が更新前関数“func_a1”の先頭アドレスに挿入され、本移行命令113cへのジャンプ命令“s_003.jp”が更新前関数“func_a3”の先頭アドレスに挿入されたことを示す。
FIG. 11 is a diagram illustrating a concept of memory contents at the time of patch application according to the second embodiment. First, it is shown that the patch DLL1182 is loaded into the
その後、ステップS128において、例えば、更新前関数“func_a1”が呼び出された場合、先頭アドレスのジャンプ命令“s_001.jp”により、本移行命令113aへ処理が移行する。そして、本移行命令113aの第1の命令の実行により、対応するアドレス保持領域114aのアドレス“0xffff ff00”がレジスタ2201aに格納される。続いて、本移行命令113aの第2の命令の実行により、対応するレジスタ2201aのレジスタ値“0xffff ff00”をジャンプ先としたジャンプ命令が実行される。これにより、メモリ230上の絶対アドレス“0xffff ff00”に処理が移行する。そして、絶対アドレス“0xffff ff00”にロードされている更新後関数“func_a1”が(更新前関数“func_a1”の代わりに)実行される。また、更新前関数“func_a3”が呼び出された場合には、同等の処理により、メモリ230上の絶対アドレス“0xffff ffa0”に処理が移行する。そして、絶対アドレス“0xffff ffa0”にロードされている更新後関数“func_a3”が(更新前関数“func_a3”の代わりに)実行される。
After that, in step S128, for example, when the pre-update function "func_a1" is called, the process shifts to the
このように、本実施の形態により、プロセッサのアーキテクチャの制約に依存せず、動的なパッチ適用処理が実現可能となる。 As described above, according to this embodiment, dynamic patch application processing can be realized without depending on the restrictions of the processor architecture.
<実施の形態3>
本実施の形態3は、上述した実施の形態2を改良したものである。動的なパッチ適用を繰り返し行った場合には、更新後関数のオブジェクトモジュールがメモリ上に累積されることになる。一方で、対象システム200は、原則として無中断で稼働するとはいえ、定期的又は不定期の任意のタイミングでシステムを再起動することもある。その場合、初回ロードモジュールをロードした上で、これまで適用した全てのパッチを再度、適用することになる。そのため、再起動後に対象アプリが利用可能になるまでに要する時間が長くなり、また、メモリ230の使用容量も増加し得る。そこで、本実施の形態では、パッチ作成時に併せて、パッチ適用済みロードモジュールを生成し、パッチデータと共に対象システムへ送信し、システム再起動時にパッチ適用済みロードモジュールをロードできるようにするものである。
<Embodiment 3>
The third embodiment is an improvement of the second embodiment described above. When dynamic patch application is repeated, the object module of the updated function will be accumulated in the memory. On the other hand, although the
すなわち、本実施の形態にかかる生成部は、前記生成されたロードモジュールのうち、前記更新対象関数を、前記更新後関数に置き換えてパッチ適用済みロードモジュールを生成する。その後、前記転送部は、前記対象システムの再起動時に前記ロードモジュールに代えて前記メモリへロードさせるために、前記対象システムに対して、前記パッチ適用済みロードモジュールを転送する。 That is, the generation unit according to the present embodiment replaces the update target function with the updated function among the generated load modules to generate the patch-applied load module. After that, the transfer unit transfers the patched load module to the target system in order to load the target system into the memory instead of the load module when the target system is restarted.
そして、本実施の形態にかかる対象システムは、前記ロードモジュール生成装置から受信した前記パッチ適用済みロードモジュールを記憶装置に格納する。そして、対象システムは、再起動時に、前記ロードモジュールに代えて前記パッチ適用済みロードモジュールを前記記憶装置から前記メモリへロードし、前記パッチ適用済みロードモジュール内の前記更新後関数を含む対象モジュールを実行する。 Then, the target system according to the present embodiment stores the patch-applied load module received from the load module generation device in the storage device. Then, when the target system is restarted, the patch-applied load module is loaded from the storage device to the memory in place of the load module, and the target module including the updated function in the patch-applied load module is loaded. Run.
このように、パッチ生成時に併せて、パッチ適用済みのロードモジュールも生成し、併せて、送信しておくことで、次回起動時にパッチ適用済みのロードモジュールを起動することが可能となる。よって、再度のパッチ適用が不要となる。また、パッチ生成時と同時に生成するため、パッチ内容との齟齬も防げる。 In this way, by generating and transmitting the patched load module at the same time as the patch generation, it is possible to start the patched load module at the next startup. Therefore, it is not necessary to apply the patch again. Also, since it is generated at the same time as the patch is generated, it is possible to prevent discrepancies with the patch contents.
図12は、本実施の形態3にかかる動的プログラム更新システム1000aの構成を示すブロック図である。動的プログラム更新システム1000aは、上述した図3と比べて、ロードモジュール生成装置100がロードモジュール生成装置100aに置き換わったものである。ここで、ロードモジュール生成装置100aは、本実施の形態にかかるパッチ適用済みロードモジュール生成処理が実行された後の状態を示す。そのため、ロードモジュール生成装置100aの記憶装置110には、オブジェクトモジュール111、組込みローダ112、本移行命令群113及びアドレス保持領域群114が省略されている。また、ロードモジュール生成プログラム115aは、上述したロードモジュール生成プログラム115の処理に加えて、本実施の形態にかかるパッチ適用済みロードモジュール生成処理が実装されたものである。また、ロードモジュール116、更新後オブジェクトモジュール117、仮移行命令1181、パッチDLL1182及びパッチリスト1183は、上述した実施の形態2で説明したものと同等なものである。パッチ適用済みロードモジュール116aは、ロードモジュール116のうち、更新後オブジェクトモジュール117に対応する更新前関数を、更新後関数に置き換えたものである。
FIG. 12 is a block diagram showing a configuration of the dynamic
プロセッサ120は、記憶装置110からロードモジュール生成プログラム115aをメモリ130へロードして、実行する。これにより、プロセッサ120は、受付部121、生成部122a及び転送部123aの機能を実現する。生成部122aは、入力されたロードモジュール116のうち、更新後オブジェクトモジュール117に対応する更新前関数を、当該更新後関数に置き換えてパッチ適用済みロードモジュール116aを生成する。その後、転送部123aは、対象システム200の再起動時にロードモジュール212に代えてメモリ230へロードさせるために、対象システム200に対して、パッチ適用済みロードモジュール116aを転送する。
The
対象システム200のモジュール処理部221は、受信したパッチ適用済みロードモジュール116aを記憶装置210のロードモジュール212に上書きする。尚、その他の構成は、上述した実施の形態2と同等であるため、詳細な説明を省略する。
The
図13は、本実施の形態3にかかるパッチ適用済みロードモジュールの生成から実行までの流れを説明するためのシーケンス図である。尚、以下の説明において上述した図7と同等の処理については同一の符号を付し、適宜、説明を省略する。 FIG. 13 is a sequence diagram for explaining a flow from generation to execution of the patch-applied load module according to the third embodiment. In the following description, the same processes as those in FIG. 7 described above are designated by the same reference numerals, and the description thereof will be omitted as appropriate.
まず、ロードモジュール生成装置100aは、パッチ及びパッチ適用済みロードモジュールを生成する(S121a)。図14は、本実施の形態3にかかるパッチ生成処理及びパッチ適用済みロードモジュール生成処理の流れを説明するためのフローチャートである。尚、ステップS131からS135の処理は、上述した図8と同等の処理であるため、説明を省略する。ステップS135の後、ロードモジュール生成装置100aは、パッチ適用済みロードモジュール116aを生成する(S136)。具体的には、生成部122aは、記憶装置110からロードモジュール116及び更新後オブジェクトモジュール117を読み出し、ロードモジュール116のうち更新後オブジェクトモジュール117に対応する更新前関数のコードを、更新後オブジェクトモジュール117に置き換える。そして、ロードモジュール生成装置100aは、生成したパッチ適用済みロードモジュール116aを出力する(S137)。例えば、生成部122aは、パッチ適用済みロードモジュール116aを記憶装置110に保存する。尚、ステップS136及びS137は、ステップS133の後に、ステップS134及びS135の前又は並列して実行しても構わない。
First, the load
図13に戻り説明を続ける。ロードモジュール生成装置100aは、生成したパッチデータ及びパッチ適用済みロードモジュール116aを対象システム200へ転送する(S122a)。具体的には、転送部123aは、記憶装置110からパッチデータ及びパッチ適用済みロードモジュール116aを読み出す。そして、転送部123aは、通信部140を用いてネットワークNを介してパッチデータ及びパッチ適用済みロードモジュール116aを対象システム200へ転送する。このとき、ロードモジュール生成装置100aは、パッチ適用指示及びパッチ適用済みロードモジュール116aの差替え指示を送信してもよい。
Returning to FIG. 13, the explanation will be continued. The load
対象システム200のモジュール処理部221は、ネットワークNを介してパッチデータ及びパッチ適用済みロードモジュール116aを受信し、パッチデータと共にパッチ適用済みロードモジュール116aを記憶装置210に保存する(S123a)。このとき、モジュール処理部221は、パッチ適用済みロードモジュール116aによりロードモジュール212を上書き保存してもよい。モジュール処理部221は、少なくとも再起動後に、ロードモジュール212に代えてパッチ適用済みロードモジュール116aをロードする場所に保存するものとする。
The
その後、上述したように、ステップS124からS128が実行される。そして、対象システム200が再起動したものとする(S1291)。その後、モジュール処理部221は、記憶装置210からパッチ適用済みロードモジュール116aをメモリ230にロードする(S1292)。そして、モジュール処理部221は、パッチ適用済みロードモジュール116aを実行する(S1293)。具体的には、モジュール処理部221は、メモリ230内のパッチ適用済みロードモジュール116aのうちオブジェクトモジュール内のメイン関数の実行を開始する。併せて、組込みローダ223は、パッチ適用要求のイベントの監視を開始する。
Then, as described above, steps S124 through S128 are executed. Then, it is assumed that the
このように、本実施の形態により、対象システムの再起動後に再度のパッチ適用が不要となり、かつ、パッチ内容との齟齬も防げる。 As described above, according to the present embodiment, it is not necessary to apply the patch again after restarting the target system, and it is possible to prevent a discrepancy with the patch contents.
<実施の形態4>
図15は、本実施の形態4にかかる情報処理装置3の構成を示すブロック図である。情報処理装置3は、上述した対象システムに相当するコンピュータシステムである。情報処理装置3は、コンピュータサーバ又は組込み機器等であればよい。
<Embodiment 4>
FIG. 15 is a block diagram showing the configuration of the information processing apparatus 3 according to the fourth embodiment. The information processing device 3 is a computer system corresponding to the above-mentioned target system. The information processing device 3 may be a computer server, an embedded device, or the like.
情報処理装置3は、メモリ31と、プロセッサ32とを少なくとも備える。メモリ31は、RAM等の揮発性記憶装置である。メモリ31は、ロードモジュール33を少なくとも記憶する。ロードモジュール33は、対象モジュール331と、組込みローダ332と、アドレス保持領域333と、本移行命令334とが結合されたモジュールである。尚、ロードモジュール33は、上述したロードモジュール13と同等の構成であるため、内部の各構成についての詳細な説明を省略する。
The information processing apparatus 3 includes at least a
プロセッサ32は、上述したプロセッサ220と同等の構成である。プロセッサ32は、情報処理装置3内の記憶装置(不図示)からロードモジュール33をメモリ31へロードして実行する。これにより、プロセッサ32は、対象モジュール331に相当するアプリケーション及び組込みローダ332の機能を実現する。
The
図16は、本実施の形態4にかかる動的プログラム更新方法の流れを説明するためのフローチャートである。まず、プロセッサ32は、ロードモジュール33をメモリ31にロードする(S41)。次に、プロセッサ32は、ロードモジュール33内の対象モジュール331を実行する(S42)。併せて、プロセッサ32は、組込みローダ332を実行する。これにより、組込みローダ332は、パッチ適用要求のイベントの監視を開始する。
FIG. 16 is a flowchart for explaining the flow of the dynamic program update method according to the fourth embodiment. First, the
そして、情報処理装置3は、外部から仮移行命令及び更新後モジュールを受信し、その後、組込みローダ332は、パッチ適用要求を検出する(S43)。そして、組込みローダ332は、受信した更新後モジュールをメモリ31にロードする(S44)。続いて、組込みローダ332は、更新後関数のメモリ31上の先頭アドレスを第1のアドレスとしてアドレス保持領域333に格納する(S45)。その後、プロセッサ32は、受信した仮移行命令を、メモリ31上の対象モジュール331内の更新対象関数の先頭アドレスに挿入する(S46)。
Then, the information processing apparatus 3 receives the temporary migration instruction and the updated module from the outside, and then the embedded
ここで、本移行命令134は、上述した実施の形態1と同様に、更新後関数に対応する対象モジュール331内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されている。また、仮移行命令は、上述した実施の形態1と同様に、第2のアドレスを移行先の相対アドレスとして処理を移行させる命令である。そのため、以後、対象モジュール131の実行中に、更新後関数に対応する更新対象関数が呼び出された場合には、先頭アドレスの仮移行命令が実行されて、本移行命令へ遷移する。そして、本移行命令の実行により、更新後関数又は更新対象関数に対応するアドレス保持領域133内の記憶領域に格納された絶対アドレスがレジスタに格納され、当該レジスタの格納値を宛先とした移行命令が実行され、更新後関数へ遷移し、更新後関数の処理が実行される。このようにして、パッチ適用後の処理が実現される。
Here, the
そのため、本実施の形態4においても、上述した実施の形態1と同様の効果を奏する。 Therefore, even in the fourth embodiment, the same effect as that of the first embodiment described above is obtained.
<その他の実施の形態>
尚、上述の実施の形態では、ハードウェアの構成として説明したが、これに限定されるものではない。本開示は、任意の処理を、CPUにコンピュータプログラムを実行させることにより実現することも可能である。
<Other embodiments>
In the above-described embodiment, the description is made as a hardware configuration, but the present invention is not limited to this. The present disclosure can also be realized by causing the CPU to execute a computer program for arbitrary processing.
上述の例において、プログラムは、様々なタイプの非一時的なコンピュータ可読媒体(non-transitory computer readable medium)を用いて格納され、コンピュータに供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(tangible storage medium)を含む。非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えばフレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば光磁気ディスク)、CD-ROM(Read Only Memory)、CD-R、CD-R/W、DVD(Digital Versatile Disc)、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュROM、RAM(Random Access Memory))を含む。また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(transitory computer readable medium)によってコンピュータに供給されてもよい。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバ等の有線通信路、又は無線通信路を介して、プログラムをコンピュータに供給できる。 In the above example, the program can be stored and supplied to the computer using various types of non-transitory computer readable medium. Non-temporary computer-readable media include various types of tangible storage media. Examples of non-temporary computer-readable media include magnetic recording media (eg, flexible disks, magnetic tapes, hard disk drives), optomagnetic recording media (eg, optomagnetic disks), CD-ROMs (Read Only Memory), CD-Rs. Includes CD-R / W, DVD (Digital Versatile Disc), semiconductor memory (eg, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM (Random Access Memory)). The program may also be supplied to the computer by various types of transient computer readable media. Examples of temporary computer readable media include electrical, optical, and electromagnetic waves. The temporary computer-readable medium can supply the program to the computer via a wired communication path such as an electric wire and an optical fiber, or a wireless communication path.
なお、本開示は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。また、本開示は、それぞれの実施の形態を適宜組み合わせて実施されてもよい。 The present disclosure is not limited to the above embodiment, and can be appropriately modified without departing from the spirit. Further, the present disclosure may be carried out by appropriately combining the respective embodiments.
上記の実施形態の一部又は全部は、以下の付記のようにも記載され得るが、以下には限られない。
(付記1)
対象システムで実行させるための複数の関数を含む実行形式のプログラムである対象モジュールの入力を受け付ける受付部と、
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納された前記第1のアドレスに対して処理を移行させる本移行命令と、前記入力された対象モジュールと、を結合してロードモジュールを生成する生成部と、
を備え、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを前記第1のアドレスとして前記アドレス保持領域に格納する処理を含み、
前記生成部は、
前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に前記本移行命令を配置して、前記ロードモジュールを生成し、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
情報処理装置。
(付記2)
前記第2のアドレスのサイズは、
前記対象システムのプロセッサのアドレッシングサイズの上限以内である
付記1に記載の情報処理装置。
(付記3)
前記受付部は、前記更新後モジュールの入力をさらに受け付け、
前記生成部は、
前記第2のアドレスに対して処理を移行させる前記仮移行命令を生成し、
前記情報処理装置は、
前記パッチ適用の要求を発生させるために、前記対象モジュールが実行中である前記対象システムに対して、前記更新後モジュール及び前記仮移行命令を転送する転送部をさらに備える
付記1又は2に記載の情報処理装置。
(付記4)
前記組込みローダは、
前記パッチ適用の要求の検出時に、前記転送された更新後モジュールを前記メモリへロードする処理と、
前記更新後関数の先頭アドレスである前記メモリ上の絶対アドレスを取得する処理と、
前記取得した絶対アドレスを前記第1のアドレスとして前記アドレス保持領域に格納する処理と、を含む
付記3に記載の情報処理装置。
(付記5)
前記生成部は、
前記更新後関数と前記仮移行命令との対応付けを定義したパッチリストをさらに生成し、
前記転送部は、前記更新後モジュール及び前記仮移行命令と共に前記パッチリストを転送し、
前記組込みローダは、
前記パッチ適用の要求の検出時に、前記転送されたパッチリストに基づいて前記更新後モジュールの前記メモリへのロードを開始する
付記3又は4に記載の情報処理装置。
(付記6)
前記生成部は、
前記生成されたロードモジュールのうち、前記更新対象関数を、前記更新後関数に置き換えてパッチ適用済みロードモジュールを生成し、
前記転送部は、前記対象システムの再起動時に前記ロードモジュールに代えて前記メモリへロードさせるために、前記対象システムに対して、前記パッチ適用済みロードモジュールを転送する
付記3乃至5のいずれか1項に記載の情報処理装置。
(付記7)
対象システムで実行させるための複数の関数を含む実行形式のプログラムである対象モジュールの入力を受け付け、
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納された前記第1のアドレスに対して処理を移行させる本移行命令と、前記入力された対象モジュールと、を結合してロードモジュールを生成し、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記ロードモジュールを生成する際に、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に前記本移行命令を配置し、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
ロードモジュール生成方法。
(付記8)
対象システムで実行させるための複数の関数を含む実行形式のプログラムである対象モジュールの入力を受け付ける処理と、
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納された前記第1のアドレスに対して処理を移行させる本移行命令と、前記入力された対象モジュールと、を結合してロードモジュールを生成する処理と、
をコンピュータに実行させ、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記ロードモジュールを生成する処理は、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に前記本移行命令を配置し、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
ロードモジュール生成プログラム。
(付記9)
対象システムで実行させるための複数の関数を含む実行形式のプログラムである対象モジュールと、
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、
前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、
前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる本移行命令と、
が結合され、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記本移行命令は、
前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置され、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
プログラム。
(付記10)
情報処理装置と、対象システムと、を備え、
前記対象システムは、
複数の関数を含む実行形式のプログラムである対象モジュールと、前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる本移行命令と、が結合されたロードモジュールを前記メモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行し、
前記本移行命令は、
前記ロードモジュール内で、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されており、
前記情報処理装置は、
前記更新後モジュールの入力を受け付け、
前記第2のアドレスを移行先の相対アドレスとして処理を移行させる仮移行命令を生成し、
前記パッチ適用の要求を発生させるために、前記対象モジュールが実行中である前記対象システムに対して、前記更新後モジュール及び前記仮移行命令を転送し、
前記メモリにロードされた前記組込みローダは、
前記対象システムが前記更新後モジュール及び前記仮移行命令を受信後に、前記パッチ適用の要求を検出し、
前記受信した更新後モジュールが前記ロードされた際の前記更新後関数の前記メモリ上の先頭アドレスを前記第1のアドレスとして前記アドレス保持領域に格納し、
前記対象システムは、
前記仮移行命令を、前記メモリ上の前記更新対象関数の先頭アドレスに挿入する
動的プログラム更新システム。
(付記11)
前記情報処理装置は、
前記対象モジュールの入力を受け付け、
前記入力された対象モジュールと、前記組込みローダと、前記アドレス保持領域と、前記本移行命令と、を結合して前記ロードモジュールを生成し、
前記ロードモジュールを前記対象システムに対して転送し、
前記対象システムは、
前記情報処理装置から受信したロードモジュールを前記メモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行する
付記10に記載の動的プログラム更新システム。
(付記12)
前記第2のアドレスのサイズは、
前記対象システムのプロセッサのアドレッシングサイズの上限以内である
付記10又は11に記載の動的プログラム更新システム。
(付記13)
前記組込みローダは、
前記パッチ適用の要求の検出時に、前記受信した更新後モジュールを前記メモリへロードし、
前記更新後関数の先頭アドレスである前記メモリ上の絶対アドレスを取得し、
前記取得した絶対アドレスを前記第1のアドレスとして前記アドレス保持領域に格納する
付記10乃至12のいずれか1項に記載の動的プログラム更新システム。
(付記14)
前記情報処理装置は、
前記更新後関数と前記仮移行命令との対応付けを定義したパッチリストをさらに生成し、
前記更新後モジュール及び前記仮移行命令と共に前記パッチリストを転送し、
前記組込みローダは、
前記パッチ適用の要求の検出時に、前記転送されたパッチリストに基づいて前記更新後モジュールの前記メモリへのロードを開始する
付記10乃至13のいずれか1項に記載の動的プログラム更新システム。
(付記15)
前記情報処理装置は、
前記ロードモジュールのうち、前記更新対象関数を、前記更新後関数に置き換えてパッチ適用済みロードモジュールを生成し、
前記更新後モジュール及び前記仮移行命令と共に、前記パッチ適用済みロードモジュールを転送し、
前記対象システムは、
前記情報処理装置から受信した前記パッチ適用済みロードモジュールを記憶装置に格納し、
再起動時に、前記ロードモジュールに代えて前記パッチ適用済みロードモジュールを前記記憶装置から前記メモリへロードし、
前記パッチ適用済みロードモジュール内の前記更新後関数を含む対象モジュールを実行する、
付記10乃至14のいずれか1項に記載の動的プログラム更新システム。
(付記16)
対象システムにおいて、
複数の関数を含む実行形式のプログラムである対象モジュールと、前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる本移行命令と、が結合されたロードモジュールを前記メモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行し、
前記本移行命令は、
前記ロードモジュール内で、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されており、
情報処理装置において、
前記更新後モジュールの入力を受け付け、
前記第2のアドレスを移行先の相対アドレスとして処理を移行させる仮移行命令を生成し、
前記パッチ適用の要求を発生させるために、前記対象モジュールが実行中である前記対象システムに対して、前記更新後モジュール及び前記仮移行命令を転送し、
前記メモリにロードされた前記組込みローダにおいて、
前記対象システムが前記更新後モジュール及び前記仮移行命令を受信後に、前記パッチ適用の要求を検出し、
前記受信した更新後モジュールが前記ロードされた際の前記更新後関数の前記メモリ上の先頭アドレスを前記第1のアドレスとして前記アドレス保持領域に格納し、
前記対象システムにおいて、
前記仮移行命令を、前記メモリ上の前記更新対象関数の先頭アドレスに挿入する
動的プログラム更新方法。
(付記17)
複数の関数を含む実行形式のプログラムである対象モジュールと、組込みローダと、アドレス保持領域と、本移行命令と、が結合されたロードモジュールを記憶するメモリと、
前記メモリに記憶された前記対象モジュールを実行するプロセッサと、
を備え、
前記組込みローダは、
前記プロセッサが実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを前記メモリにロードし、
前記アドレス保持領域は、
前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するための領域であり、
前記本移行命令は、
前記アドレス保持領域に保持された前記第1のアドレスを前記プロセッサのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる命令であり、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記本移行命令は、
前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置され、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
情報処理装置。
(付記18)
情報処理装置が備えるプロセッサが、
複数の関数を含む実行形式のプログラムである対象モジュールと、組込みローダと、アドレス保持領域と、本移行命令と、が結合されたロードモジュールを前記情報処理装置のメモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行し、
前記メモリにロードされた前記組込みローダが、
前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールと仮移行命令とを受信後に、前記対象モジュールに対する当該更新後モジュールのパッチ適用の要求を検出し、
前記受信した更新後モジュールを前記メモリにロードし、
前記更新後関数の前記メモリ上の先頭アドレスを第1のアドレスとして前記アドレス保持領域に格納し、
前記プロセッサが、
前記仮移行命令を、前記メモリ上の前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスに挿入し、
前記本移行命令は、
前記アドレス保持領域に保持された前記第1のアドレスを前記プロセッサのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる命令であり、
前記ロードモジュール内で、前記更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されており、
前記仮移行命令は、
前記第2のアドレスを移行先の相対アドレスとして処理を移行させる命令である
動的プログラム更新方法。
Some or all of the above embodiments may also be described, but not limited to:
(Appendix 1)
A reception unit that accepts input from the target module, which is an executable program that includes multiple functions to be executed on the target system.
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system. The address holding area for holding the first address corresponding to the updated function on the memory and the first address held in the address holding area are stored in the register of the target system, and the register is stored. A generation unit that generates a load module by combining the transfer instruction for migrating the process to the first address stored in the first address and the input target module.
Equipped with
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module as the first address in the address holding area is included.
The generator is
The transfer instruction is placed at a position separated from the start address of the update target function in the target module corresponding to the post-update function by a second address to generate the load module.
The second address is
An information processing device that is a relative address indicating a migration destination of processing in a provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
(Appendix 2)
The size of the second address is
The information processing apparatus according to
(Appendix 3)
The reception unit further accepts the input of the updated module,
The generator is
Generate the temporary transfer instruction to transfer the process to the second address,
The information processing device is
The following is described in
(Appendix 4)
The built-in loader is
When the patch application request is detected, the process of loading the transferred updated module into the memory and the process of loading the transferred module into the memory.
The process of acquiring the absolute address in the memory, which is the start address of the function after the update,
The information processing apparatus according to Appendix 3, comprising a process of storing the acquired absolute address as the first address in the address holding area.
(Appendix 5)
The generator is
Further generate a patch list that defines the correspondence between the updated function and the provisional transition instruction.
The transfer unit transfers the patch list together with the updated module and the temporary migration instruction.
The built-in loader is
The information processing apparatus according to Appendix 3 or 4, which starts loading the updated module into the memory based on the transferred patch list when the patch application request is detected.
(Appendix 6)
The generator is
Of the generated load modules, the updated function is replaced with the updated function to generate a patched load module.
The transfer unit transfers the patched load module to the target system in order to load the load module into the memory instead of the load module when the target system is restarted. The information processing device described in the section.
(Appendix 7)
Accepts the input of the target module, which is an executable program containing multiple functions to be executed on the target system.
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system. The address holding area for holding the first address corresponding to the updated function on the memory and the first address held in the address holding area are stored in the register of the target system, and the register is stored. The transfer instruction for migrating the process to the first address stored in the first address and the input target module are combined to generate a load module.
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
When the load module is generated, the transition instruction is placed at a position separated from the start address of the update target function in the target module corresponding to the post-update function by a second address.
The second address is
A method for generating a load module, which is a relative address indicating a migration destination of processing in a provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
(Appendix 8)
The process of accepting the input of the target module, which is an executable program containing multiple functions to be executed on the target system,
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system. The address holding area for holding the first address corresponding to the updated function on the memory and the first address held in the address holding area are stored in the register of the target system, and the register is stored. A process of combining the transfer command for migrating the process to the first address stored in the input and the input target module to generate a load module.
Let the computer run
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
In the process of generating the load module, the transition instruction is placed at a position separated from the start address of the update target function in the target module corresponding to the update function by a second address.
The second address is
A load module generation program that is a relative address indicating a migration destination of processing in a temporary migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
(Appendix 9)
The target module, which is an executable program containing multiple functions to be executed on the target system,
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system.
An address holding area for holding a first address corresponding to the updated function on the memory, and an address holding area.
This migration instruction that stores the first address held in the address holding area in a register of the target system and shifts processing to the address stored in the register, and
Are combined,
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
The transition order is
It is placed at a position separated from the start address of the update target function in the target module corresponding to the updated function by a second address.
The second address is
A program that is a relative address indicating the migration destination of processing in the provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
(Appendix 10)
Equipped with an information processing device and a target system,
The target system is
An update that includes an updated function that updates one of the plurality of functions when applying a patch to the target module, which is an executable program containing a plurality of functions, and the target module being executed in the target system. An embedded loader that loads the rear module into the memory of the target system, an address holding area for holding the first address corresponding to the updated function on the memory, and the first address held in the address holding area. The load module in which the
Execute the target module in the load module,
The transition order is
In the load module, it is arranged at a position separated from the start address of the update target function in the target module corresponding to the update function by a second address.
The information processing device is
After accepting the input of the updated module,
Generate a temporary migration instruction to migrate the process using the second address as the relative address of the migration destination.
In order to generate the patch application request, the updated module and the provisional migration instruction are transferred to the target system in which the target module is running.
The built-in loader loaded in the memory
After the target system receives the updated module and the provisional migration instruction, the patch application request is detected.
The start address on the memory of the updated function when the received updated module is loaded is stored in the address holding area as the first address.
The target system is
A dynamic program update system that inserts the temporary migration instruction into the start address of the function to be updated on the memory.
(Appendix 11)
The information processing device is
Accepts the input of the target module
The input target module, the built-in loader, the address holding area, and the transition instruction are combined to generate the load module.
The load module is transferred to the target system, and the load module is transferred to the target system.
The target system is
The load module received from the information processing device is loaded into the memory, and the load module is loaded into the memory.
The dynamic program update system according to Appendix 10 that executes the target module in the load module.
(Appendix 12)
The size of the second address is
The dynamic program update system according to
(Appendix 13)
The built-in loader is
Upon detecting the patch application request, the received updated module is loaded into the memory.
The absolute address in the memory which is the start address of the function after the update is acquired, and the absolute address is obtained.
The dynamic program update system according to any one of Supplementary note 10 to 12, wherein the acquired absolute address is stored in the address holding area as the first address.
(Appendix 14)
The information processing device is
Further generate a patch list that defines the correspondence between the updated function and the provisional transition instruction.
The patch list is transferred together with the updated module and the temporary migration instruction.
The built-in loader is
The dynamic program update system according to any one of Supplementary note 10 to 13, which starts loading the updated module into the memory based on the transferred patch list when the patch application request is detected.
(Appendix 15)
The information processing device is
Of the load modules, the update target function is replaced with the post-update function to generate a patched load module.
The patched load module is transferred together with the updated module and the temporary migration instruction.
The target system is
The patched load module received from the information processing device is stored in the storage device, and the patched load module is stored in the storage device.
At restart, the patched load module is loaded from the storage device into the memory in place of the load module.
Execute the target module including the updated function in the patched load module.
The dynamic program update system according to any one of Supplementary note 10 to 14.
(Appendix 16)
In the target system
An update that includes an updated function that updates one of the plurality of functions when applying a patch to the target module, which is an executable program containing a plurality of functions, and the target module being executed in the target system. An embedded loader that loads the rear module into the memory of the target system, an address holding area for holding the first address corresponding to the updated function on the memory, and the first address held in the address holding area. The load module in which the
Execute the target module in the load module,
The transition order is
In the load module, it is arranged at a position separated from the start address of the update target function in the target module corresponding to the update function by a second address.
In information processing equipment
After accepting the input of the updated module,
Generate a temporary migration instruction to migrate the process using the second address as the relative address of the migration destination.
In order to generate the patch application request, the updated module and the provisional migration instruction are transferred to the target system in which the target module is running.
In the built-in loader loaded in the memory
After the target system receives the updated module and the provisional migration instruction, the patch application request is detected.
The start address on the memory of the updated function when the received updated module is loaded is stored in the address holding area as the first address.
In the target system
A dynamic program update method for inserting the provisional transition instruction into the start address of the update target function on the memory.
(Appendix 17)
A memory that stores a load module in which a target module, which is an executable program containing multiple functions, an embedded loader, an address holding area, and this migration instruction are combined,
A processor that executes the target module stored in the memory, and
Equipped with
The built-in loader is
When the processor applies a patch to the target module being executed, the updated module including the updated function that updates any of the plurality of functions is loaded into the memory.
The address holding area is
It is an area for holding the first address corresponding to the updated function on the memory.
The transition order is
It is an instruction to store the first address held in the address holding area in the register of the processor and shift the processing to the address stored in the register.
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
The transition order is
It is placed at a position separated from the start address of the update target function in the target module corresponding to the updated function by a second address.
The second address is
An information processing device that is a relative address indicating a migration destination of processing in a provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
(Appendix 18)
The processor of the information processing device
A load module in which a target module, which is an execution-type program including a plurality of functions, an embedded loader, an address holding area, and this migration instruction are combined, is loaded into the memory of the information processing apparatus.
Execute the target module in the load module,
The built-in loader loaded in the memory
After receiving the updated module including the updated function that updated any of the plurality of functions and the temporary migration instruction, the request for patch application of the updated module to the target module is detected.
The received updated module is loaded into the memory, and the module is loaded into the memory.
The start address in the memory of the updated function is stored in the address holding area as the first address.
The processor
The provisional transition instruction is inserted into the start address of the update target function in the target module corresponding to the updated function on the memory.
The transition order is
It is an instruction to store the first address held in the address holding area in the register of the processor and shift the processing to the address stored in the register.
In the load module, it is located at a position separated from the start address of the function to be updated by a second address.
The provisional transition instruction is
A dynamic program update method that is an instruction for migrating processing by using the second address as a relative address of a migration destination.
1 情報処理装置
11 受付部
12 生成部
13 ロードモジュール
131 対象モジュール
132 組込みローダ
133 アドレス保持領域
134 本移行命令
1000 動的プログラム更新システム
1000a 動的プログラム更新システム
100 ロードモジュール生成装置
100a ロードモジュール生成装置
110 記憶装置
111 オブジェクトモジュール
111a オブジェクトモジュール
111b オブジェクトモジュール
111c オブジェクトモジュール
112 組込みローダ
113 本移行命令群
113a JUMP関数
113b JUMP関数
113c JUMP関数
114 アドレス保持領域群
114a アドレス保持領域
114b アドレス保持領域
114c アドレス保持領域
115 ロードモジュール生成プログラム
115a ロードモジュール生成プログラム
116 ロードモジュール
116a パッチ適用済みロードモジュール
117 更新後オブジェクトモジュール
1181 仮移行命令
1182 パッチDLL
1183 パッチリスト
120 プロセッサ
121 受付部
122 生成部
122a 生成部
123 転送部
123a 転送部
130 メモリ
140 通信部
N ネットワーク
200 対象システム
210 記憶装置
211 OS
212 ロードモジュール
220 プロセッサ
2201 レジスタ群
2201a レジスタ
2201b レジスタ
2201c レジスタ
221 モジュール処理部
222 対象アプリ
223 組込みローダ
230 メモリ
240 通信部
1221 LM生成ツール
d アドレス距離
3 情報処理装置
31 メモリ
32 プロセッサ
33 ロードモジュール
331 対象モジュール
332 組込みローダ
333 アドレス保持領域
334 本移行命令
1
1183
212
Claims (18)
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納された前記第1のアドレスに対して処理を移行させる本移行命令と、前記入力された対象モジュールと、を結合してロードモジュールを生成する生成部と、
を備え、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを前記第1のアドレスとして前記アドレス保持領域に格納する処理を含み、
前記生成部は、
前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に前記本移行命令を配置して、前記ロードモジュールを生成し、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
情報処理装置。 A reception unit that accepts input from the target module, which is an executable program that includes multiple functions to be executed on the target system.
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system. The address holding area for holding the first address corresponding to the updated function on the memory and the first address held in the address holding area are stored in the register of the target system, and the register is stored. A generation unit that generates a load module by combining the transfer instruction for migrating the process to the first address stored in the first address and the input target module.
Equipped with
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module as the first address in the address holding area is included.
The generator is
The transfer instruction is placed at a position separated from the start address of the update target function in the target module corresponding to the post-update function by a second address to generate the load module.
The second address is
An information processing device that is a relative address indicating a migration destination of processing in a provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
前記対象システムのプロセッサのアドレッシングサイズの上限以内である
請求項1に記載の情報処理装置。 The size of the second address is
The information processing apparatus according to claim 1, wherein the addressing size of the processor of the target system is within the upper limit.
前記生成部は、
前記第2のアドレスに対して処理を移行させる前記仮移行命令を生成し、
前記情報処理装置は、
前記パッチ適用の要求を発生させるために、前記対象モジュールが実行中である前記対象システムに対して、前記更新後モジュール及び前記仮移行命令を転送する転送部をさらに備える
請求項1又は2に記載の情報処理装置。 The reception unit further accepts the input of the updated module,
The generator is
Generate the temporary transfer instruction to transfer the process to the second address,
The information processing device is
The invention according to claim 1 or 2, further comprising a transfer unit for transferring the updated module and the provisional transition instruction to the target system in which the target module is running in order to generate the patch application request. Information processing equipment.
前記パッチ適用の要求の検出時に、前記転送された更新後モジュールを前記メモリへロードする処理と、
前記更新後関数の先頭アドレスである前記メモリ上の絶対アドレスを取得する処理と、
前記取得した絶対アドレスを前記第1のアドレスとして前記アドレス保持領域に格納する処理と、を含む
請求項3に記載の情報処理装置。 The built-in loader is
When the patch application request is detected, the process of loading the transferred updated module into the memory and the process of loading the transferred module into the memory.
The process of acquiring the absolute address in the memory, which is the start address of the function after the update,
The information processing apparatus according to claim 3, further comprising a process of storing the acquired absolute address as the first address in the address holding area.
前記更新後関数と前記仮移行命令との対応付けを定義したパッチリストをさらに生成し、
前記転送部は、前記更新後モジュール及び前記仮移行命令と共に前記パッチリストを転送し、
前記組込みローダは、
前記パッチ適用の要求の検出時に、前記転送されたパッチリストに基づいて前記更新後モジュールの前記メモリへのロードを開始する
請求項3又は4に記載の情報処理装置。 The generator is
Further generate a patch list that defines the correspondence between the updated function and the provisional transition instruction.
The transfer unit transfers the patch list together with the updated module and the temporary migration instruction.
The built-in loader is
The information processing apparatus according to claim 3 or 4, wherein when the request for patch application is detected, the loaded of the updated module into the memory is started based on the transferred patch list.
前記生成されたロードモジュールのうち、前記更新対象関数を、前記更新後関数に置き換えてパッチ適用済みロードモジュールを生成し、
前記転送部は、前記対象システムの再起動時に前記ロードモジュールに代えて前記メモリへロードさせるために、前記対象システムに対して、前記パッチ適用済みロードモジュールを転送する
請求項3乃至5のいずれか1項に記載の情報処理装置。 The generator is
Of the generated load modules, the updated function is replaced with the updated function to generate a patched load module.
Any one of claims 3 to 5, wherein the transfer unit transfers the patched load module to the target system in order to load the load module into the memory instead of the load module when the target system is restarted. The information processing apparatus according to item 1.
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納された前記第1のアドレスに対して処理を移行させる本移行命令と、前記入力された対象モジュールと、を結合してロードモジュールを生成し、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記ロードモジュールを生成する際に、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に前記本移行命令を配置し、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
ロードモジュール生成方法。 Accepts the input of the target module, which is an executable program containing multiple functions to be executed on the target system.
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system. The address holding area for holding the first address corresponding to the updated function on the memory and the first address held in the address holding area are stored in the register of the target system, and the register is stored. The transfer instruction for migrating the process to the first address stored in the first address and the input target module are combined to generate a load module.
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
When the load module is generated, the transition instruction is placed at a position separated from the start address of the update target function in the target module corresponding to the post-update function by a second address.
The second address is
A method for generating a load module, which is a relative address indicating a migration destination of processing in a provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納された前記第1のアドレスに対して処理を移行させる本移行命令と、前記入力された対象モジュールと、を結合してロードモジュールを生成する処理と、
をコンピュータに実行させ、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記ロードモジュールを生成する処理は、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に前記本移行命令を配置し、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
ロードモジュール生成プログラム。 The process of accepting the input of the target module, which is an executable program containing multiple functions to be executed on the target system,
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system. The address holding area for holding the first address corresponding to the updated function on the memory and the first address held in the address holding area are stored in the register of the target system, and the register is stored. A process of combining the transfer command for migrating the process to the first address stored in the input and the input target module to generate a load module.
Let the computer run
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
In the process of generating the load module, the transition instruction is placed at a position separated from the start address of the update target function in the target module corresponding to the update function by a second address.
The second address is
A load module generation program that is a relative address indicating a migration destination of processing in a temporary migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、
前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、
前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる本移行命令と、
が結合され、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記本移行命令は、
前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置され、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
プログラム。 The target module, which is an executable program containing multiple functions to be executed on the target system,
An embedded loader that loads an updated module including an updated function that updates any of the plurality of functions into the memory of the target system when applying a patch to the target module running on the target system.
An address holding area for holding a first address corresponding to the updated function on the memory, and an address holding area.
This migration instruction that stores the first address held in the address holding area in a register of the target system and shifts processing to the address stored in the register, and
Are combined,
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
The transition order is
It is placed at a position separated from the start address of the update target function in the target module corresponding to the updated function by a second address.
The second address is
A program that is a relative address indicating the migration destination of processing in the provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
前記対象システムは、
複数の関数を含む実行形式のプログラムである対象モジュールと、前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる本移行命令と、が結合されたロードモジュールを前記メモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行し、
前記本移行命令は、
前記ロードモジュール内で、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されており、
前記情報処理装置は、
前記更新後モジュールの入力を受け付け、
前記第2のアドレスを移行先の相対アドレスとして処理を移行させる仮移行命令を生成し、
前記パッチ適用の要求を発生させるために、前記対象モジュールが実行中である前記対象システムに対して、前記更新後モジュール及び前記仮移行命令を転送し、
前記メモリにロードされた前記組込みローダは、
前記対象システムが前記更新後モジュール及び前記仮移行命令を受信後に、前記パッチ適用の要求を検出し、
前記受信した更新後モジュールが前記ロードされた際の前記更新後関数の前記メモリ上の先頭アドレスを前記第1のアドレスとして前記アドレス保持領域に格納し、
前記対象システムは、
前記仮移行命令を、前記メモリ上の前記更新対象関数の先頭アドレスに挿入する
動的プログラム更新システム。 Equipped with an information processing device and a target system,
The target system is
An update that includes an updated function that updates one of the plurality of functions when applying a patch to the target module, which is an executable program containing a plurality of functions, and the target module being executed in the target system. An embedded loader that loads the rear module into the memory of the target system, an address holding area for holding the first address corresponding to the updated function on the memory, and the first address held in the address holding area. The load module in which the address 1 is stored in the register of the target system and the transfer instruction for migrating the process to the address stored in the register is combined with the load module is loaded into the memory.
Execute the target module in the load module,
The transition order is
In the load module, it is arranged at a position separated from the start address of the update target function in the target module corresponding to the update function by a second address.
The information processing device is
After accepting the input of the updated module,
Generate a temporary migration instruction to migrate the process using the second address as the relative address of the migration destination.
In order to generate the patch application request, the updated module and the provisional migration instruction are transferred to the target system in which the target module is running.
The built-in loader loaded in the memory
After the target system receives the updated module and the provisional migration instruction, the patch application request is detected.
The start address on the memory of the updated function when the received updated module is loaded is stored in the address holding area as the first address.
The target system is
A dynamic program update system that inserts the temporary migration instruction into the start address of the function to be updated on the memory.
前記対象モジュールの入力を受け付け、
前記入力された対象モジュールと、前記組込みローダと、前記アドレス保持領域と、前記本移行命令と、を結合して前記ロードモジュールを生成し、
前記ロードモジュールを前記対象システムに対して転送し、
前記対象システムは、
前記情報処理装置から受信したロードモジュールを前記メモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行する
請求項10に記載の動的プログラム更新システム。 The information processing device is
Accepts the input of the target module
The input target module, the built-in loader, the address holding area, and the transition instruction are combined to generate the load module.
The load module is transferred to the target system, and the load module is transferred to the target system.
The target system is
The load module received from the information processing device is loaded into the memory, and the load module is loaded into the memory.
The dynamic program update system according to claim 10, which executes the target module in the load module.
前記対象システムのプロセッサのアドレッシングサイズの上限以内である
請求項10又は11に記載の動的プログラム更新システム。 The size of the second address is
The dynamic program update system according to claim 10 or 11, wherein the addressing size of the processor of the target system is within the upper limit.
前記パッチ適用の要求の検出時に、前記受信した更新後モジュールを前記メモリへロードし、
前記更新後関数の先頭アドレスである前記メモリ上の絶対アドレスを取得し、
前記取得した絶対アドレスを前記第1のアドレスとして前記アドレス保持領域に格納する
請求項10乃至12のいずれか1項に記載の動的プログラム更新システム。 The built-in loader is
Upon detecting the patch application request, the received updated module is loaded into the memory.
The absolute address in the memory which is the start address of the function after the update is acquired, and the absolute address is acquired.
The dynamic program update system according to any one of claims 10 to 12, wherein the acquired absolute address is stored in the address holding area as the first address.
前記更新後関数と前記仮移行命令との対応付けを定義したパッチリストをさらに生成し、
前記更新後モジュール及び前記仮移行命令と共に前記パッチリストを転送し、
前記組込みローダは、
前記パッチ適用の要求の検出時に、前記転送されたパッチリストに基づいて前記更新後モジュールの前記メモリへのロードを開始する
請求項10乃至13のいずれか1項に記載の動的プログラム更新システム。 The information processing device is
Further generate a patch list that defines the correspondence between the updated function and the provisional transition instruction.
The patch list is transferred together with the updated module and the temporary migration instruction.
The built-in loader is
The dynamic program update system according to any one of claims 10 to 13, which starts loading the updated module into the memory based on the transferred patch list when the patch application request is detected.
前記ロードモジュールのうち、前記更新対象関数を、前記更新後関数に置き換えてパッチ適用済みロードモジュールを生成し、
前記更新後モジュール及び前記仮移行命令と共に、前記パッチ適用済みロードモジュールを転送し、
前記対象システムは、
前記情報処理装置から受信した前記パッチ適用済みロードモジュールを記憶装置に格納し、
再起動時に、前記ロードモジュールに代えて前記パッチ適用済みロードモジュールを前記記憶装置から前記メモリへロードし、
前記パッチ適用済みロードモジュール内の前記更新後関数を含む対象モジュールを実行する、
請求項10乃至14のいずれか1項に記載の動的プログラム更新システム。 The information processing device is
Of the load modules, the update target function is replaced with the post-update function to generate a patched load module.
The patched load module is transferred together with the updated module and the temporary migration instruction.
The target system is
The patched load module received from the information processing device is stored in the storage device, and the patched load module is stored in the storage device.
At restart, the patched load module is loaded from the storage device into the memory in place of the load module.
Execute the target module including the updated function in the patched load module.
The dynamic program update system according to any one of claims 10 to 14.
複数の関数を含む実行形式のプログラムである対象モジュールと、前記対象システムで実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを当該対象システムのメモリにロードする組込みローダと、前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するためのアドレス保持領域と、前記アドレス保持領域に保持された前記第1のアドレスを前記対象システムのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる本移行命令と、が結合されたロードモジュールを前記メモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行し、
前記本移行命令は、
前記ロードモジュール内で、前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されており、
情報処理装置において、
前記更新後モジュールの入力を受け付け、
前記第2のアドレスを移行先の相対アドレスとして処理を移行させる仮移行命令を生成し、
前記パッチ適用の要求を発生させるために、前記対象モジュールが実行中である前記対象システムに対して、前記更新後モジュール及び前記仮移行命令を転送し、
前記メモリにロードされた前記組込みローダにおいて、
前記対象システムが前記更新後モジュール及び前記仮移行命令を受信後に、前記パッチ適用の要求を検出し、
前記受信した更新後モジュールが前記ロードされた際の前記更新後関数の前記メモリ上の先頭アドレスを前記第1のアドレスとして前記アドレス保持領域に格納し、
前記対象システムにおいて、
前記仮移行命令を、前記メモリ上の前記更新対象関数の先頭アドレスに挿入する
動的プログラム更新方法。 In the target system
An update that includes an updated function that updates one of the plurality of functions when applying a patch to the target module, which is an executable program containing a plurality of functions, and the target module being executed in the target system. An embedded loader that loads the rear module into the memory of the target system, an address holding area for holding the first address corresponding to the updated function on the memory, and the first address held in the address holding area. The load module in which the address 1 is stored in the register of the target system and the transfer instruction for migrating the process to the address stored in the register is combined with the load module is loaded into the memory.
Execute the target module in the load module,
The transition order is
In the load module, it is arranged at a position separated from the start address of the update target function in the target module corresponding to the update function by a second address.
In information processing equipment
After accepting the input of the updated module,
Generate a temporary migration instruction to migrate the process using the second address as the relative address of the migration destination.
In order to generate the patch application request, the updated module and the provisional migration instruction are transferred to the target system in which the target module is running.
In the built-in loader loaded in the memory
After the target system receives the updated module and the provisional migration instruction, the patch application request is detected.
The start address on the memory of the updated function when the received updated module is loaded is stored in the address holding area as the first address.
In the target system
A dynamic program update method for inserting the provisional transition instruction into the start address of the update target function on the memory.
前記メモリに記憶された前記対象モジュールを実行するプロセッサと、
を備え、
前記組込みローダは、
前記プロセッサが実行中の前記対象モジュールに対してパッチ適用を行う際に前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールを前記メモリにロードし、
前記アドレス保持領域は、
前記メモリ上における前記更新後関数に対応する第1のアドレスを保持するための領域であり、
前記本移行命令は、
前記アドレス保持領域に保持された前記第1のアドレスを前記プロセッサのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる命令であり、
前記組込みローダは、
前記ロードされた前記更新後モジュール内の前記更新後関数の前記メモリ上の先頭アドレスを、前記アドレス保持領域に格納する処理を含み、
前記本移行命令は、
前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置され、
前記第2のアドレスは、
前記パッチ適用時に前記メモリ上の前記更新対象関数の先頭アドレスに挿入される仮移行命令における処理の移行先を示す相対アドレスである
情報処理装置。 A memory that stores a load module in which a target module, which is an executable program containing multiple functions, an embedded loader, an address holding area, and this migration instruction are combined,
A processor that executes the target module stored in the memory, and
Equipped with
The built-in loader is
When the processor applies a patch to the target module being executed, the updated module including the updated function that updates any of the plurality of functions is loaded into the memory.
The address holding area is
It is an area for holding the first address corresponding to the updated function on the memory.
The transition order is
It is an instruction to store the first address held in the address holding area in the register of the processor and shift the processing to the address stored in the register.
The built-in loader is
The processing including storing the start address in the memory of the post-update function in the loaded post-update module in the address holding area is included.
The transition order is
It is placed at a position separated from the start address of the update target function in the target module corresponding to the updated function by a second address.
The second address is
An information processing device that is a relative address indicating a migration destination of processing in a provisional migration instruction inserted at the start address of the update target function on the memory when the patch is applied.
複数の関数を含む実行形式のプログラムである対象モジュールと、組込みローダと、アドレス保持領域と、本移行命令と、が結合されたロードモジュールを前記情報処理装置のメモリにロードし、
前記ロードモジュール内の前記対象モジュールを実行し、
前記メモリにロードされた前記組込みローダが、
前記複数の関数のいずれかを更新した更新後関数を含む更新後モジュールと仮移行命令とを受信後に、前記対象モジュールに対する当該更新後モジュールのパッチ適用の要求を検出し、
前記受信した更新後モジュールを前記メモリにロードし、
前記更新後関数の前記メモリ上の先頭アドレスを第1のアドレスとして前記アドレス保持領域に格納し、
前記プロセッサが、
前記仮移行命令を、前記メモリ上の前記更新後関数に対応する前記対象モジュール内の更新対象関数の先頭アドレスに挿入し、
前記本移行命令は、
前記アドレス保持領域に保持された前記第1のアドレスを前記プロセッサのレジスタに格納し、当該レジスタに格納されたアドレスに対して処理を移行させる命令であり、
前記ロードモジュール内で、前記更新対象関数の先頭アドレスから第2のアドレス分離れた位置に配置されており、
前記仮移行命令は、
前記第2のアドレスを移行先の相対アドレスとして処理を移行させる命令である
動的プログラム更新方法。 The processor of the information processing device
A load module in which a target module, which is an execution-type program including a plurality of functions, an embedded loader, an address holding area, and this migration instruction are combined, is loaded into the memory of the information processing apparatus.
Execute the target module in the load module,
The built-in loader loaded in the memory
After receiving the updated module including the updated function that updated any of the plurality of functions and the temporary migration instruction, the request for patch application of the updated module to the target module is detected.
The received updated module is loaded into the memory, and the module is loaded into the memory.
The start address in the memory of the updated function is stored in the address holding area as the first address.
The processor
The provisional transition instruction is inserted into the start address of the update target function in the target module corresponding to the updated function on the memory.
The transition order is
It is an instruction to store the first address held in the address holding area in the register of the processor and shift the processing to the address stored in the register.
In the load module, it is located at a position separated from the start address of the function to be updated by a second address.
The provisional transition instruction is
A dynamic program update method that is an instruction for migrating processing by using the second address as a relative address of a migration destination.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018117827A JP7081805B2 (en) | 2018-06-21 | 2018-06-21 | Information processing equipment, load module generation methods and programs, and dynamic program update systems and methods |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018117827A JP7081805B2 (en) | 2018-06-21 | 2018-06-21 | Information processing equipment, load module generation methods and programs, and dynamic program update systems and methods |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019219995A JP2019219995A (en) | 2019-12-26 |
JP7081805B2 true JP7081805B2 (en) | 2022-06-07 |
Family
ID=69097026
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018117827A Active JP7081805B2 (en) | 2018-06-21 | 2018-06-21 | Information processing equipment, load module generation methods and programs, and dynamic program update systems and methods |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7081805B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001100984A (en) | 1999-09-27 | 2001-04-13 | Nec Microcomputer Technology Ltd | Program link method of flash incorporated microcomputer |
US20120159463A1 (en) | 2010-12-20 | 2012-06-21 | Oracle International Corporation | Method and system for creating, applying, and removing a software fix |
JP5341968B2 (en) | 2005-03-04 | 2013-11-13 | アーム・ノルウェー・アー・エス | Method and apparatus for encoding data |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05341968A (en) * | 1992-06-05 | 1993-12-24 | Nec Corp | Library updating system |
JPH10247143A (en) * | 1997-03-05 | 1998-09-14 | Nippon Telegr & Teleph Corp <Ntt> | Program updating method |
CN102156661B (en) * | 2010-02-11 | 2013-06-12 | 华为技术有限公司 | Method, device and system for online activating patches |
-
2018
- 2018-06-21 JP JP2018117827A patent/JP7081805B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001100984A (en) | 1999-09-27 | 2001-04-13 | Nec Microcomputer Technology Ltd | Program link method of flash incorporated microcomputer |
JP5341968B2 (en) | 2005-03-04 | 2013-11-13 | アーム・ノルウェー・アー・エス | Method and apparatus for encoding data |
US20120159463A1 (en) | 2010-12-20 | 2012-06-21 | Oracle International Corporation | Method and system for creating, applying, and removing a software fix |
Also Published As
Publication number | Publication date |
---|---|
JP2019219995A (en) | 2019-12-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10635432B2 (en) | Systems and methods for incremental software deployment | |
JP7090657B2 (en) | Methods, devices, devices and storage media for upgrading applications | |
US10019256B2 (en) | Systems and methods for incremental software development | |
EP3488337B1 (en) | Shared software libraries for computing devices | |
US7971201B2 (en) | Multiple operating device version software generating system and multiple operating device version software generation support program and method | |
CN105446712B (en) | Application program defect repairing method and device | |
KR101213275B1 (en) | System and method for providing monolithic image for use in a wireless device | |
US20180217851A1 (en) | Inline dispatching function interface (idfi), and associated system and/or method | |
KR100871778B1 (en) | Dynamic addressing da using a centralized da manager | |
CN102722387B (en) | Dynamic patching method and device | |
US9690567B2 (en) | Runtime detection of software configurations and upgrades | |
US20110126179A1 (en) | Method and System for Dynamic Patching Software Using Source Code | |
US7844734B2 (en) | Dynamic addressing (DA) using a centralized DA manager | |
CN103645888A (en) | System and method for automatically building operation system | |
US20050039196A1 (en) | Method and system for using a library | |
JP7081805B2 (en) | Information processing equipment, load module generation methods and programs, and dynamic program update systems and methods | |
JP5279981B2 (en) | Update control program, update control method, and update control apparatus | |
CN110806891A (en) | Method and device for generating software version of embedded equipment | |
CN113641389B (en) | Software upgrading method, device and equipment based on OpenCPU | |
CN113342323A (en) | Method and device for software online development | |
JP2016099899A (en) | Control system, support device of the same, and programmable control device | |
WO2005074621A2 (en) | Dynamic addressing (da) using a centralized da manager | |
CN112130858A (en) | Code compiling method and compiling server | |
JP6295914B2 (en) | Programmable controller system, its support device, programmable controller | |
JP2012247908A (en) | Memory arrangement management device, memory arrangement management method, memory arrangement management program, and program generation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210512 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220408 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20220426 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220519 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7081805 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |