JP2004157751A - System, program, and method for protecting data - Google Patents

System, program, and method for protecting data Download PDF

Info

Publication number
JP2004157751A
JP2004157751A JP2002322604A JP2002322604A JP2004157751A JP 2004157751 A JP2004157751 A JP 2004157751A JP 2002322604 A JP2002322604 A JP 2002322604A JP 2002322604 A JP2002322604 A JP 2002322604A JP 2004157751 A JP2004157751 A JP 2004157751A
Authority
JP
Japan
Prior art keywords
page
task
protection
data
procedure
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.)
Granted
Application number
JP2002322604A
Other languages
Japanese (ja)
Other versions
JP4423849B2 (en
Inventor
Yoshimi Fukagawa
好美 深川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2002322604A priority Critical patent/JP4423849B2/en
Publication of JP2004157751A publication Critical patent/JP2004157751A/en
Application granted granted Critical
Publication of JP4423849B2 publication Critical patent/JP4423849B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a system, a program, and a method for protecting a writable area held by each program in a system using an operating system such as a real time operating system loading all programs and data on a main storage memory and sharing a memory space between all the programs. <P>SOLUTION: An initial setting means 5 sets page information held by each task in a data protection table 2 by a task unit to form a page table 3 on the basis of this information, sets each page attribute in protection, and checks whether protected page information matching the task in operation in the data protection table 2 includes an excluded page or not when a page protection exclusion means 6 is called. If the excluded page is included, the page attribute is allowed, and a task ID is registered in a data permission table 4. If the excluded page is not included, the task in operation is suspended, and when a task switching means 12 switches the task, the protected page information is acquired from the data protection table 2 by using a registered task ID, and the attribute of the matching page is returned to a protected condition. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、リアルタイムオペレーティングシステムの様に、主記憶上に全プログラムとデータをロードしておきメモリ空間を全てのプログラムで共有しているオペレーティングシステムを利用する際にプログラムのデータを保護するシステム、プログラムのデータを保護するプログラム、保護方法に関し、特にこの様なオペレーティングシステムを利用する際に、プログラムの不具合等で他のプログラムやタスクのデータが書き換えられることを防止するデータ保護システム、データ保護プログラム及びデータ保護方法に関する。
【0002】
【従来の技術】
従来、仮想記憶を備えたオペレーティングシステムではプロセス毎にアドレス空間を持ち、プロセスの切替毎にページテーブルを更新する。これにより、カレントプロセスから別のプロセスのデータを書き換えることは起きない。
【0003】
しかし、リアルタイムシステムで利用するリアルタイムオペレーティングシステムは高速な処理が必要なため、主記憶メモリ上に全プログラムとデータをロードしておきメモリ空間を全てのプログラムで共有している。
【0004】
また、プログラムとデータのアドレスは物理アドレスと一致している。
【0005】
よって、プログラムの不具合による不適当なアドレスへのアクセスを検出できない。
【0006】
一方これに類似した問題を改善する技術としてメモリ保護装置がある(例えば、特許文献1参照)。
【0007】
このメモリ保護装置は、各メモリブロックに対応して保護情報を格納する複数個のメモリ保護情報記憶手段と、あるメモリブロックに関する属性情報を記憶するカレントキー情報記憶手段とを備え、あるメモリブロックをアクセスする前に予め、該メモリブロックに対応するメモリ保護情報記憶手段に保護キーを設定し、該メモリブロックに関する属性キーをカレントキー情報記憶手段に設定しておき、メモリブロックへのアクセスがある度に該メモリアクセスと並行して、メモリ保護記憶手段内の該メモリアドレスに対応するメモリブロックの保護キーとカレントキー情報記憶手段内の属性キーとを比較し、予め定められた条件を満足すれば該メモリアクセスを許容し、満足しなければ該メモリアクセスを禁止してアクセス違反が生じたことを外部に通知するメモリ保護装置である。
【0008】
ここで保護キーレジスタのメモリブロック上位アドレスが一致し、かつカレントキーレジスタと保護キーレジスタのプロセスIDが一致すればアクセスを許可する。
【0009】
又、メモリ保護テーブルをメモリブロックを格納する一般のメモリから分離して、メモリ保護テーブルとメモリブロックとが同時アクセス出来るようにすることによって処理能力を低下させることなくメモリ保護チェックを行うものである。
【0010】
【特許文献1】
特開平5−134930号公報(段落[0008]、[0014]、[0054]〜[0056])
【0011】
【発明が解決しようとする課題】
従って、上記メモリ保護装置では、メモリ保護テーブルの各エントリがプロセスIDを保持しており、1ビットの保護ビットを設ける場合よりメモリサイズが大きくなり、又一般メモリとは分離した別のメモリ等であり、その分金物量が増えると言う問題がある。
【0012】
少なくとも、携帯端末等の小型装置におけるデータの保護システムには向かない。
【0013】
また、メモリ保護テーブルへのプロセスID等の設定は、あるメモリブロックをアクセスする前に予め設定するが、初期設定で全エントリの設定を纏めて行う手段はなく、初期に全てのプログラムを主記憶にロードし、データ域を確保して以降そのメモリマップで動作するシステムには向かない。
【0014】
本発明の目的は、リアルタイムオペレーティングシステムの様に、主記憶メモリ上に全プログラムとデータをロードしておきメモリ空間を全てのプログラムで共有しているオペレーティングシステムを利用したシステムで、個々のプログラムの所有する(書き換えできる)領域を保護するシステム、保護するためのプログラム及び方法を提供するものである。
【0015】
特に、主記憶アクセスに関する処理時間増加を少なくでき、オペレーティングシステム配下のプログラムを変更することなく、又、小型の端末や情報処理装置にも適用できるデータ保護システム、保護プログラム及び方法を提供するものである。
【0016】
【課題を解決するための手段】
本発明の第1のデータ保護システムは、一つのメモリ空間をプログラムで共有するオペレーティングシステム利用のシステムにおいて、システムの初期設定で、個々のタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手段と、主記憶アクセス時そのアドレスに対応するエントリが参照されるページテーブルを前記データ保護テーブルの情報を元に作成し、これの各ページの属性を保護状態に設定する手段を有することを特徴とする。
【0017】
本発明の第2のデータ保護システムは、前記第1のデータ保護システムに於いて、前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルを作成し、各ページの属性を保護状態に設定する初期設定手段と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手段と、タスク切替手段を備え、前記ページ保護例外処理手段は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手段と、チェックの結果前記ページを含めばページテーブルの該当ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブル4に登録されてなければそれを登録する手段と、前記チェックの結果、前記ページを含まなければ実行していたタスクを休止状態にする手段を有し、前記タスク切替手段は、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応するタスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手段を有することを特徴とする。
【0018】
本発明の第3のデータ保護システムは、前記第1のデータ保護システムに於いて、前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルを作成し、各ページの属性を保護状態に設定する初期設定手段と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手段と、タスク切替手段を備え、前記ページ保護例外処理手段は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手段と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手段と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手段を有し、前記タスク切替手段は、タスクを切り替える際に、データ許可テーブルにページ識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別情報を消去する手段を有することを特徴とする。
【0019】
本発明の第4のデータ保護システムは、一つのメモリ空間をプログラムで共有するオペレーティングシステム利用のシステムにおいて、ページテーブルを作成する手段と、システムの初期設定で、個々のタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手段と、ページテーブルの、前記データ保護テーブルが示す保護ページについて属性を保護状態に設定する手段を有することを特徴とする。
【0020】
本発明の第5のデータ保護システムは、前記第4のデータ保護システムに於いて、前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルの属性を保護状態に設定する初期設定手段と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手段とタスク切替手段を備え、前記ページ保護例外処理手段は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手段と、チェックの結果前記ページを含めばページテーブルの該当ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手段と、前記チェックの結果、前記ページを含まなければ実行していたタスクを休止状態にする手段を有し、前記タスク切替手段は、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応するタスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手段を有することを特徴とする。
【0021】
本発明の第6のデータ保護システムは、前記第4のデータ保護システムに於いて、前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルの属性を保護状態に設定する初期設定手段と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手段とタスク切替手段を備え、ページ保護例外処理手段は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手段と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手段と、前記チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手段を有し、前記タスク切替手段は、タスクを切り替える際に、データ許可テーブルにページ識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手段を有することを特徴とする。
【0022】
本発明の第1のデータ保護プログラムは、システムの初期設定で、個々のタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、主記憶アクセス時そのアドレスに対応するエントリが参照されるページテーブルを前記データ保護テーブルの情報を元に作成し、これの各ページの属性を保護状態に設定する手順を有することを特徴とする。
【0023】
本発明の第2のデータ保護プログラムは、前記第1のデータ保護プログラムに於いて、前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルを作成し、各ページの属性を保護状態に設定する初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応タスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手順を有することを特徴とする。
【0024】
本発明の第3のデータ保護プログラムは、前記第1のデータ保護プログラムに於いて、前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルを作成し、各ページの属性を保護状態に設定する初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順とタスクの切替を行うタスク切替手順を備え、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにページの識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手順を有することを特徴とする。
【0025】
本発明の第4のデータ保護プログラムは、ページテーブルを作成する手順と、システムの初期設定で、個々のタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、ページテーブルの、前記データ保護テーブルが示す保護ページについて属性を保護状態に設定する手順を有することを特徴とする。
【0026】
本発明の第5のデータ保護プログラムは、前記第4のデータ保護プログラムに於いて、前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルの属性を保護状態に設定する初期設定手順と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手順と、前記チェックの結果、前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応するタスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手順を有することを特徴とする。
【0027】
本発明の第6のデータ保護プログラムは、前記第4のデータ保護プログラムに於いて、前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルの属性を保護状態に設定する初期設定手順と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの該当ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手順と、前記チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにページ識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手順を有することを特徴とする。
【0028】
本発明の第1のデータ保護方法は、システムの初期設定をする初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記初期設定手順はタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、主記憶アクセス時そのアドレスに対応するエントリが参照されるページテーブルを前記データ保護テーブルの情報を元に作成し、これの各ページの属性を保護状態に設定する手順を有し、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応タスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手順を有することを特徴とする。
【0029】
本発明の第2のデータ保護方法は、システムの初期設定をする初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記初期設定手順はタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、主記憶アクセス時そのアドレスに対応するエントリが参照されるページテーブルを前記データ保護テーブルの情報を元に作成し、これの各ページの属性を保護状態に設定する手順を有し、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにページの識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手順を有することを特徴とする。
【0030】
本発明の第3のデータ保護方法は、システムの初期設定をする初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記初期設定手順はタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、このデータ保護テーブルの情報に従って、ページテーブルの対応ページの属性を保護状態に設定する手順を有し、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応タスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手順を有することを特徴とする。
【0031】
本発明の第4のデータ保護方法は、システムの初期設定をする初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記初期設定手順はタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、このデータ保護テーブルの情報に従って、ページテーブルの対応ページの属性を保護状態に設定する手順を有し、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにページの識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手順を有することを特徴とする。
【0032】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照して詳細に説明する。先ず本発明の第1実施例を説明する。
【0033】
図1は本発明のデータ保護システムの構成を示したブロック図であり、データ保護システムは、リアルタイムオペレーティングシステム1、データ保護テーブル2、ページテーブル3、データ許可テーブル4、初期設定手段5、ページ保護例外処理手段6により構成される。
【0034】
初期設定手段5は予め決めた保護するデータのページアドレスとページ数(長さ)とそのデータを所有する(書き換える)タスクIDとをタスクID単位でデータ保護テーブル2に設定する。
【0035】
次に初期設定手段5はデータ保護テーブル2の情報をもとにMMU(メモリマネージメントユニット)の仕様に合わせてページテーブル3を作成する。
【0036】
リアルタイムオペレーティングシステム1も含めてプログラムが行う主記憶アクセス要求で、アクセスアドレスに対応したページテーブル3のエントリが参照される。
【0037】
リアルタイムオペレーティングシステム1はタスク管理手段11とタスク切替手段12を持ち、タスク切替手段12はページ情報切替手段121を有する。
【0038】
タスク管理手段11は実行中のタスク情報とプライオリティに合わせて次に実行するタスクを決める。
【0039】
タスク切替手段12はタスク切替が発生した場合、ページ情報切替手段121により実行していたタスクが保護されているデータにアクセスしていたか判断するためデータ許可テーブル4参照する。
【0040】
ページ情報切替手段121はデータ許可テーブル4にタスクのIDが登録されていれば、そのタスクが所有する保護ページがそのタスク実行期間に許可状態にされたと見なす。
【0041】
そしてデータ保護テーブル2の実行していたタスクの保護するページ情報を参照し、それに従ってページテーブル3の該当エントリの属性を保護状態にし(保護状態に戻し)、データ許可テーブル4の情報を消去し、タスク切替手段12はタスク管理手段11より次に実行するタスクを取得し、そのタスクに切替える。
【0042】
データ許可テーブル4にタスクIDが登録されてない場合は、実行していたタスクが保護ページにアクセスしていないと見なし、タスク管理手段11より次に実行するタスクを取得し、そのタスクに切替える。
【0043】
ページ保護例外が発生した場合、即ち、プログラムが行う主記憶アクセス要求で、アクセスアドレスに対応したページテーブル3のエントリが参照されその属性が保護状態で、要求が書き込みであればページ保護例外となりページ保護例外処理手段6が呼び出される。
【0044】
ページ保護例外処理手段6はタスク管理手段11より例外処理前に実行していたタスクIDを取得し、それをキーとしデータ保護テーブル2にアクセスし取得した保護ページ情報が、ページ保護例外が発生したページを含むか判断する。
【0045】
一致している場合ページテーブル3のページ保護例外が発生したページアドレスの属性を許可状態とし、データ許可テーブル4に実行中のタスクが自分の保護ページを許可状態にしたことを示す情報(実行中のタスクID)を書きタスクの実行を継続する。この際データ許可テーブル4に実行中のタスクIDが既に登録されていれば追記しない。一致しない場合はエラー情報を書き、タスクを休止状態にする。
【0046】
上記初期設定手段5、ページ保護例外処理手段6、リアルタイムオペレーティングシステム1の各手段は、システムを実現する端末(携帯端末、情報処理機能を持つ携帯電話も含む)や情報処理装置におけるプログラム手順により実現される。
【0047】
尚、リアルタイムオペレーティングシステム1を利用するシステムで、主記憶には実アドレスモードでしかアクセスしない場合は、ページテーブル3の各エントリの論理アドレス情報は設ける必要はない。
【0048】
次に、本実施例の動作について図面を参照して説明する。図2はデータ保護システムの動作やデータ保護プログラム、データ保護方法の手順を示すフローチャートである。
【0049】
図2を参照し、先ず初期設定処理を行い最初のタスクをタスク#1としこれが所有する保護されたデータにアクセスし、タスク#1が実行されタスク#2に切り替わり不具合でタスク#1等の他の保護ページの書き込み要求した場合について説明する。
【0050】
初期設定手段5は保護するページのページアドレスとページ数をタスク単位でデータ保護テーブル2に登録する(ステップ1)。データ保護テーブル2の情報を元に、MMUの仕様に合わせページテーブル3を作成し各エントリの属性を保護に設定する(ステップ2)。
【0051】
タスク管理手段11がプライオリティに従って次に実行するタスクを決める(タスク#1への切替発生)(ステップ3)。タスク切替手段12はデータ許可テーブル4に登録情報が有るかチェックし、最初につき登録されてないので(ステップ4)、直ぐに次のタスク(タスク#1)に切替えこれが実行される。
【0052】
タスク#1の主記憶アクセス(書き込み)でページ保護例外が発生する(ステップ7)。
【0053】
ページ保護例外処理手段6が実行していたタスクID(#1)をタスク管理手段11より取得し、データ保護テーブル2のID#1の保護ページ情報を取得する(ステップ8)。
【0054】
保護ページ情報が、例外が発生したページを含むか判定し、含まれるので(ステップ9)、例外が発生したページの属性を許可状態にし、データ許可テーブル4に実行中のタスクID(#1)が登録されてないのでこれを登録する(ステップ10)。
【0055】
タスク#1の実行が終了すると(ステップ11)、システムの終了条件かを判定し、終了条件はないので(ステップ13)、次のタスク(#2)への切替が発生する(ステップ3)。
【0056】
タスク切替手段12はデータ許可テーブル4に登録情報が有るかチェックし、ID#1が登録されているので、これをキーとしデータ保護テーブル2よりタスクID#1の保護ページ情報(ページアドレス)を取得し、ページテーブル3のページアドレス001(エントリ#1)の属性情報を保護状態に戻し、データ許可テーブル4の情報を消去する(ステップ5)。
【0057】
タスク切替手段12は次のタスク(#2)に切替えこれが実行され(ステップ6)、タスク#2が不具合でタスク#1の保護ページへの書き込みを要求しページ保護例外が発生する(ステップ7)。
【0058】
ページ保護例外処理手段6は実行していたタスクID(#2)を取得し、データ保護テーブル2のID#2の保護ページ情報を取得する(ステップ8)。
【0059】
そして、これには、例外が発生したページが含まれないと判定し(ステップ9)他タスクの保護ページへの書込要求が行われたとし、エラー情報を書き実行中タスクを休止状態にする(ステップ12)。
【0060】
尚、エラー情報はシリアルで外部に出してもメモリに保存してもディスプレイに表示してもよい。メモリ保護ハードウェアはMMU以外でもよい。
【0061】
次に本発明の第2実施例を説明する。本実施例ではプログラム等が主記憶にロードされる際にプログラムやデータ用の主記憶領域がMMU或いは初期設定手段5により割り付けられ、この情報に従ってページテーブル3が作成される。
【0062】
初期設定手段5は保護するデータのページアドレスとページ数(長さ)とそのデータを所有する(書き換える)タスクIDとをタスクID単位でデータ保護テーブル2に設定する。
【0063】
次に初期設定手段5はページテーブル3のエントリの内、データ保護テーブル2の保護ページ情報が指定するページの属性情報を保護状態に設定する。他の機能や処理は前記第1の実施例と同様である。
【0064】
次に本発明の第3実施例を説明する。本実施例ではページ保護例外処理手段6が、ページテーブル3の例外となったページの属性を許可状態に設定した際に、データ許可テーブル4には、実行中のタスクIDでなく、ページ識別(ページアドレス或いはページテーブルエントリ番号)を登録する(図3参照)。
【0065】
一つのタスクが複数の自分の保護ページに順次アクセスし、其の都度ページ保護例外処理手段6による許可状態設定が行われる場合は、データ許可テーブル4には、ページ識別が順次追記される。
【0066】
又、タスク切替手段12がタスクを切り替える際にデータ許可テーブル4の登録情報有無をチェックし、あればそれが示すページの属性を保護状態に設定し、データ許可テーブル4のページ識別情報を消去する。
【0067】
データ許可テーブル4に複数のページ識別情報が登録されていれば、上記動作を繰り返し行う。
【0068】
他の手段の機能ないし処理手順は第1の実施例、或いは第2の実施例と同様である。
【0069】
【発明の効果】
本発明によれば、ページ保護例外が発生したとき以外はページ情報の書換が発生しない。このためページテーブル書換時間、ページテーブルキャッシュのミスヒットによる処理時間が少なく出来る。
【0070】
特にタスク切替で次のタスクが所有する多数の保護ページについて無条件で属性を許可に変更するのでなく実際に書き換え要求が発生したページを処理するので、複数のタスクを時分割でリアルタイム処理しタスクの1回当たり処理量が限られる小型の携帯端末や携帯電話においても、データ保護に係わる余分な処理を行わず処理時間を少なくでき、複数タスクの同時処理性も維持出来る。
【0071】
また、システムの初期設定手段が個々のプログラムエリアやそれの所有する保護ページをデータ保護テーブルに設定し、その保護ページ情報をページテーブルに展開し、各ページ属性を保護状態とし、書込アクセスの内自分のページのみ一時許可するので、現状使用しているプログラムを修正することなくデータの保護機能を追加することが出来る。
【図面の簡単な説明】
【図1】本発明のデータ保護システムの構成を示したブロック図。
【図2】本発明のデータ保護システムの動作やデータ保護プログラム、データ保護方法の手順を示すフローチャート。
【図3】本発明の第3の実施例のデータ許可テーブル4の内容を示すブロック図。
【符号の説明】
1 リアルタイムオペレーティングシステム
11 タスク管理手段
12 タスク切替手段
121 ページ情報切替手段
2 データ保護テーブル
3 ページテーブル
4 データ許可テーブル
5 初期設定手段
6 ページ保護例外処理手段
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention provides a system that protects program data when using an operating system in which all programs and data are loaded on a main memory and a memory space is shared by all programs, such as a real-time operating system. The present invention relates to a program and a protection method for protecting data of a program, and particularly to a data protection system and a data protection program for preventing data of another program or a task from being rewritten due to a defect of the program when using such an operating system. And data protection methods.
[0002]
[Prior art]
Conventionally, an operating system having virtual storage has an address space for each process and updates the page table every time the process is switched. Thus, rewriting of data of another process from the current process does not occur.
[0003]
However, the real-time operating system used in the real-time system requires high-speed processing, so that all programs and data are loaded on the main memory and the memory space is shared by all the programs.
[0004]
The program and data addresses match the physical addresses.
[0005]
Therefore, access to an inappropriate address due to a program failure cannot be detected.
[0006]
On the other hand, there is a memory protection device as a technique for improving a similar problem (for example, see Patent Document 1).
[0007]
This memory protection device includes a plurality of memory protection information storage means for storing protection information corresponding to each memory block, and a current key information storage means for storing attribute information on a certain memory block. Before accessing, a protection key is set in advance in the memory protection information storage means corresponding to the memory block, and an attribute key relating to the memory block is set in the current key information storage means. In parallel with the memory access, the protection key of the memory block corresponding to the memory address in the memory protection storage means is compared with the attribute key in the current key information storage means, and if a predetermined condition is satisfied. If the memory access is permitted and if not satisfied, the memory access is prohibited and an access violation occurs. A memory protection unit for notifying to the outside.
[0008]
Here, if the memory block upper address of the protection key register matches and the process ID of the current key register matches the process ID of the protection key register, access is permitted.
[0009]
Further, the memory protection table is separated from a general memory for storing the memory block, and the memory protection table and the memory block can be accessed simultaneously, thereby performing the memory protection check without lowering the processing capability. .
[0010]
[Patent Document 1]
JP-A-5-134930 (paragraphs [0008], [0014], [0054] to [0056])
[0011]
[Problems to be solved by the invention]
Therefore, in the above memory protection device, each entry of the memory protection table holds the process ID, and the memory size is larger than when one protection bit is provided, and another memory separated from the general memory is used. Yes, there is a problem that the amount of money increases.
[0012]
At least, it is not suitable for a data protection system in a small device such as a portable terminal.
[0013]
The setting of the process ID and the like in the memory protection table is set in advance before accessing a certain memory block. However, there is no means for collectively setting all entries in the initial setting, and all programs are initially stored in the main memory. Is not suitable for a system that operates on the memory map after the data area is secured.
[0014]
An object of the present invention is a system using an operating system in which all programs and data are loaded on a main storage memory and a memory space is shared by all programs, such as a real-time operating system. An object of the present invention is to provide a system for protecting an owned (rewritable) area, a program and a method for protecting the area.
[0015]
In particular, the present invention provides a data protection system, a protection program, and a method that can reduce an increase in processing time related to main memory access, do not change programs under the operating system, and can be applied to small terminals and information processing apparatuses. is there.
[0016]
[Means for Solving the Problems]
A first data protection system according to the present invention is a system using an operating system in which one memory space is shared by a program. In an initial setting of the system, page information on a main memory owned by each task is stored in units of a task. Means for setting a protection table, and means for creating a page table to which an entry corresponding to the address is referred at the time of main memory access based on the information of the data protection table, and setting the attribute of each page to the protection state It is characterized by having.
[0017]
In a second data protection system according to the present invention, in the first data protection system, the data protection table is set, the page table is created based on this information, and the attribute of each page is set in the protection state. Setting means, a page protection exception processing means called when there is a write request to a protected page, and a task switching means, wherein the page protection exception processing means From the operating system, and checks whether or not the protected page information of the task in the data protection table includes the page in which the protection exception has occurred. If the result of the check includes the page, the attribute of the corresponding page in the page table Means for allowing the task ID to be executed, and registering the executed task ID if the task ID is not registered in the data permission table 4. As a result of the check, if the task is not included, if the task is not included, the task switching unit includes a unit that suspends the task. If the task switching unit switches the task, if the task ID is registered in the data permission table, There is provided a means for acquiring protected page information of a corresponding task in the data protection table, returning the attribute of the corresponding page in the page table to the protection state, and erasing the task ID in the data permission table.
[0018]
In a third data protection system according to the present invention, in the first data protection system, the data protection table is set, the page table is created based on the information, and the attribute of each page is set in the protection state. Setting means, a page protection exception processing means called when there is a write request to a protected page, and a task switching means, wherein the page protection exception processing means From the operating system, and checks whether or not the protected page information of the task in the data protection table includes the page of the protection exception. If the page is included as a result of the check, the attribute of the page in the page table Means for registering the identification information of the page in the data permission table, and including the page as a result of the check. If the task has been executed, the task switching means has a means for suspending the task. If the page identification information is registered in the data permission table when the task is switched, the task switching means The apparatus further comprises means for returning the attribute to the protection state and erasing the page identification information in the data permission table.
[0019]
According to a fourth data protection system of the present invention, in a system using an operating system in which one memory space is shared by a program, a means for creating a page table and a main storage owned by each task are initialized by system initialization. Means for setting the page information in the data protection table for each task, and means for setting the attribute of the protected page of the page table indicated by the data protection table to the protection state.
[0020]
According to a fifth data protection system of the present invention, in the fourth data protection system, initial setting means for setting the data protection table and setting an attribute of the page table to a protection state based on this information. And a page protection exception processing unit and a task switching unit that are called when there is a write request to the protected page. The page protection exception processing unit acquires the ID of the executed task from the operating system. Means for checking whether or not the protected page information of the task in the data protection table includes the page with the protection exception. If the check includes the page, the attribute of the corresponding page in the page table is set to the permitted state, and the execution is performed. Means for registering the task ID which has been performed if the task ID is not registered in the data permission table; If the task ID is not included in the data permission table and the task ID is registered in the data permission table when the task is switched, the task switching means corresponds to the data protection table. The protected page information of the task to be performed, the attribute of the corresponding page in the page table is returned to the protected state, and the task ID of the data permission table is deleted.
[0021]
A sixth data protection system according to the present invention, in the fourth data protection system, sets the data protection table and sets an attribute of the page table to a protection state based on the information. And a page protection exception processing unit and a task switching unit that are called when there is a write request to a page in the protected state. The page protection exception processing unit acquires the ID of the task being executed from the operating system, Means for checking whether the protected page information of the task in the data protection table includes the page that has resulted in the protection exception, and if the page is included as a result of the check, the attribute of the page in the page table is set to the permitted state; Means for registering the identification information in the data permission table, and executing if the result of the check does not include the page The task switching unit returns the attribute of the corresponding page of the page table to the protected state if the page identification information is registered in the data permission table when the task is switched. And means for erasing the page identification in the data permission table.
[0022]
A first data protection program according to the present invention includes a procedure for setting page information on a main memory owned by an individual task in a data protection table on a task basis in an initial setting of a system, and a procedure corresponding to an address when accessing the main memory. A page table in which the entry to be referred to is created based on the information of the data protection table, and the attribute of each page is set to the protection state.
[0023]
According to a second data protection program of the present invention, in the first data protection program, the data protection table is set, the page table is created based on this information, and the attribute of each page is protected. , A page protection exception handling procedure called when there is a write request to a page in the protected state, and a task switching procedure for switching tasks. A procedure for obtaining the ID of the task that has been performed from the operating system and checking whether the protected page information of the task in the data protection table includes the page that has resulted in the protection exception; If the attribute of the corresponding page of the table is set to the permission state, and the task ID being executed is not registered in the data permission table The task switching procedure includes a procedure for registering the task and, if the result of the check does not include the page, a procedure for suspending the task being executed. When the task switching procedure switches the task, the task ID is stored in the data permission table. If registered, the protected page information of the corresponding task in the data protection table is obtained, the attribute of the corresponding page in the page table is returned to the protection state, and the task ID of the data permission table is deleted. I do.
[0024]
According to a third data protection program of the present invention, in the first data protection program, the data protection table is set, the page table is created based on this information, and the attribute of each page is set to the protection state. , A page protection exception handling procedure called when there is a write request to a protected page, and a task switching procedure for switching tasks. Obtaining the task ID from the operating system, and checking whether or not the protected page information of the task in the data protection table includes the page that has resulted in the protection exception; and a page table if the check result includes the page. The attribute of the page in the permitted state and register the identification information of the page in the data permission table; As a result, the task switching procedure has a procedure for suspending the task that has been executed if the page is not included, and when the task switching procedure switches tasks, if page identification information is registered in the data permission table, The method further comprises the step of returning the attribute of the corresponding page of the table to the protected state and erasing the page identification in the data permission table.
[0025]
A fourth data protection program according to the present invention includes a procedure for creating a page table, a procedure for setting page information on a main memory owned by an individual task in the data protection table on a task basis in system initialization. The method is characterized in that the method includes a step of setting an attribute of the protected page indicated by the data protection table in the page table to a protected state.
[0026]
According to a fifth data protection program of the present invention, in the fourth data protection program, an initial setting procedure for setting the data protection table and setting an attribute of the page table to a protection state based on this information. A page protection exception handling procedure called when there is a write request to a protected page, and a task switching procedure for switching tasks, wherein the page protection exception handling procedure sets the ID of the task being executed to Obtained from the operating system, a procedure for checking whether the protected page information of the task in the data protection table includes the page that has resulted in the protection exception, and, if the page is included as a result of the check, the attribute of the page in the page table is changed. Procedure for enabling the task and registering the executed task ID if it is not registered in the data permission table A step of putting a task that has been executed if the result of the check does not include the page into a sleep state, and the task switching procedure includes a task ID registered in the data permission table when the task is switched. For example, the method includes a step of obtaining protected page information of a corresponding task in the data protection table, returning the attribute of the corresponding page in the page table to the protection state, and deleting the task ID in the data permission table.
[0027]
According to a sixth data protection program of the present invention, in the fourth data protection program, an initial setting procedure for setting the data protection table and setting an attribute of the page table to a protection state based on this information. A page protection exception handling procedure called when there is a write request to a protected page, and a task switching procedure for switching tasks, wherein the page protection exception handling procedure sets the ID of the task being executed to Obtained from the operating system, a procedure for checking whether the protected page information of the task in the data protection table includes the page that has resulted in the protection exception, and, if the page is included as a result of the check, the attribute of the page in the page table is changed. Registering the identification information of the page in the data permission table; and, as a result of the check, If the page identification information is registered in the data permission table when the task is switched when the task switching procedure switches tasks, The method further comprises a step of returning the attribute of the page to the protection state and erasing the page identification in the data permission table.
[0028]
According to a first data protection method of the present invention, there are provided an initialization procedure for initializing a system, a page protection exception handling procedure called when a write request to a protected page is issued, and a task for switching tasks. A switching procedure, wherein the initial setting procedure includes a procedure for setting page information on a main memory owned by a task in a data protection table on a task basis, and a page table to which an entry corresponding to the address is referred at the time of accessing the main memory. A step of setting the attribute of each page of the data protection table to a protection state based on the information of the data protection table, wherein the page protection exception handling procedure obtains an ID of a task being executed from the operating system. And checking whether the protected page information of the task in the data protection table includes the page that has resulted in the protection exception. As a result, if the page is included, the attribute of the page in the page table is set to the permission state, and if the task ID being executed is not registered in the data permission table, the procedure for registering the task ID is included. If the task switching procedure switches tasks, if the task ID is registered in the data permission table, the task switching procedure includes a protection page information of the corresponding task in the data protection table. , The attribute of the corresponding page in the page table is returned to the protected state, and the task ID in the data permission table is deleted.
[0029]
According to a second data protection method of the present invention, there are provided an initialization procedure for performing initialization of a system, a page protection exception handling procedure which is called when there is a write request to a protected page, and a task for switching tasks. A switching procedure, wherein the initial setting procedure includes a procedure for setting page information on a main memory owned by a task in a data protection table on a task basis, and a page table to which an entry corresponding to the address is referred at the time of accessing the main memory. A step of setting the attribute of each page of the data protection table to a protection state based on the information of the data protection table, wherein the page protection exception handling procedure obtains an ID of a task being executed from the operating system. And checking whether the protected page information of the task in the data protection table includes the page that has resulted in the protection exception. As a result, if the page is included, the attribute of the page in the page table is set to the permission state, and the identification information of the page is registered in the data permission table. When the task switching procedure switches tasks, if page identification information is registered in the data permission table, the attribute of the corresponding page in the page table is returned to the protection state, and the data permission is performed. A step of deleting the page identification of the table.
[0030]
According to a third data protection method of the present invention, an initialization procedure for initializing the system, a page protection exception handling procedure called when a write request to a page in a protected state is issued, and a task for task switching A switching procedure, wherein the initial setting procedure includes a step of setting page information on a main memory owned by the task in a data protection table in task units, and protecting an attribute of a corresponding page of the page table according to the information of the data protection table. The page protection exception handling procedure acquires the ID of the task being executed from the operating system, and sets the protected page information of the task in the data protection table to the page in which the protection exception has occurred. And whether the attribute of the page in the page table is permitted if the page is included as a result of the check And a step of registering the executed task ID if the task ID is not registered in the data permission table, and a step of suspending the executed task if the result of the check does not include the page, In the task switching procedure, when the task is switched, if the task ID is registered in the data permission table, the protection page information of the corresponding task in the data protection table is obtained, and the attribute of the corresponding page in the page table is set to the protection state. Returning the task ID from the data permission table.
[0031]
According to a fourth data protection method of the present invention, there are provided an initialization procedure for initializing the system, a page protection exception handling procedure called when there is a write request to a protected page, and a task for task switching. A switching procedure, wherein the initial setting procedure includes a step of setting page information on a main memory owned by the task in a data protection table in task units, and protecting an attribute of a corresponding page of the page table according to the information of the data protection table. The page protection exception handling procedure acquires the ID of the task being executed from the operating system, and sets the protected page information of the task in the data protection table to the page in which the protection exception has occurred. And whether the attribute of the page in the page table is permitted if the page is included as a result of the check And a step of registering the identification information of the page in the data permission table, and a step of suspending a task that has been executed if the page is not included as a result of the check. The task switching procedure switches the task. At this time, if the identification information of the page is registered in the data permission table, the method includes a step of returning the attribute of the corresponding page in the page table to the protection state and erasing the page identification in the data permission table. .
[0032]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, embodiments of the present invention will be described in detail with reference to the drawings. First, a first embodiment of the present invention will be described.
[0033]
FIG. 1 is a block diagram showing a configuration of a data protection system according to the present invention. The data protection system includes a real-time operating system 1, a data protection table 2, a page table 3, a data permission table 4, an initial setting unit 5, a page protection. The exception processing unit 6 is provided.
[0034]
The initial setting means 5 sets a predetermined page address of the data to be protected, the number of pages (length), and a task ID that owns (rewrites) the data in the data protection table 2 for each task ID.
[0035]
Next, the initial setting means 5 creates the page table 3 based on the information of the data protection table 2 according to the specification of the MMU (memory management unit).
[0036]
A main memory access request made by the program including the real-time operating system 1 refers to an entry of the page table 3 corresponding to the access address.
[0037]
The real-time operating system 1 has a task management unit 11 and a task switching unit 12, and the task switching unit 12 has a page information switching unit 121.
[0038]
The task management means 11 determines the next task to be executed according to the task information being executed and the priority.
[0039]
When task switching occurs, the task switching unit 12 refers to the data permission table 4 to determine whether the task being executed by the page information switching unit 121 has accessed protected data.
[0040]
If the ID of the task is registered in the data permission table 4, the page information switching means 121 regards that the protected page owned by the task has been permitted during the task execution period.
[0041]
Then, referring to the page information to be protected by the executed task in the data protection table 2, the attribute of the corresponding entry in the page table 3 is changed to the protection state (return to the protection state), and the information in the data permission table 4 is deleted. The task switching means 12 acquires the next task to be executed from the task management means 11 and switches to the task.
[0042]
When the task ID is not registered in the data permission table 4, it is considered that the executed task has not accessed the protected page, the task to be executed next is acquired from the task management unit 11, and the task is switched to the task.
[0043]
When a page protection exception occurs, that is, in a main memory access request made by the program, an entry in the page table 3 corresponding to the access address is referred to and the attribute is in a protected state. The protection exception processing means 6 is called.
[0044]
The page protection exception processing means 6 obtains the task ID executed before the exception processing from the task management means 11, accesses the data protection table 2 using the task ID as a key, and obtains the page protection exception. Determine if the page is included.
[0045]
If they match, the attribute of the page address where the page protection exception has occurred in the page table 3 is set to the permitted state, and information indicating that the task being executed has set its protected page to the permitted state in the data permission table 4 (being executed) Task ID) and continue execution of the task. At this time, if the task ID being executed is already registered in the data permission table 4, no additional writing is performed. If they do not match, write error information and put the task to sleep.
[0046]
Each of the initial setting unit 5, the page protection exception processing unit 6, and the real-time operating system 1 is realized by a terminal (including a mobile terminal and a mobile phone having an information processing function) for realizing the system and a program procedure in the information processing apparatus. Is done.
[0047]
When the main memory is accessed only in the real address mode in the system using the real-time operating system 1, it is not necessary to provide the logical address information of each entry of the page table 3.
[0048]
Next, the operation of this embodiment will be described with reference to the drawings. FIG. 2 is a flowchart showing the operation of the data protection system, the data protection program, and the procedure of the data protection method.
[0049]
Referring to FIG. 2, first, an initial setting process is performed, the first task is set to task # 1, access is made to protected data owned by task # 1, and task # 1 is executed and switched to task # 2. Will be described.
[0050]
The initial setting means 5 registers the page address and the number of pages to be protected in the data protection table 2 for each task (step 1). Based on the information in the data protection table 2, a page table 3 is created according to the specifications of the MMU, and the attribute of each entry is set to protection (step 2).
[0051]
The task management means 11 determines the next task to be executed according to the priority (switch to task # 1 occurs) (step 3). The task switching means 12 checks whether there is registration information in the data permission table 4, and since it is not registered at the beginning (step 4), it immediately switches to the next task (task # 1) and executes it.
[0052]
A page protection exception occurs in the main memory access (write) of task # 1 (step 7).
[0053]
The task ID (# 1) executed by the page protection exception processing means 6 is acquired from the task management means 11, and the protected page information of ID # 1 of the data protection table 2 is acquired (step 8).
[0054]
It is determined whether or not the protected page information includes the page in which the exception has occurred (step 9). Therefore, the attribute of the page in which the exception has occurred is set to the permission state, and the task ID (# 1) being executed in the data permission table 4 is displayed. Is registered, so that it is registered (step 10).
[0055]
When the execution of the task # 1 is completed (step 11), it is determined whether or not the system is a termination condition. Since there is no termination condition (step 13), switching to the next task (# 2) occurs (step 3).
[0056]
The task switching means 12 checks whether registration information is present in the data permission table 4, and since the ID # 1 is registered, the protected page information (page address) of the task ID # 1 is obtained from the data protection table 2 using this as a key. Then, the attribute information of the page address 001 (entry # 1) of the page table 3 is returned to the protected state, and the information of the data permission table 4 is deleted (step 5).
[0057]
The task switching means 12 switches to the next task (# 2), which is executed (step 6). When the task # 2 is defective, a request is made to write to the protected page of the task # 1, and a page protection exception occurs (step 7). .
[0058]
The page protection exception processing means 6 acquires the task ID (# 2) that has been executed, and acquires the protected page information of ID # 2 of the data protection table 2 (step 8).
[0059]
Then, it is determined that this does not include the page in which the exception has occurred (step 9), it is determined that a write request to the protected page of another task has been made, the error information is written, and the task being executed is put into a sleep state. (Step 12).
[0060]
The error information may be output serially, stored in a memory, or displayed on a display. The memory protection hardware may be other than the MMU.
[0061]
Next, a second embodiment of the present invention will be described. In this embodiment, when a program or the like is loaded into the main storage, a main storage area for the program or data is allocated by the MMU or the initial setting means 5, and the page table 3 is created according to this information.
[0062]
The initial setting means 5 sets the page address of the data to be protected, the number of pages (length), and the task ID that owns (rewrites) the data in the data protection table 2 for each task ID.
[0063]
Next, the initial setting means 5 sets the attribute information of the page specified by the protected page information of the data protection table 2 among the entries of the page table 3 to the protected state. Other functions and processes are the same as those of the first embodiment.
[0064]
Next, a third embodiment of the present invention will be described. In this embodiment, when the page protection exception processing unit 6 sets the attribute of the exceptional page of the page table 3 to the permitted state, the data permission table 4 contains not the task ID being executed but the page identification ( The page address or page table entry number) is registered (see FIG. 3).
[0065]
When one task sequentially accesses a plurality of own protected pages and the permission state is set by the page protection exception processing means 6 each time, page identification is sequentially added to the data permission table 4.
[0066]
Further, when the task switching means 12 switches tasks, the presence or absence of registration information in the data permission table 4 is checked, and if so, the attribute of the page indicated by the information is set to the protection state, and the page identification information in the data permission table 4 is deleted. .
[0067]
If a plurality of page identification information is registered in the data permission table 4, the above operation is repeated.
[0068]
The functions and processing procedures of the other means are the same as those of the first embodiment or the second embodiment.
[0069]
【The invention's effect】
According to the present invention, rewriting of page information does not occur except when a page protection exception occurs. Therefore, the page table rewriting time and the processing time due to a page table cache miss can be reduced.
[0070]
In particular, the task switching does not unconditionally change the attribute to “permitted” for many protected pages owned by the next task, but instead processes the page for which a rewrite request has actually occurred. Even in a small-sized portable terminal or mobile phone in which the processing amount per one time is limited, the processing time can be reduced without performing extra processing related to data protection, and the simultaneous processing performance of a plurality of tasks can be maintained.
[0071]
Also, the system initial setting means sets each program area and its own protected page in the data protection table, develops the protected page information in the page table, sets each page attribute to the protection state, and sets the write access. Since only the user's own page is temporarily permitted, a data protection function can be added without modifying the program currently used.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a data protection system according to the present invention.
FIG. 2 is a flowchart showing the operation of the data protection system, the data protection program, and the procedure of the data protection method according to the present invention.
FIG. 3 is a block diagram showing the contents of a data permission table 4 according to a third embodiment of the present invention.
[Explanation of symbols]
1 Real-time operating system
11 Task management means
12 Task switching means
121 Page information switching means
2 Data protection table
3 Page table
4 Data permission table
5 Initial setting means
6 Page protection exception handling means

Claims (16)

一つのメモリ空間をプログラムで共有するオペレーティングシステム利用のシステムにおいて、システムの初期設定で、個々のタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手段と、主記憶アクセス時そのアドレスに対応するエントリが参照されるページテーブルを前記データ保護テーブルの情報を元に作成し、これの各ページの属性を保護状態に設定する手段を有することを特徴とするデータ保護システム。In a system using an operating system in which one memory space is shared by a program, means for setting page information on a main memory owned by an individual task in a data protection table for each task in system initialization, and a main memory access. A data protection system comprising: means for creating a page table to which an entry corresponding to the address is referred based on the information of the data protection table, and setting an attribute of each page to a protection state. 前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルを作成し、各ページの属性を保護状態に設定する初期設定手段と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手段と、タスク切替手段を備え、前記ページ保護例外処理手段は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手段と、チェックの結果前記ページを含めばページテーブルの該当ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブル4に登録されてなければそれを登録する手段と、前記チェックの結果、前記ページを含まなければ実行していたタスクを休止状態にする手段を有し、前記タスク切替手段は、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応するタスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手段を有することを特徴とする請求項1記載のデータ保護システム。Initial setting means for setting the data protection table, creating the page table based on this information, and setting the attribute of each page to the protection state, and is called when there is a write request to the protected page. A page protection exception processing unit; and a task switching unit. The page protection exception processing unit obtains an ID of the task being executed from the operating system, and the protected page information of the task in a data protection table indicates the protection exception. Means for checking whether or not the page includes the page which has become a result of the check; if the page is included as a result of the check, the attribute of the corresponding page in the page table is set to a permission state; Means to register it, and if the result of the check indicates that the page is not included, the task being executed is suspended. The task switching means, when the task is switched, if the task ID is registered in the data permission table, acquires the protected page information of the corresponding task in the data protection table; 2. The data protection system according to claim 1, further comprising means for returning the attribute of the page to the protection state and deleting the task ID in the data permission table. 前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルを作成し、各ページの属性を保護状態に設定する初期設定手段と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手段と、タスク切替手段を備え、前記ページ保護例外処理手段は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手段と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手段と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手段を有し、前記タスク切替手段は、タスクを切り替える際に、データ許可テーブルにページ識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別情報を消去する手段を有することを特徴とする請求項1記載のデータ保護システム。Initial setting means for setting the data protection table, creating the page table based on this information, and setting the attribute of each page to the protection state, and is called when there is a write request to the protected page. A page protection exception processing unit; and a task switching unit. The page protection exception processing unit obtains an ID of the task being executed from the operating system, and the protected page information of the task in a data protection table indicates the protection exception. Means for checking whether or not the page includes the page which has become a result of the check; means for setting the attribute of the page in the page table to the permission state if the page is included as a result of the check, and registering the identification information of the page in the data permission table; As a result, if the task is not included, the task that has been executed is put into a sleep state, and the task switching means includes When switching tasks, if the page identification information is registered in the data permission table, the attribute of the corresponding page in the page table is returned to the protection state, and the page identification information in the data permission table is erased. The data protection system according to claim 1, wherein 一つのメモリ空間をプログラムで共有するオペレーティングシステム利用のシステムにおいて、ページテーブルを作成する手段と、システムの初期設定で、個々のタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手段と、ページテーブルの、前記データ保護テーブルが示す保護ページについて属性を保護状態に設定する手段を有することを特徴とするデータ保護システム。In a system using an operating system in which one memory space is shared by programs, means for creating a page table and, in the initial settings of the system, the page information on the main memory owned by each task in the data protection table in task units A data protection system comprising: a setting unit; and a unit for setting an attribute of a protected page indicated by the data protection table in a page table to a protected state. 前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルの属性を保護状態に設定する初期設定手段と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手段とタスク切替手段を備え、前記ページ保護例外処理手段は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手段と、チェックの結果前記ページを含めばページテーブルの該当ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手段と、前記チェックの結果、前記ページを含まなければ実行していたタスクを休止状態にする手段を有し、前記タスク切替手段は、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応するタスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手段を有することを特徴とする請求項4記載のデータ保護システム。Initial setting means for setting the data protection table and setting the attribute of the page table to the protection state based on this information, and page protection exception processing means which is called when there is a write request to a page in the protection state. A task switching unit, wherein the page protection exception processing unit acquires the ID of the task being executed from the operating system, and determines whether or not the protection page information of the task in the data protection table includes the protection exception page. Means for checking the attribute of the corresponding page of the page table if the result of the check includes the page, and registering the executed task ID if the task ID is not registered in the data permission table; As a result of the check, if the page does not include the page, the executing task has a means for suspending, When switching a task, if the task ID is registered in the data permission table, the task switching means acquires the protection page information of the corresponding task in the data protection table, and sets the attribute of the corresponding page in the page table to the protection state. 5. The data protection system according to claim 4, further comprising means for returning and deleting the task ID in the data permission table. 前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルの属性を保護状態に設定する初期設定手段と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手段とタスク切替手段を備え、ページ保護例外処理手段は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手段と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手段と、前記チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手段を有し、前記タスク切替手段は、タスクを切り替える際に、データ許可テーブルにページ識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手段を有することを特徴とする請求項4記載のデータ保護システム。Initial setting means for setting the data protection table and setting the attribute of the page table to the protection state based on this information, and page protection exception processing means which is called when there is a write request to a page in the protection state. Task switching means, the page protection exception processing means acquires the ID of the task being executed from the operating system, and determines whether the protection page information of the task in the data protection table includes the page having the protection exception. Means for checking, means for setting the attribute of the page in the page table to a permitted state if the page is included as a result of the check, and registration of the identification information of the page in the data permission table; and means for not including the page as a result of the check. Means for putting the task being executed into a sleep state, wherein the task switching means switches the task Means for, if the page identification information is registered in the data permission table, returning the attribute of the corresponding page in the page table to the protection state, and erasing the page identification in the data permission table. 4. The data protection system according to 4. システムの初期設定で、個々のタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、主記憶アクセス時そのアドレスに対応するエントリが参照されるページテーブルを前記データ保護テーブルの情報を元に作成し、これの各ページの属性を保護状態に設定する手順を有することを特徴とするデータ保護プログラム。In the initial setting of the system, a procedure for setting page information on the main memory owned by each task in the data protection table on a task basis in a task unit; A data protection program characterized by comprising a procedure of creating based on information of a protection table and setting an attribute of each page to a protection state. 前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルを作成し、各ページの属性を保護状態に設定する初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応タスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手順を有することを特徴とする請求項7記載のデータ保護プログラム。The data protection table is set, the page table is created based on this information, and an initial setting procedure for setting the attribute of each page to the protection state is called. A page protection exception handling procedure, and a task switching procedure for switching tasks. The page protection exception handling procedure acquires an ID of a task being executed from the operating system, and protects the task in a data protection table. A step of checking whether or not the page information includes the page that has resulted in the protection exception; if the check includes the page, the attribute of the page in the page table is set to a permission state; If it is not registered in the procedure to register it, and the task that was executed if the check did not include the page When the task switching procedure switches tasks, if the task ID is registered in the data permission table, the task switching procedure acquires protected page information of the corresponding task in the data protection table, 8. The data protection program according to claim 7, further comprising a step of returning an attribute of a corresponding page to a protection state and deleting a task ID of the data permission table. 前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルを作成し、各ページの属性を保護状態に設定する初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順とタスクの切替を行うタスク切替手順を備え、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにページの識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手順を有することを特徴とする請求項7記載のデータ保護プログラム。The data protection table is set, the page table is created based on this information, and an initial setting procedure for setting the attribute of each page to the protection state is called. A page protection exception handling procedure and a task switching procedure for switching tasks. The page protection exception handling procedure obtains the ID of the task being executed from the operating system, and stores the task protection page in the data protection table. A step of checking whether the information includes the page that has resulted in the protection exception, and if the check includes the page, the attribute of the page in the page table is set to a permission state, and the identification information of the page is registered in the data permission table. Having a procedure and a step of suspending the task being executed if the page is not included as a result of the check, When the disk switching procedure switches tasks, if page identification information is registered in the data permission table, the attribute of the corresponding page in the page table is returned to the protected state, and the page identification in the data permission table is deleted. The data protection program according to claim 7, further comprising a procedure. ページテーブルを作成する手順と、システムの初期設定で、個々のタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、ページテーブルの、前記データ保護テーブルが示す保護ページについて属性を保護状態に設定する手順を有することを特徴とするデータ保護プログラム。A procedure for creating a page table, a procedure for setting page information in a main memory owned by each task in a data protection table in task units in system initialization, and a procedure for protecting the page table indicated by the data protection table. A data protection program having a procedure for setting an attribute of a page to a protection state. 前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルの属性を保護状態に設定する初期設定手順と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手順と、前記チェックの結果、前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応するタスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手順を有することを特徴とする請求項10記載のデータ保護プログラム。An initial setting procedure for setting the data protection table and setting an attribute of the page table to a protection state based on the information; a page protection exception processing procedure called when a write request is issued to a page in the protection state; A task switching procedure for switching tasks, wherein the page protection exception handling procedure obtains an ID of the task being executed from the operating system, and the protection page information of the task in a data protection table indicates the protection exception and A procedure for checking whether the page includes a page that has become invalid, and if the result of the check includes the page, the attribute of the page in the page table is set to a permission state; if the task ID being executed is not registered in the data permission table, And the task that was being executed if the page was not included as a result of the check was put into a hibernate state When the task switching procedure switches tasks, if a task ID is registered in the data permission table, the task switching procedure acquires protected page information of the corresponding task in the data protection table, and 11. The data protection program according to claim 10, further comprising a step of returning a page attribute to a protection state and erasing a task ID in the data permission table. 前記データ保護テーブルの設定を行い、この情報を元に前記ページテーブルの属性を保護状態に設定する初期設定手順と、保護状態のページへの書込要求があれば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの該当ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手順と、前記チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにページ識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手順を有することを特徴とする請求項10記載のデータ保護プログラム。An initial setting procedure for setting the data protection table and setting an attribute of the page table to a protection state based on the information; a page protection exception processing procedure called when a write request is issued to a page in the protection state; A task switching procedure for switching tasks, wherein the page protection exception processing procedure obtains an ID of the task being executed from the operating system, and the protected page information of the task in a data protection table indicates the protection exception and A step of checking whether or not the page includes the changed page, a step of setting the attribute of the corresponding page in the page table to the permission state if the page is included as a result of the check, and registering the identification information of the page in the data permission table; Result: A step of suspending a task that has been executed if the page is not included is included in the task switching procedure. However, when switching tasks, if page identification information is registered in the data permission table, a procedure for returning the attribute of the corresponding page in the page table to the protection state and deleting the page identification in the data permission table is provided. The data protection program according to claim 10, wherein: システムの初期設定をする初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記初期設定手順はタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、主記憶アクセス時そのアドレスに対応するエントリが参照されるページテーブルを前記データ保護テーブルの情報を元に作成し、これの各ページの属性を保護状態に設定する手順を有し、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応タスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手順を有することを特徴とするデータ保護方法。An initial setting procedure for initializing the system, a page protection exception handling procedure called when there is a write request to a page in a protected state, and a task switching procedure for switching tasks, the initial setting procedure includes a task Setting the page information on the main memory owned by the task in the data protection table on a task basis, and creating a page table to which an entry corresponding to the address is referred at the time of accessing the main memory based on the information of the data protection table. Setting the attribute of each page to the protection state. The page protection exception handling procedure obtains the ID of the task being executed from the operating system, and sets the protection page of the task in the data protection table. A procedure for checking whether the information includes the page that resulted in the protection exception, and a page text if the result of the check includes the page. The attribute of the corresponding page of the table is set in the permitted state, and if the task ID being executed is not registered in the data permission table, the task is registered. When the task switching procedure switches tasks, if the task ID is registered in the data permission table, the task switching procedure acquires protected page information of the corresponding task in the data protection table, A data protection method, comprising: returning a corresponding page attribute to a protection state, and erasing a task ID in the data permission table. システムの初期設定をする初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記初期設定手順はタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、主記憶アクセス時そのアドレスに対応するエントリが参照されるページテーブルを前記データ保護テーブルの情報を元に作成し、これの各ページの属性を保護状態に設定する手順を有し、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにページの識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手順を有することを特徴とするデータ保護方法。An initial setting procedure for initializing the system, a page protection exception handling procedure called when there is a write request to a page in a protected state, and a task switching procedure for switching tasks, the initial setting procedure includes a task Setting the page information on the main memory owned by the task in the data protection table on a task basis, and creating a page table to which an entry corresponding to the address is referred at the time of accessing the main memory based on the information of the data protection table. Setting the attribute of each page to the protection state. The page protection exception handling procedure obtains the ID of the task being executed from the operating system, and sets the protection page of the task in the data protection table. A procedure for checking whether the information includes the page that resulted in the protection exception, and a page text if the result of the check includes the page. The attribute of the corresponding page of the table in a permission state, a step of registering the identification information of the page in a data permission table, and a step of suspending a task that has been executed if the result of the check does not include the page, When the task switching procedure switches tasks, if page identification information is registered in the data permission table, the attribute of the corresponding page in the page table is returned to the protection state, and the page identification in the data permission table is deleted. A data protection method comprising the steps of: システムの初期設定をする初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記初期設定手順はタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、このデータ保護テーブルの情報に従って、ページテーブルの対応ページの属性を保護状態に設定する手順を有し、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、前記実行していたタスクIDがデータ許可テーブルに登録されてなければそれを登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにタスクIDが登録されていればデータ保護テーブルの対応タスクの保護ページ情報を取得し、ページテーブルの対応するページの属性を保護状態に戻し、前記データ許可テーブルのタスクIDを消去する手順を有することを特徴とするデータ保護方法。An initial setting procedure for initializing the system, a page protection exception handling procedure called when there is a write request to a page in a protected state, and a task switching procedure for switching tasks, the initial setting procedure includes a task A step of setting page information on a main storage owned by the task in a data protection table on a task basis, and a step of setting an attribute of a corresponding page of the page table to a protection state according to the information of the data protection table. The protection exception processing procedure obtains the ID of the task that has been executed from the operating system, and checks whether the protection page information of the task in the data protection table includes the protection exception page. Result If the page is included, the attribute of the page in the page table is set to the permitted state, and the executed task ID is set. If the task is not registered in the data permission table, the procedure includes registering the page and, if the result of the check does not include the page, suspending the task being executed. If the task ID is registered in the data permission table, the protection page information of the corresponding task in the data protection table is obtained, the attribute of the corresponding page in the page table is returned to the protection state, and the task ID of the data permission table is changed. A data protection method comprising a step of erasing. システムの初期設定をする初期設定手順と、保護状態のページへの書込要求が有れば呼び出されるページ保護例外処理手順と、タスクの切替を行うタスク切替手順を備え、前記初期設定手順はタスクが所有する主記憶上のページ情報をタスク単位でデータ保護テーブルに設定する手順と、このデータ保護テーブルの情報に従って、ページテーブルの対応ページの属性を保護状態に設定する手順を有し、前記ページ保護例外処理手順は、実行していたタスクのIDを前記オペレーティングシステムより取得し、データ保護テーブルの当該タスクの保護ページ情報が前記保護例外となったページを含むかをチェックする手順と、チェックの結果前記ページを含めばページテーブルの当該ページの属性を許可状態にし、そのページの識別情報をデータ許可テーブルに登録する手順と、チェックの結果前記ページを含まなければ実行していたタスクを休止状態にする手順を有し、前記タスク切替手順が、タスクを切り替える際に、データ許可テーブルにページの識別情報が登録されていれば、ページテーブルの対応するページの属性を保護状態に戻し、データ許可テーブルの前記ページ識別を消去する手順を有することを特徴とするデータ保護方法。An initial setting procedure for initializing the system, a page protection exception handling procedure called when there is a write request to a page in a protected state, and a task switching procedure for switching tasks, the initial setting procedure includes a task A step of setting page information on a main storage owned by the task in a data protection table on a task basis, and a step of setting an attribute of a corresponding page of the page table to a protection state according to the information of the data protection table. The protection exception processing procedure obtains the ID of the task that has been executed from the operating system, and checks whether the protection page information of the task in the data protection table includes the protection exception page. Result If the page is included, the attribute of the page in the page table is set to the permitted state, and the identification information of the page is stored in the data. The task switching procedure includes a procedure of registering the page in the permission table, and a step of suspending the task that was being executed if the page was not included as a result of the check. If the identification information is registered, the data protection method includes a step of returning the attribute of the corresponding page in the page table to the protection state and deleting the page identification in the data permission table.
JP2002322604A 2002-11-06 2002-11-06 Data protection system, data protection program, and data protection method Expired - Fee Related JP4423849B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002322604A JP4423849B2 (en) 2002-11-06 2002-11-06 Data protection system, data protection program, and data protection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002322604A JP4423849B2 (en) 2002-11-06 2002-11-06 Data protection system, data protection program, and data protection method

Publications (2)

Publication Number Publication Date
JP2004157751A true JP2004157751A (en) 2004-06-03
JP4423849B2 JP4423849B2 (en) 2010-03-03

Family

ID=32802745

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002322604A Expired - Fee Related JP4423849B2 (en) 2002-11-06 2002-11-06 Data protection system, data protection program, and data protection method

Country Status (1)

Country Link
JP (1) JP4423849B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7552436B2 (en) 2003-11-25 2009-06-23 International Business Machines Memory mapped input/output virtualization
JP2021511565A (en) * 2018-01-22 2021-05-06 エイアールエム リミテッド Multiple guard tag setting command
US11762566B2 (en) 2018-01-22 2023-09-19 Arm Limited Programmable mapping of guard tag storage locations

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7552436B2 (en) 2003-11-25 2009-06-23 International Business Machines Memory mapped input/output virtualization
JP2021511565A (en) * 2018-01-22 2021-05-06 エイアールエム リミテッド Multiple guard tag setting command
JP7269942B2 (en) 2018-01-22 2023-05-09 アーム・リミテッド Multiple guard tag setting instructions
US11762566B2 (en) 2018-01-22 2023-09-19 Arm Limited Programmable mapping of guard tag storage locations

Also Published As

Publication number Publication date
JP4423849B2 (en) 2010-03-03

Similar Documents

Publication Publication Date Title
JP6306578B2 (en) Memory protection device and protection method
US9910602B2 (en) Device and memory system for storing and recovering page table data upon power loss
JP5071798B2 (en) Computer system, memory management method, and program thereof
US9208103B2 (en) Translation bypass in multi-stage address translation
US9218302B2 (en) Page table management
JP4519738B2 (en) Memory access control device
US8453015B2 (en) Memory allocation for crash dump
US20070016719A1 (en) Memory device including nonvolatile memory and memory controller
US20150089116A1 (en) Merged TLB Structure For Multiple Sequential Address Translations
US9268694B2 (en) Maintenance of cache and tags in a translation lookaside buffer
US7069445B2 (en) System and method for migration of a version of a bootable program
US20130103915A1 (en) Secure memory access system and method
JP7096840B2 (en) Equipment and methods for managing capacity metadata
US20050044292A1 (en) Method and apparatus to retain system control when a buffer overflow attack occurs
CN112925606A (en) Memory management method, device and equipment
CN104951244B (en) Method and apparatus for accessing data
JP4047281B2 (en) How to synchronize cache memory with main memory
JP4423849B2 (en) Data protection system, data protection program, and data protection method
CN108052415B (en) Rapid recovery method and system for malicious software detection platform
US20050138263A1 (en) Method and apparatus to retain system control when a buffer overflow attack occurs
JP2004318886A (en) Data access request remapping system
US20090055683A1 (en) Method of restoring previous computer configuration
US11200175B2 (en) Memory accessor invailidation
US20050027954A1 (en) Method and apparatus to support the maintenance and reduction of FLASH utilization as it pertains to unused or infrequently referenced FLASH data
US6658548B1 (en) System and method in a data processing system for extracting data from a protected region of memory

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050309

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051017

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20070118

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20080610

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090210

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090325

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20090508

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: 20091117

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091130

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121218

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121218

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131218

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees