JPH07302227A - Memory protection method and device therefor - Google Patents

Memory protection method and device therefor

Info

Publication number
JPH07302227A
JPH07302227A JP6094071A JP9407194A JPH07302227A JP H07302227 A JPH07302227 A JP H07302227A JP 6094071 A JP6094071 A JP 6094071A JP 9407194 A JP9407194 A JP 9407194A JP H07302227 A JPH07302227 A JP H07302227A
Authority
JP
Japan
Prior art keywords
domain
memory
shared
memory block
access
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6094071A
Other languages
Japanese (ja)
Inventor
Koshi Yamada
孔司 山田
Masahiro Uminaga
正博 海永
Shinichi Yoshioka
真一 吉岡
Ikuya Kawasaki
郁也 川崎
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP6094071A priority Critical patent/JPH07302227A/en
Publication of JPH07302227A publication Critical patent/JPH07302227A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide a memory protection method and a device therefor capable of increasing the total number of process-specific domains generatable in one period regardless of the length of a domain access control field while suppressing the increase of a hardware amount. CONSTITUTION:In the case of accessing the data of a virtual address where a certain process is present, a TLB is retrieved and address conversion information (a physical address and a domain number, etc.) is obtained (a step 100). The domain number inside the address conversion information is compared with a process intrinsic domain number inside the process-specific domain number field of the process (the step 110) and access is permitted when they are equal (the step 110; NO). When they are different, whether or not the domain number inside the address conversion is present inside a shared domain is checked (the step 120) and conventional domain protection checking is performed when it is present.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、計算機システムのメモ
リ管理装置におけるメモリ保護方法およびメモリ保護装
置に関し、より詳細には、複数のプロセスでメモリを共
用するシステムにおいて、メモリを、それぞれが予め決
められたプロセスまたはプロセス・グループだけからア
クセス可能な複数のメモリ領域(例えば、ページなどの
メモリブロックの集合から構成されるメモリ領域;以下
ドメインという)に区分けし、アクセスする各プロセス
が持っているドメイン・アクセス権情報とアクセスされ
る各メモリブロックが持っているドメイン情報を照合す
ることによって許可されないドメインへのメモリアクセ
スを抑止するメモリ保護方法およびメモリ保護装置に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory protection method and a memory protection device in a memory management device of a computer system, and more specifically, in a system in which a plurality of processes share a memory, each memory is predetermined. A domain that each process has by dividing it into multiple memory areas that can be accessed only by the specified process or process group (for example, a memory area that consists of a set of memory blocks such as pages; hereinafter referred to as a domain). The present invention relates to a memory protection method and a memory protection device for suppressing memory access to an unauthorized domain by collating access right information with domain information of each memory block to be accessed.

【0002】[0002]

【従来の技術】最近の計算機システムにおいては、メモ
リを複数のプロセスで共用することが普通になってきて
いる。その場合に、メモリ領域を複数のドメインに区分
けし、上記区分けした各ドメインに対するアクセスの可
否情報を保持するドメインアクセス制御フィールドを各
プロセス毎に設け、プロセス実行時に該ドメインアクセ
ス制御フィールドを参照することによって不当なドメイ
ンへのメモリアクセスを抑止するメモリ保護方法が従来
から知られている。プロセスへのドメインの割り当て、
およびドメインアクセス制御フィールドへのアクセスの
可否情報の設定はユーザプロセスの要求によりOS(オ
ペレーティングシステム)によって行われる。各ドメイ
ンは該アクセスの可否情報により決められた1つ以上の
プロセスによってアクセスされる。このようにして各ド
メイン毎にアクセス可能なプロセスが定義される。ここ
でドメインというのは、上述したように、ページなどの
メモリブロックの集合からなるメモリの一部分のことで
あり、メモリ上でドメイン間の重なりはないものとす
る。
2. Description of the Related Art In recent computer systems, it has become common for a plurality of processes to share a memory. In that case, the memory area is divided into a plurality of domains, and a domain access control field for holding access permission information for each divided domain is provided for each process, and the domain access control field is referred to when the process is executed. Conventionally, a memory protection method for suppressing memory access to an unauthorized domain is known. Assigning domains to processes,
The setting of access permission information to the domain access control field is performed by the OS (operating system) at the request of the user process. Each domain is accessed by one or more processes determined by the access permission information. In this way, accessible processes are defined for each domain. Here, the domain is a part of the memory including a set of memory blocks such as pages as described above, and it is assumed that the domains do not overlap each other on the memory.

【0003】図5は、上述したドメインアクセス制御フ
ィールドの構成例を示した図である。同図において、4
00はドメインアクセス制御フィールド(DAC;Dom
ainAccess Control Field)、410〜417はドメ
インアクセス制御フィールド中のサブ・フィールドであ
る。ここでは、ドメイン“0”からドメイン“7”まで
の8個を最大ドメイン数とする。サブ・フィールド41
0〜サブ・フィールド417は順番にドメイン0(D
0)〜ドメイン7(D7)に対応し、各サブ・フィール
ドの内容は対応するドメインに対するアクセスの可否を
示している。各サブ・フィールドは、例えば、2ビット
から構成され、該2ビットのパターンによって、全ての
アクセス禁止(例えば“00”)、読み出しのみ可(例
えば“01”)、読み出し書き込み可(例えば“1
0”)、実行も可(例えば“11”)などのアクセス制
御権を規定する。サブ・フィールドは2ビットに限ら
ず、さらに多くのビットで構成するとより細分化した多
様なアクセス制御を行うことができる。このアクセス制
御ビットを参照し、特定のビットパターン(例えば、
“00”)か否かをデコーダなどで判定することにより
当該ドメインに対するアクセスが不可か可能かを簡単に
判定することができる。例えば、上記の例の場合、アク
セス制御ビットが特定(“00”)のパターンでない場
合には当該ドメインに対して何らかのアクセスが可能で
あることがわかる。この場合アクセスが許されていると
いっても、実際は読み出しだけが許されている場合、読
み出し書き込みが許されている場合、実行も許されてい
る場合がある。なお、サブ・フィールドのビット数を1
ビット増やし、この1ビットによって当該ドメインに対
して全てのアクセスを禁止しているか否かを直接指定す
るようにすると、上述したようなサブ・フィールドの値
が特定パターンか否かを判定する必要はなくなる。
FIG. 5 is a diagram showing a configuration example of the domain access control field described above. In the figure, 4
00 is a domain access control field (DAC; Dom)
ainAccess Control Field) 410 to 417 are subfields in the domain access control field. Here, the eight domains from domain “0” to domain “7” are the maximum number of domains. Sub-field 41
0 to sub-field 417 are in order domain 0 (D
0) to domain 7 (D7), and the content of each sub-field indicates whether or not access to the corresponding domain is possible. Each sub-field is composed of, for example, 2 bits, and depending on the pattern of the 2 bits, all access is prohibited (for example, “00”), read only is possible (for example, “01”), read / write is possible (for example, “1”).
0 "), execution is also possible (for example," 11 "), etc. The subfield is not limited to 2 bits, and if it is made up of more bits, more detailed and diverse access control is performed. With reference to this access control bit, a specific bit pattern (for example,
It is possible to easily determine whether or not access to the domain is impossible by determining whether or not it is "00") by a decoder or the like. For example, in the case of the above example, it can be seen that if the access control bit is not a specific (“00”) pattern, some kind of access to the domain is possible. In this case, although access is permitted, there are cases where only reading is actually permitted, read / write is permitted, and execution is also permitted. The number of bits in the sub-field is 1
By increasing the number of bits and directly designating whether or not all access to the domain is prohibited by this one bit, it is not necessary to determine whether or not the value of the sub-field is a specific pattern as described above. Disappear.

【0004】図6は、従来技術による複数のプロセス
(プロセスA〜プロセスG)、複数のドメイン、および
その間のアクセス許可/不許可の関係など、メモリ保護
の概要を示す図である。同図において、矢印は許可され
ているドメインアクセスを示し、×印付き矢印は許可さ
れていないドメインアクセスを示している。記述の都合
上、例えばプロセスB(510)にドメイン“1”およ
びドメイン“6”へのアクセスが許されている場合、図
6ではドメインアクセス制御フィールド(DAC)51
2のように「1,6」と記載するが、実際には上述した
図5に示すようなサブ・フィールドで表されている。図
6は、各プロセス毎に1つのドメインアクセス制御フィ
ールド(DAC)を割り付け、不当なアクセスを抑止し
たり、複数のプロセス間で1つのドメインを共用したり
することを表している。例えばプロセスB(510)
は、ドメイン“1”を占有するとともに、ドメイン
“6”をプロセスA(500)およびプロセスC(52
0)と共用している。プロセスB(510)は、ドメイ
ン“1”およびドメイン“6”以外のドメイン、例えば
ドメイン“2”へはアクセスできないことを示してい
る。また、プロセスC(520)は、ドメイン“2”を
占有するとともに、ドメイン“6”をプロセスA(50
0)とプロセスB(510)と共用し、ドメイン“7”
をプロセスD(530)と共有していることを示してい
る。
FIG. 6 is a diagram showing an outline of memory protection such as a plurality of processes (process A to process G), a plurality of domains, and a relationship of access permission / denial between them according to a conventional technique. In the figure, the arrow indicates the domain access permitted, and the arrow with a cross indicates the domain access not permitted. For convenience of description, for example, when the process B (510) is allowed to access the domain “1” and the domain “6”, the domain access control field (DAC) 51 in FIG.
2 is described as "1,6", but is actually represented by the sub-field as shown in FIG. FIG. 6 shows that one domain access control field (DAC) is assigned to each process to prevent unauthorized access, or to share one domain among a plurality of processes. For example, process B (510)
Occupies the domain "1" and assigns the domain "6" to the process A (500) and the process C (52).
It is shared with 0). Process B (510) indicates that the domain other than the domain "1" and the domain "6", for example, the domain "2" cannot be accessed. Further, the process C (520) occupies the domain “2”, and the domain “6” is processed by the process A (50).
0) and process B (510) in common, domain "7"
Is shared with process D (530).

【0005】図7に、従来のメモリ保護方法のフローチ
ャートを示す。本実施例では、仮想記憶装置における仮
想アドレスを物理アドレスへ変換するアドレス変換処理
と合わせて、メモリ保護が検査される。そのため、主記
憶装置にあるアドレス変換テーブルまたはアドレス変換
を高速に行うために設けられたTLB(テーブル・ルッ
クアサイド・バッファ)内の各ページ(メモリブロッ
ク)のアドレス変換情報内に当該ページが属するドメイ
ン番号が含まれている。従来のメモリ保護方法において
は、あるプロセスがある仮想アドレスのデータをアクセ
スする場合、上述したアドレス変換テーブルやTLBに
よって当該仮想アドレスに対するページのアドレス変換
情報を検索し、仮想アドレスに対応する物理アドレスと
ともに当該ページの属するドメイン番号を求める(ステ
ップ600)。そして求めた当該アドレス変換情報内の
ドメイン番号に対して当該プロセスのドメインアクセス
制御フィールド(DAC)内サブ・フィールドがアクセ
ス許可を示している場合(同じドメイン番号を持ってい
る場合)は当該ドメインへのアクセスを許可する(ステ
ップ610)。図では省略されているが、ドメインアク
セスが許可された場合は、さらにアクセス制御ビットの
詳細な内容を参照し、読み出し、書き込み、実行などア
クセス種別毎のアクセス可否のチェックが行われる。当
該ドメインアクセス制御フィールド内サブ・フィールド
がアクセス禁止を示している場合(同じドメイン番号を
持っていない場合)は不当メモリアクセスに関する割込
みを起こし、当該ドメインへのアクセスを中断させる
(ステップ620)。以上述べた従来のメモリ保護方法
により、1プロセスが2つ以上の共用ドメインを有する
ことができる。以上の従来メモリ保護方法を有するメモ
リ管理装置は、例えばスーパーアスキー Vol.3 No.10
(1992年10月)86頁(Super ASCII, Vol.3 No.
10(October 1992) pp.86)に記載されている。
FIG. 7 shows a flowchart of a conventional memory protection method. In this embodiment, the memory protection is checked together with the address conversion process for converting the virtual address in the virtual storage device into the physical address. Therefore, the address translation table in the main memory or the domain to which the page belongs in the address translation information of each page (memory block) in the TLB (table lookaside buffer) provided for high-speed address translation. The number is included. In the conventional memory protection method, when a process accesses data of a certain virtual address, the address translation information of the page for the virtual address is searched by the address translation table or TLB described above, and the physical address corresponding to the virtual address is retrieved. The domain number to which the page belongs is determined (step 600). If the sub-field in the domain access control field (DAC) of the process indicates access permission to the obtained domain number in the address translation information (if it has the same domain number), the domain is changed to the domain. Access is permitted (step 610). Although not shown in the figure, when the domain access is permitted, further detailed contents of the access control bit are referred to, and whether the access is permitted or not is checked for each access type such as read, write, and execute. When the sub-field in the domain access control field indicates access prohibition (when they do not have the same domain number), an interrupt related to the illegal memory access is generated and the access to the domain is interrupted (step 620). With the conventional memory protection method described above, one process can have two or more shared domains. A memory management device having the above conventional memory protection method is disclosed in, for example, Super ASCII Vol.3 No.10.
(October 1992) Page 86 (Super ASCII, Vol.3 No.
10 (October 1992) pp.86).

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上述し
た従来のメモリ保護方法では、ドメインアクセス制御フ
ィールド(DAC)の長さによって一時期に生成できる
ドメイン総数または一度に実行できるプロセス総数が制
限される。例えば、図5のドメインアクセス制御フィー
ルド(DAC)の例では、ドメイン“0”からドメイン
“7”までの最大8個までに制限される。従って、当該
一時期に生成できるドメイン総数または一度に実行でき
るプロセス総数を増加させるためにはドメインアクセス
制御フィールドを長くしてサブ・フィールドの数を増や
さなければならないが、そうすると、全ドメインアクセ
ス制御フィールドを格納するためのハードウェア量が増
加してしまうという問題点がある。
However, in the above-mentioned conventional memory protection method, the total number of domains that can be generated at one time or the total number of processes that can be executed at one time is limited by the length of the domain access control field (DAC). For example, in the example of the domain access control field (DAC) of FIG. 5, the maximum number of domain “0” to domain “7” is limited to eight. Therefore, in order to increase the total number of domains that can be created at one time or the total number of processes that can be executed at one time, the domain access control field must be lengthened to increase the number of sub-fields. There is a problem that the amount of hardware for storing increases.

【0007】上述した図5および図6を用いて、本問題
点をさらに具体的に説明する。図5に示したように、ド
メインアクセス制御フィールドの各サブ・フィールドを
ドメイン“0”〜“7”に対応させ、一時期に生成でき
るドメイン数は最大8個とする。この場合、図6のよう
にプロセスA(500)〜プロセスF(550)の6個
のプロセスが起動され、それぞれが占有するドメインと
してドメイン番号“0”〜“5”が割り付けられてお
り、また、プロセスA(500)とプロセスC(52
0)がドメイン“6”を共有し、プロセスC(520)
とプロセスD(530)がドメイン“7”を共有してい
る場合、一時期に生成できる8個のドメイン番号は全て
が使用されており、空いているドメイン番号は存在しな
い。この状態で、プロセスE(540)とプロセスF
(550)との間で共用されるドメイン(590)を生
成しようとする場合、既に空きドメイン番号がないので
共用ドメイン590を新たに生成することはできない。
またプロセスG(560)のように、新たなプロセスを
起動しようとする場合、既に空きドメイン番号がないた
めにプロセス固有ドメインですら生成することができな
いので、起動中プロセスがドメインを解放するまではこ
れ以上の新たなプロセスを起動することもできない。こ
のようなドメイン番号不足を解消するには、ドメインア
クセス制御フィールドをより長くしてサブ・フィールド
を増やし、より多くのドメインを一時期に生成できるよ
うにする必要がある。
This problem will be described more specifically with reference to FIGS. 5 and 6 described above. As shown in FIG. 5, each sub-field of the domain access control field is associated with domains “0” to “7”, and the maximum number of domains that can be generated at one time is eight. In this case, as shown in FIG. 6, six processes A (500) to F (550) are activated, and domain numbers “0” to “5” are assigned as the domains occupied by the respective processes. , Process A (500) and Process C (52
0) shares domain “6” and process C (520)
And the process D (530) share the domain “7”, all the eight domain numbers that can be generated at one time are used and there is no free domain number. In this state, process E (540) and process F
When attempting to generate a domain (590) shared with (550), a new shared domain 590 cannot be generated because there is no free domain number already.
When a new process such as process G (560) is to be started, even a process-specific domain cannot be created because there is no free domain number already. Therefore, until the starting process releases the domain. It is not possible to start any new process. In order to eliminate such shortage of domain numbers, it is necessary to lengthen the domain access control field and increase the number of subfields so that more domains can be generated at one time.

【0008】具体的に説明すると、従来技術における全
ドメインアクセス制御フィールドのために必要なハード
ウェア量は次のようになる。 1サブ・フィールドのハードウェア量×最大ドメイン総
数 ここで、サブ・フィールドとは、ドメインアクセス制御
フィールド内サブ・フィールドのことである。上式から
わかるように、従来技術では一時期に生成できるドメイ
ン数を増加するためにドメインアクセス制御フィールド
が長くした分だけ、ドメインアクセス制御フィールドに
必要なハードウェア量が増大してしまうという問題があ
った。本発明の目的は、ハードウェア量の増加を抑さえ
つつ、ドメインアクセス制御フィールドの長さに直接関
係なく、一時期に生成できるプロセス固有ドメインの総
数を増加することが可能なメモリ保護方法およびその装
置を提供することにある。
More specifically, the amount of hardware required for the all domain access control field in the prior art is as follows. Hardware amount of one sub-field x maximum total number of domains Here, the sub-field is a sub-field in the domain access control field. As can be seen from the above equation, the conventional technology has a problem in that the amount of hardware required for the domain access control field increases as the domain access control field lengthens to increase the number of domains that can be generated at one time. It was An object of the present invention is to provide a memory protection method and apparatus capable of increasing the total number of process-specific domains that can be generated at one time regardless of the length of the domain access control field while suppressing an increase in the amount of hardware. To provide.

【0009】[0009]

【課題を解決するための手段】本発明のメモリ保護方法
は、メモリをメモリブロックの集合からなる複数のドメ
インに区分けし、プロセス毎に当該プロセスが占有して
使用する固有ドメインであることを示す固有ドメイン情
報(図3の301〜331および図4の341〜371
に対応)と他のプロセスと共用して使用する共用ドメイ
ンであることを示す共用ドメイン情報(図3の302〜
332および図4の342〜372に対応)とからなる
ドメイン・アクセス権情報を付随させ、メモリブロック
毎にそれが属するドメインを識別するドメイン情報(図
2の201)を付随させ、ドメイン・アクセス権情報と
ドメイン情報とによって不当なメモリアクセスを抑止す
ることを特徴とするものであり、プロセスがメモリブロ
ックをアクセスする際、当該メモリブロックが当該プロ
セスの固有ドメインに属するか否かを判定し(図1のス
テップ110)、当該メモリブロックが当該プロセスの
固有ドメインに属していると判定された場合に当該アク
セスを許可し、当該メモリブロックが当該プロセスの固
有ドメインに属していないと判定された場合には、さら
に当該メモリブロックが当該プロセスの共用ドメインに
属しているか否かを判定し(同ステップ120)、当該
メモリブロックが当該プロセスの共用ドメインに属して
いると判定された場合に当該アクセスを許可し、当該メ
モリブロックが当該プロセスの共用ドメインに属してい
ないと判定された場合に当該メモリブロックへのアクセ
スを禁止することを特徴としている。
According to the memory protection method of the present invention, the memory is divided into a plurality of domains each consisting of a set of memory blocks, and it is shown that each process is a unique domain occupied and used by the process. Unique domain information (301 to 331 in FIG. 3 and 341 to 371 in FIG. 4)
Shared domain information (indicated by 302 in FIG. 3)
332 and 342 to 372 in FIG. 4), and domain information (201 in FIG. 2) for identifying the domain to which each memory block belongs, and domain access right information. Unauthorized memory access is suppressed by information and domain information, and when a process accesses a memory block, it is determined whether the memory block belongs to the unique domain of the process (Fig. 1) 110), permitting the access when the memory block is determined to belong to the unique domain of the process, and determining that the memory block does not belong to the unique domain of the process. Whether the memory block belongs to the shared domain of the process. The determination is made (step 120), the access is permitted when it is determined that the memory block belongs to the shared domain of the process, and it is determined that the memory block does not belong to the shared domain of the process. In this case, access to the memory block is prohibited.

【0010】また本発明のメモリ保護装置は、アクセス
するプロセスが固有するドメインの識別子を格納するプ
ロセス固有ドメイン識別子レジスタ(図3の301〜3
31および図4の341〜371に対応)と、各メモリ
ブロックと、各メモリブロックが属するドメインとを対
応付けるメモリブロック・ドメイン間対応手段(例え
ば、仮想記憶装置におけるTLB;図2の200)と、
アクセスされるメモリブロックが属するドメインがアク
セスするプロセスの固有ドメインであるかどうか判別す
る固有ドメイン判別手段(図2の220)と、アクセス
される当該ドメインが共用ドメインであるかどうか判別
する共用ドメイン判別手段(図2の230)と、アクセ
スされる当該ドメインがアクセスする当該プロセスの固
有ドメインでなくかつ当該プロセスがアクセス可能な共
用ドメインでもない場合は不当メモリアクセス割込みを
発生させる不当メモリアクセス割込み制御手段(図2の
250)とを具備したことを特徴としている。
The memory protection device of the present invention also includes a process-specific domain identifier register (301 to 301 in FIG. 3) for storing the identifier of the domain unique to the accessing process.
31 and 341 to 371 in FIG. 4), and memory block / domain correspondence means (for example, TLB in the virtual memory; 200 in FIG. 2) that associates each memory block with the domain to which each memory block belongs,
Unique domain determining means (220 in FIG. 2) for determining whether the domain to which the accessed memory block belongs is a unique domain of the accessing process, and shared domain determination for determining whether the accessed domain is a shared domain Means (230 in FIG. 2) and an illegal memory access interrupt control means for generating an illegal memory access interrupt when the domain to be accessed is neither the unique domain of the process to be accessed nor the shared domain accessible to the process. (250 in FIG. 2).

【0011】[0011]

【作用】本発明によれば、プロセス毎に当該プロセスが
占有して使用する固有ドメインであることを示す固有ド
メイン情報と他のプロセスと共用して使用する共用ドメ
インであることを示す共用ドメイン情報とからなるドメ
イン・アクセス権情報をを持たせ、これとアクセスされ
る各メモリブロックが持っているドメイン情報とを照合
することによってドメイン保護検査をするようにしたこ
とにより、一時期に生成できる全ドメイン総数をプロセ
スのドメイン番号を保持するプロセス固有ドメイン番号
フィールド(PSWの一部となる図2の211に対応)
の長さにより、また一時期に生成できる共用ドメイン総
数をドメインアクセス制御フィールド(図5のDACに
対応)により規定されるようにした。これによりハード
ウェア総量の増加を抑さえつつ、ドメインアクセス制御
フィールドの長さに直接関係なく、一時期に生成できる
プロセス固有ドメインの総数を増加することが可能にな
った。
According to the present invention, for each process, unique domain information indicating that the process is occupied and used by the process and shared domain information indicating that the process is shared by other processes. All the domains that can be generated at one time by having the domain access right information consisting of and performing the domain protection check by collating this with the domain information of each memory block to be accessed. Process-specific domain number field that holds the total domain number of the process (corresponding to 211 in FIG. 2, which is a part of PSW)
, And the total number of shared domains that can be generated at one time is defined by the domain access control field (corresponding to the DAC in FIG. 5). This makes it possible to increase the total number of process-specific domains that can be generated at one time regardless of the length of the domain access control field while suppressing the increase in the total amount of hardware.

【0012】[0012]

【実施例】以下に、本発明の一実施例を示す。本実施例
でのドメインアクセス制御フィールド(DAC)は先の
図5に示した制御コードと同じものとする。すなわち、
一時期に生成できる共用ドメインの総数は8個とする。
本実施例でのドメイン識別子は8ビットの正の整数と
し、これをドメイン番号と呼ぶ。つまり、ドメイン番号
は0〜255の範囲にあるものとする。8個の共用ドメ
インにはドメイン番号0〜7を割り付け、残るドメイン
番号8〜255はプロセス固有ドメインに割り付ける。
つまり、一時期に生成できるプロセス固有ドメインの総
数は248個である。従来技術の説明と同様に、仮想ア
ドレスを物理アドレスへ変換するアドレス変換と合わせ
て、メモリ保護が検査されるものとする。そのために、
従来例と同様に、主記憶装置にあるアドレス変換テーブ
ルまたはアドレス変換を高速に行うために設けられたT
LB(テーブル・ルックアサイド・バッファ内の各ペー
ジ(メモリブロック)のアドレス変換情報には、当該ペ
ージが属するドメイン番号が含まれているものとする。
EXAMPLE An example of the present invention will be described below. The domain access control field (DAC) in this embodiment is the same as the control code shown in FIG. That is,
The total number of shared domains that can be created at one time is eight.
The domain identifier in this embodiment is an 8-bit positive integer, which is called a domain number. That is, the domain number is in the range of 0 to 255. Domain numbers 0 to 7 are assigned to the eight shared domains, and the remaining domain numbers 8 to 255 are assigned to the process-specific domain.
That is, the total number of process-specific domains that can be generated at one time is 248. Similar to the description of the prior art, it is assumed that the memory protection is checked together with the address conversion that converts a virtual address into a physical address. for that reason,
Similar to the conventional example, the address conversion table in the main memory or the T provided for high-speed address conversion is provided.
It is assumed that the address translation information of each page (memory block) in the LB (table lookaside buffer) includes the domain number to which the page belongs.

【0013】次に、本発明のメモリ保護方法の一実施例
を説明する。図1は、本実施例の処理手順を示すフロー
チャートである。各プロセスはプロセス固有のドメイン
番号を保持するプロセス固有ドメイン番号フィールドと
複数のプロセス間で共用の共用ドメイン番号を保持する
ドメインアクセス制御フィールド(従来例における図5
に示したものと同じ構成でよい)を有している。あるプ
ロセスがある仮想アドレスのデータをアクセスする場
合、アドレス変換テーブルまたはTLBを該仮想アドレ
スによって検索し、該仮想アドレスに対応するアドレス
変換情報(物理アドレス、ドメイン番号など)を求める
(ステップ100)。こうして求めた当該アドレス変換
情報内のドメイン番号と当該プロセスのプロセス固有ド
メイン番号フィールド内のプロセス固有ドメイン番号と
が等しいかどうかを判定する(ステップ110)。アド
レス変換情報内のドメイン番号と当該プロセスのプロセ
ス固有ドメイン番号フィールド内のプロセス固有ドメイ
ン番号が等しい場合、すなわち、アクセスされる当該デ
ータが当該プロセスの固有ドメイン内にある場合は、当
該アクセスは許可される(ステップ110;NO)。
Next, an embodiment of the memory protection method of the present invention will be described. FIG. 1 is a flowchart showing the processing procedure of this embodiment. Each process has a process-specific domain number field that holds a process-specific domain number and a domain access control field that holds a shared domain number shared by a plurality of processes (see FIG.
The same configuration as that shown in FIG. When a process accesses data at a virtual address, the address translation table or TLB is searched by the virtual address, and address translation information (physical address, domain number, etc.) corresponding to the virtual address is obtained (step 100). It is determined whether the domain number in the address translation information thus obtained is equal to the process unique domain number in the process unique domain number field of the process (step 110). If the domain number in the address translation information and the process-specific domain number in the process-specific domain number field of the process are equal, that is, if the data to be accessed is in the process-specific domain, the access is permitted. (Step 110; NO).

【0014】当該アドレス変換情報内ドメイン番号と当
該プロセス固有ドメイン番号とが異なる場合には、次
に、当該アドレス変換情報内ドメイン番号が0以上7以
下か否かを判定する(ステップ120)。アドレス変換
情報内ドメイン番号が0以上7以下ならば、すなわちア
クセスされる当該データがいずれかの共用ドメイン内に
存在するならば、図7のステップ610に示された従来
技術によるドメイン保護検査と同様のドメイン保護検査
が、共用ドメイン番号を保持するドメインアクセス制御
フィールドに対して実行される(ステップ130)。ス
テップ120でNO(当該アドレス変換情報内ドメイン
番号が“8”以上)と判定された場合、すなわちアクセ
スされる当該データが他プロセスの固有ドメイン内に存
在する場合、およびステップ130におけるドメイン保
護検査においてアクセス禁止を示している場合には、不
当なメモリアクセスに関する割込みを発生させ、当該ア
クセスを中断する(ステップ140)。
If the domain number in the address translation information is different from the process-specific domain number, then it is determined whether the domain number in the address translation information is 0 or more and 7 or less (step 120). If the domain number in the address translation information is 0 or more and 7 or less, that is, if the data to be accessed exists in any of the shared domains, it is the same as the conventional domain protection check shown in step 610 of FIG. Domain protection check is performed on the domain access control field holding the shared domain number (step 130). When it is determined as NO (the domain number in the address translation information is "8" or more) in step 120, that is, when the data to be accessed exists in the unique domain of another process, and in the domain protection check in step 130. If the access is prohibited, an interrupt relating to an illegal memory access is generated and the access is interrupted (step 140).

【0015】次に、図3および図4を用いて本実施例を
さらに具体的に説明する。図3および図4において、各
プロセスA〜Hは、当該プロセスが固有に使用できるド
メインを示すプロセス固有ドメイン番号フィールド30
1〜371および共用ドメインを示すドメインアクセス
制御フィールド302〜372をそれぞれ具備してい
る。例えば、図3の例では、プロセスB(310)は、
プロセス固有ドメイン番号フィールド311に“21”
を保持し、ドメインアクセス制御フィールド312に
“0”を保持している。プロセスB(310)がメモリ
をアクセスする場合、仮想アドレスでTLB(またはア
ドレス変換テーブル)を検索し(図1のステップ10
0)、仮想アドレスを対応するアドレス変換情報中の物
理アドレスに変換する。その際、アドレス変換情報内の
ドメイン番号とプロセス固有ドメイン番号フィールド3
11内のドメイン番号“21”と比較する。アドレス変
換情報内のドメイン番号が“21”であれば、両者は一
致する(ステップ110;NO)、すなわち、プロセス
B(310)の固有のドメインであると見なされ当該ア
クセスは許可される。アドレス変換情報内のドメイン番
号が“0”であれば、両者は一致しない(ステップ11
0;YES)。すなわち、ドメイン“0”はプロセスB
(310)の固有ドメインではない。この場合は、次
に、アドレス変換情報内のドメイン番号が“0”以上か
つ“7”以下か否かを判定する(ステップ120)。今
の場合、ドメイン番号“0”はこの範囲に入るので共用
ドメインと見なされ(ステップ120;YES)、プロ
セスBの共用ドメインを示すドメインアクセス制御フィ
ールド312を用いて従来技術と同様のドメイン保護検
査が行われる(ステップ130)。プロセスBのドメイ
ンアクセス制御フィールド312はドメイン番号“0”
を保持しているため、該アドレス変換情報内のドメイン
番号で示されたドメインはプロセスB(310)の共用
ドメインであり(ステップ130;YES:ドメイン保
護検査合格)、当該アクセスは許可される。アドレス変
換情報内のドメイン番号が、例えば“22”の場合に
は、当該ドメインはプロセスB(310)の固有のドメ
イン(“21”≠“22”)でも共用ドメインでもない
(“22”は“0”以上かつ“7”以下でない)ので
(ステップ120;NO)、不当アクセス割込みが発生
し、当該アクセスは中断される(ステップ140)。
Next, this embodiment will be described more specifically with reference to FIGS. 3 and 4. 3 and 4, each process A to H has a process unique domain number field 30 indicating a domain that can be uniquely used by the process.
1 to 371 and domain access control fields 302 to 372 indicating a shared domain, respectively. For example, in the example of FIG. 3, the process B (310) is
"21" in the process-specific domain number field 311
And the domain access control field 312 holds “0”. When the process B (310) accesses the memory, the TLB (or the address translation table) is searched by the virtual address (step 10 in FIG. 1).
0), translate the virtual address to the physical address in the corresponding address translation information. At that time, the domain number in the address translation information and the process-specific domain number field 3
It is compared with the domain number “21” in 11. If the domain number in the address translation information is "21", the two match (step 110; NO), that is, it is regarded as the unique domain of the process B (310), and the access is permitted. If the domain number in the address translation information is "0", they do not match (step 11).
0; YES). That is, domain "0" is process B
It is not the unique domain of (310). In this case, next, it is determined whether the domain number in the address translation information is "0" or more and "7" or less (step 120). In this case, since the domain number "0" falls within this range, it is regarded as a shared domain (step 120; YES), and the domain access control field 312 indicating the shared domain of the process B is used to perform the same domain protection check as in the prior art. Is performed (step 130). The domain access control field 312 of the process B is the domain number "0".
Since this holds, the domain indicated by the domain number in the address translation information is the shared domain of the process B (310) (step 130; YES: domain protection inspection passed), and the access is permitted. When the domain number in the address translation information is, for example, “22”, the domain is neither the unique domain of the process B (310) (“21” ≠ “22”) nor the shared domain (“22” is “ Since it is not less than 0 "and not less than" 7 "(step 120; NO), an illegal access interrupt occurs and the access is interrupted (step 140).

【0016】次に、本発明のメモリ保護装置の一実施例
を説明する。図2に、本実施例のメモリ保護装置を示
す。同図において、201はTLB(またはアドレス変
換テーブル)中のアドレス変換情報内に含まれるドメイ
ン番号のフィールドを示すものであり、本実施例では、
アドレス変換情報内ドメイン番号フィールド201はT
LB(またはアドレス変換バッファ)200の一部分と
する。該アドレス変換情報内ドメイン番号フィールドの
ドメイン番号は、当該アドレス変換されたページが属す
るドメイン番号を示している。211は、プロセス切り
換え時にそのプロセス固有ドメイン番号フィールド(3
01〜371)のプロセス固有ドメイン番号を格納する
フィールドである。本実施例では、プロセス固有ドメイ
ン番号フィールド211はプロセス状態語(PSW)2
10の一部分とする。アドレス変換情報内ドメイン番号
フィールド201およびプロセス固有ドメイン番号フィ
ールド211はそれぞれ8ビットから構成されているも
のとする。220は、アドレス変換情報内ドメイン番号
フィールド201の内容(DT)とプロセス固有ドメイ
ン番号フィールド211の内容(DP)とが等しいかど
うか比較する比較器である。該比較器220の出力両者
が等しいをことを示していれば、アクセスするプロセス
自身の固有ドメインに対するアクセスであり、この場合
は当該ドメインへのアクセスは許可される(ドメイン保
護検査結果が合格)。ドメインアクセスが許可される
と、さらに、アクセス制御ビット(例えば、2ビット)
によるアクセス権チェックが行われ、読み出し、書き込
み、実行などアクセス種別毎のアクセス可否のチェック
が行われる。
Next, an embodiment of the memory protection device of the present invention will be described. FIG. 2 shows a memory protection device of this embodiment. In the figure, reference numeral 201 denotes a domain number field included in the address translation information in the TLB (or address translation table). In this embodiment,
The domain number field 201 in the address translation information is T
It is a part of the LB (or address translation buffer) 200. The domain number in the domain number field in the address translation information indicates the domain number to which the address-translated page belongs. 211 indicates a process unique domain number field (3
0 to 371) is a field for storing the process unique domain number. In this embodiment, the process-specific domain number field 211 is the process state word (PSW) 2
Part of 10. It is assumed that the domain number field 201 in the address translation information and the process-specific domain number field 211 are each composed of 8 bits. A comparator 220 compares the contents (DT) of the domain number field 201 in the address translation information with the contents (DP) of the process-specific domain number field 211 for equality. If both outputs of the comparator 220 indicate that they are equal, the access is to the unique domain of the accessing process itself, and in this case, access to the domain is permitted (the domain protection inspection result is passed). If domain access is granted, access control bits (eg, 2 bits) are also added.
Access right check is performed, and the access permission / prohibition is checked for each access type such as read, write, and execute.

【0017】比較器220での比較の結果、アドレス変
換情報内ドメイン番号フィールド201の内容(DT)
とプロセス固有ドメイン番号フィールド211の内容
(DP)とが等しくない場合、アドレス変換情報内ドメ
イン番号フィールド201の内容(DT)が“0”以上
かつ“7”以下であるかどうか判断するデコーダ230
を能動化(イネーブル)する。デコーダ230での判断
の結果、アドレス変換情報内ドメイン番号フィールド2
01の内容(DT)が0以上かつ7以下でなければ不当
アクセス割込み制御部250により不当アクセス割込み
を行い、アクセスを中断する。デコーダ230での判断
結果、アドレス変換情報内ドメイン番号フィールド20
1の内容(DT)が“0”以上かつ“7”以下であれ
ば、ドメイン保護検査部240の比較器241により、
プロセス切り換え時にプロセスのドメインアクセス制御
フィールドから取り込んだ当該プロセスの共用ドメイン
番号(DAC;図5)とアドレス変換情報内ドメイン番
号フィールド201の内容(DT)とを比較する。比較
器241での比較の結果、両者が等しければ(ドメイン
保護検査結果が合格)、アクセスするプロセスの共有ド
メインに対するアクセスであるから、当該ドメインへの
アクセスは許可される。比較器241での比較の結果、
両者が等しくなければ(ドメイン保護検査結果が不合
格)、アドレス変換情報内ドメイン番号フィールド20
1の内容(ドメインDT)は、アクセスするプロセスの
固有のドメインでもなく共有ドメインでもないのでアク
セスは禁止され、不当アクセス割込み制御部250によ
り不当アクセス割込み制御を行う。
As a result of the comparison in the comparator 220, the contents (DT) of the domain number field 201 in the address translation information
And the content (DP) of the process-specific domain number field 211 are not equal, the decoder 230 that determines whether the content (DT) of the domain number field 201 in the address translation information is "0" or more and "7" or less
To enable. As a result of the determination by the decoder 230, the domain number field 2 in the address translation information
If the content (DT) of 01 is not less than 0 and not more than 7, the illegal access interrupt control unit 250 issues an illegal access interrupt to interrupt the access. As a result of the judgment by the decoder 230, the domain number field 20 in the address translation information
If the content (DT) of 1 is "0" or more and "7" or less, the comparator 241 of the domain protection checking unit 240
The shared domain number (DAC; FIG. 5) of the process fetched from the domain access control field of the process at the time of process switching is compared with the content (DT) of the domain number field 201 in the address translation information. As a result of the comparison in the comparator 241, if the two are equal (the domain protection inspection result is passed), the access is to the shared domain of the process to be accessed, and thus the access to the domain is permitted. As a result of the comparison by the comparator 241,
If they are not equal (domain protection inspection result is unsuccessful), the domain number field 20 in the address translation information
Since the content of 1 (domain DT) is neither a unique domain of the accessing process nor a shared domain, access is prohibited, and the illegal access interrupt control unit 250 controls the illegal access interrupt.

【0018】上記実施例によると、従来技術より少ない
ハードウェア量で、より多数のドメインに対するメモリ
保護が可能となる。このことを定量的に説明する。従来
のハードウェア量は次の通りである。 1サブ・フィールドのハードウェア量×最大ドメイン総
数 本発明のハードウェア量は次の通りである。 1サブ・フィールドのハードウェア量×最大共用ドメイ
ン総数 および Log2(最大ドメイン総数)ビットのハードウェア量 ここで、上記サブ・フィールドとは、ドメインアクセス
制御フィールド内サブ・フィールドのことである。な
お、最大ドメイン総数とは、一時期に生成できる固有ド
メインと一時期に生成できる共用ドメインとを合わせた
全ドメインの総数のことであり、上記最大共用ドメイン
総数とは、一時期に生成できる共用ドメインの総数のこ
とである。
According to the above embodiment, it is possible to protect the memory for a larger number of domains with a smaller amount of hardware than the prior art. This will be described quantitatively. The conventional hardware amount is as follows. Hardware amount of one sub-field x maximum total number of domains The hardware amount of the present invention is as follows. Hardware amount of 1 sub-field × maximum shared domain total number and hardware amount of Log2 (maximum domain total number) bits Here, the sub-field is a sub-field in the domain access control field. Note that the maximum total number of domains is the total number of all domains including unique domains that can be generated at one time and shared domains that can be generated at one time, and the maximum total number of shared domains is the total number of shared domains that can be generated at one time. That is.

【0019】例えば、各サブ・フィールドが上述したよ
うに2ビットで構成される場合を考える。この場合、全
ハードウエア量(ビット数)のいくつかの値に対する従
来技術における最大ドメイン総数(一時期に生成できる
固有ドメイン数と一時期に生成できる共用ドメイン数の
和)と本発明における最大共用ドメイン総数と、最大固
有ドメイン総数(一時期に生成できる固有ドメイン総
数)、および最大ドメイン総数は、例えば、図8に示し
たようになる。この図から、ハードウェア量を固定した
場合、本発明では最大共用ドメイン総数を少なくする
と、最大ドメイン総数を従来技術での最大ドメイン総数
よりも大幅に大きくすることができることがわかる。ま
た、最大ドメイン総数と比べて最大共用ドメイン総数が
ある程度小さい場合、本発明によるメモリ保護のための
ハードウェア量は従来技術によるものより少なくできる
ことがわかる。
For example, consider the case where each sub-field is composed of 2 bits as described above. In this case, the maximum total number of domains (the sum of the number of unique domains that can be generated at one time and the number of shared domains that can be generated at one time) and the maximum total number of shared domains according to the present invention for some values of the total hardware amount (bit number) The maximum total number of unique domains (total number of unique domains that can be generated at one time) and the maximum total number of domains are as shown in FIG. 8, for example. From this figure, when the amount of hardware is fixed, it can be seen that in the present invention, if the maximum total number of shared domains is reduced, the maximum total number of domains can be made significantly larger than the maximum total number of domains in the prior art. Further, when the maximum total number of shared domains is somewhat smaller than the maximum total number of domains, the amount of hardware for memory protection according to the present invention can be smaller than that according to the prior art.

【0020】[0020]

【発明の効果】本発明によれば、ハードウェア量の増加
を抑さえつつ、ドメインアクセス制御フィールド(DA
C)の長さには直接関係なく、一時期に生成できるプロ
セス固有ドメインの総数および最大ドメイン総数を大幅
に増加させることが可能になる。
According to the present invention, the domain access control field (DA) is suppressed while suppressing an increase in the amount of hardware.
It becomes possible to significantly increase the total number of process-specific domains and the maximum total number of domains that can be generated at one time regardless of the length of C).

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明のメモリ保護方法の一実施例の手順を示
すフローチャートである。
FIG. 1 is a flowchart showing a procedure of an embodiment of a memory protection method of the present invention.

【図2】本発明のメモリ保護装置の一実施例を示す構成
図である。
FIG. 2 is a configuration diagram showing an embodiment of a memory protection device of the present invention.

【図3】本発明によるメモリ保護の概念を説明する説明
図である。
FIG. 3 is an explanatory diagram illustrating a concept of memory protection according to the present invention.

【図4】本発明によるメモリ保護の概念を説明する説明
図である(続き)。
FIG. 4 is an explanatory diagram illustrating a concept of memory protection according to the present invention (continued).

【図5】ドメインアクセス制御フィールドの例を示す説
明図である。
FIG. 5 is an explanatory diagram showing an example of a domain access control field.

【図6】従来技術によるメモリ保護の概念を説明する説
明図である。
FIG. 6 is an explanatory diagram illustrating a concept of memory protection according to a conventional technique.

【図7】従来技術のメモリ保護方法の手順を示すフロー
チャートである。
FIG. 7 is a flowchart showing a procedure of a conventional memory protection method.

【図8】従来技術と本発明における総ハードウエア量と
ドメイン数の比較図である。
FIG. 8 is a comparison diagram of the total amount of hardware and the number of domains in the related art and the present invention.

【符号の説明】[Explanation of symbols]

100〜140…本発明のメモリ保護方法の一実施例の
手順、200…アドレス変換バッファ(TLB)、20
1…アドレス変換情報内ドメイン番号フィールド、21
0…プロセス状態語(PSW)、211…プロセス固有
ドメイン番号フィールド、220、241…比較器、2
30…デコーダ、240…ドメイン保護検査部、250
…不当アクセス割込み制御部、300、310、32
0、330、340、350、360、370、50
0、510、520、530、540、550、および
560…プロセス、301、311、321、331、
341、351、361、および371…プロセス固有
ドメイン番号フィールド、302、312、322、3
32、342、352、362、372、400、50
2、512、522、532、542、552、および
562…ドメインアクセス制御フィールド、380〜3
85、390〜395、580〜585、および590
〜594…ドメイン、410〜417…ドメインアクセ
ス制御フィールド内サブ・フィールド、600および6
10…従来技術のメモリ保護方法の手順
100 to 140 ... Procedure of one embodiment of the memory protection method of the present invention, 200 ... Address translation buffer (TLB), 20
1 ... Domain number field in address translation information, 21
0 ... Process status word (PSW), 211 ... Process unique domain number field, 220, 241 ... Comparator, 2
30 ... Decoder, 240 ... Domain protection inspection unit, 250
... Illegal access interrupt control unit, 300, 310, 32
0, 330, 340, 350, 360, 370, 50
0, 510, 520, 530, 540, 550, and 560 ... Process, 301, 311, 321, 331,
341, 351, 361, and 371 ... Process-specific domain number field, 302, 312, 322, 3
32, 342, 352, 362, 372, 400, 50
2, 512, 522, 532, 542, 552, and 562 ... Domain access control field, 380-3
85, 390-395, 580-585, and 590
... 594 ... Domain, 410-417 ... Subfield in domain access control field, 600 and 6
10 ... Procedure of Prior Art Memory Protection Method

───────────────────────────────────────────────────── フロントページの続き (72)発明者 川崎 郁也 東京都小平市上水本町五丁目20番1号 株 式会社日立製作所半導体事業部内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Ikuya Kawasaki 5-20-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Incorporated company Hitachi Ltd. Semiconductor Division

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 それぞれがメモリブロックの集合からな
る複数のドメインにメモリを区分けし、プロセス毎に当
該プロセスが占有して使用する固有ドメインであること
を示す固有ドメイン情報と他のプロセスと共用して使用
する共用ドメインであることを示す共用ドメイン情報と
からなるドメイン・アクセス権情報を付随させるととも
に、メモリブロック毎にそれが属するドメインを識別す
るドメイン情報を付随させ、該ドメイン・アクセス権情
報と該ドメイン情報とによって不当なメモリアクセスを
抑止するメモリ保護方法であって、 あるプロセスがあるメモリブロックをアクセスする際、 当該メモリブロックが当該プロセスの固有ドメインに属
するか否かを判定する第1の判定ステップと、 上記第1の判定ステップにおいて、当該メモリブロック
が当該プロセスの固有ドメインに属していると判定され
た場合に当該アクセスを許可するステップと、 上記第1の判定ステップにおいて、当該メモリブロック
が当該プロセスの固有ドメインに属していないと判定さ
れた場合に、さらに当該メモリブロックが当該プロセス
の共用ドメインに属しているか否かを判定する第2の判
定ステップと、 上記第2の判定ステップにおいて、当該メモリブロック
が当該プロセスの共用ドメインに属していると判定され
た場合に当該アクセスを許可するステップと、 上記第2の判定ステップにおいて、当該メモリブロック
が当該プロセスの共用ドメインに属していないと判定さ
れた場合に当該メモリブロックへのアクセスを禁止する
ステップとからなることを特徴とするメモリ保護方法。
1. The memory is divided into a plurality of domains each consisting of a set of memory blocks, and the unique domain information indicating that the unique domain is occupied and used by the process and shared with other processes. Domain access right information consisting of shared domain information indicating that it is a shared domain to be used for each memory block, and domain information for identifying the domain to which each memory block belongs, and the domain access right information. A first aspect of the present invention is a memory protection method for suppressing an illegal memory access according to the domain information, wherein when a process accesses a memory block, a first process determines whether the memory block belongs to a unique domain of the process. In the determination step and the first determination step, the memory In the step of permitting the access when it is determined that the block belongs to the unique domain of the process, and in the first determining step, it is determined that the memory block does not belong to the unique domain of the process. In this case, the memory block belongs to the shared domain of the process in the second determination step of determining whether the memory block belongs to the shared domain of the process, and the second determination step. If it is determined that the memory block does not belong to the shared domain of the process in the second determination step, the access to the memory block is prohibited. A memory protection method comprising the steps of:
【請求項2】 請求項1記載のメモリ保護方法におい
て、 上記第1の判定ステップは、上記アクセスするプロセス
のドメイン・アクセス権情報と、アクセスされるメモリ
ブロックのドメイン情報とを比較することによって行わ
れることを特徴とするメモリ保護方法。
2. The memory protection method according to claim 1, wherein the first determining step is performed by comparing the domain access right information of the accessing process with the domain information of the accessed memory block. A memory protection method characterized by being exposed.
【請求項3】 請求項1または2記載のメモリ保護方法
において、上記メモリブロックのドメイン情報は、仮想
記憶装置におけるアドレス変換用のアドレス変換テーブ
ルまたはTLB(テーブル・ルックアサイド・バッフ
ァ)に格納されており、アドレス変換の際に参照される
ことを特徴とするメモリ保護方法。
3. The memory protection method according to claim 1, wherein the domain information of the memory block is stored in an address translation table or a TLB (table lookaside buffer) for address translation in a virtual memory device. And a memory protection method characterized by being referred to during address translation.
【請求項4】 請求項1乃至3いずれかに記載のメモリ
保護方法において、 上記第2の判定ステップは、上記メモリブロックが予め
決められた共用ドメインに属するものか否かを判定する
第3の判定ステップと、 上記第3の判定ステップにおいて、上記メモリブロック
が予め決められた共用ドメインに属すると判定された場
合に当該プロセスがアクセス可能な共用ドメイン番号と
当該メモリブロックのドメイン番号が等しいか否かを判
定する第4の判定ステップとからなることを特徴とする
メモリ保護方法。
4. The memory protection method according to claim 1, wherein the second determining step determines whether the memory block belongs to a predetermined shared domain. Whether the shared domain number accessible by the process is equal to the domain number of the memory block when the memory block is determined to belong to a predetermined shared domain in the determination step and the third determination step. And a fourth determination step for determining whether or not the memory protection method.
【請求項5】 それぞれがメモリブロックの集合からな
る複数のドメインにメモリを区分けし、プロセス毎に当
該プロセスが占有して使用する固有ドメインであること
を示す固有ドメイン情報と他のプロセスと共用して使用
する共用ドメインであることを示す共用ドメイン情報と
からなるドメイン・アクセス権情報を付随させるととも
に、メモリブロック毎にそれが属するドメインを識別す
るドメイン情報を付随させ、該ドメイン・アクセス権情
報と該ドメイン情報とによって不当なメモリアクセスを
抑止するメモリ保護装置であって、 現在実行中のプロセスが占有するドメインの識別子を格
納するプロセス固有ドメイン識別子レジスタと、 各メモリブロックと、当該メモリブロックが属するドメ
インとを対応付けるメモリブロック・ドメイン間対応手
段と、 アクセスされるメモリブロックが属するドメインが、ア
クセスするプロセスの固有ドメインであるかどうか識別
する固有ドメイン識別手段と、 アクセスされる当該ドメインが共用ドメインであるかど
うか判別する共用ドメイン判別手段と、 アクセスされる当該ドメインがアクセスする当該プロセ
スの固有ドメインでなく、かつ当該プロセスがアクセス
可能な共用ドメインでもない場合は不当メモリアクセス
割込みを発生させる不当メモリアクセス割込み制御手段
とを具備したことを特徴とするメモリ保護装置。
5. The memory is divided into a plurality of domains each consisting of a set of memory blocks, and the unique domain information indicating that each process is a unique domain occupied and used by each process is shared with other processes. Domain access right information consisting of shared domain information indicating that it is a shared domain to be used for each memory block, and domain information for identifying the domain to which each memory block belongs, and the domain access right information. A memory protection device for preventing unauthorized memory access by the domain information, a process-specific domain identifier register for storing an identifier of a domain occupied by a currently executing process, each memory block, and the memory block to which the memory block belongs. Memory block domain that associates with domain Inter-correspondence means, unique domain identification means for identifying whether the domain to which the accessed memory block belongs is a unique domain of the accessing process, and shared domain determination for determining whether the accessed domain is a shared domain Means and an illegal memory access interrupt control means for generating an illegal memory access interrupt when the domain to be accessed is not a unique domain of the process to be accessed and is not a shared domain accessible to the process. Memory protection device characterized by.
【請求項6】 請求項5記載のメモリ保護装置におい
て、上記メモリブロック・ドメイン間対応手段は、仮想
記憶装置におけるアドレス変換テーブルまたはTLBで
あることを特徴とするメモリ保護装置。
6. The memory protection device according to claim 5, wherein the memory block / domain correspondence means is an address conversion table or a TLB in a virtual memory device.
JP6094071A 1994-05-06 1994-05-06 Memory protection method and device therefor Pending JPH07302227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6094071A JPH07302227A (en) 1994-05-06 1994-05-06 Memory protection method and device therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6094071A JPH07302227A (en) 1994-05-06 1994-05-06 Memory protection method and device therefor

Publications (1)

Publication Number Publication Date
JPH07302227A true JPH07302227A (en) 1995-11-14

Family

ID=14100278

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6094071A Pending JPH07302227A (en) 1994-05-06 1994-05-06 Memory protection method and device therefor

Country Status (1)

Country Link
JP (1) JPH07302227A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008515069A (en) * 2004-09-30 2008-05-08 インターナショナル・ビジネス・マシーンズ・コーポレーション System and method for virtualization of processor resources
JP2009104555A (en) * 2007-10-25 2009-05-14 Intel Corp Method and apparatus for preventing alteration of software agent operating in vt environment
JP2012068741A (en) * 2010-09-21 2012-04-05 Fujitsu Ltd Memory access control program, memory access control method and information processor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008515069A (en) * 2004-09-30 2008-05-08 インターナショナル・ビジネス・マシーンズ・コーポレーション System and method for virtualization of processor resources
JP4639233B2 (en) * 2004-09-30 2011-02-23 インターナショナル・ビジネス・マシーンズ・コーポレーション System and method for virtualization of processor resources
JP2009104555A (en) * 2007-10-25 2009-05-14 Intel Corp Method and apparatus for preventing alteration of software agent operating in vt environment
JP2012068741A (en) * 2010-09-21 2012-04-05 Fujitsu Ltd Memory access control program, memory access control method and information processor

Similar Documents

Publication Publication Date Title
US4985828A (en) Method and apparatus for generating a real address multiple virtual address spaces of a storage
JP5581403B2 (en) Store secure mode page table data in secure and non-secure areas of memory
US5619671A (en) Method and apparatus for providing token controlled access to protected pages of memory
US5628023A (en) Virtual storage computer system having methods and apparatus for providing token-controlled access to protected pages of memory via a token-accessible view
US5802590A (en) Method and system for providing secure access to computer resources
US5809546A (en) Method for managing I/O buffers in shared storage by structuring buffer table having entries including storage keys for controlling accesses to the buffers
CN109002706B (en) In-process data isolation protection method and system based on user-level page table
US6430667B1 (en) Single-level store computer incorporating process-local address translation data structures
EP0115877B1 (en) Critical system protection
JPH05204762A (en) Method and device for protecting access to storage and method of imparting isolation to storage-block
US5182805A (en) Method and system for determining copy-on-write condition
JP4399270B2 (en) Method and apparatus for improving data processor security
WO2003042839A2 (en) Memory management system and method providing linear address based memory access security
EP1440373B1 (en) Method and apparatus for physical address-based security to determine target security
US7512768B2 (en) Dynamically sharing a stack between different code segments
JP3454854B2 (en) Memory management device and method
JP4537003B2 (en) Method for protecting a computer from unauthorized manipulation of register contents and computer for implementing this method
JPH01302444A (en) Logical address cache control system
JPH07302227A (en) Memory protection method and device therefor
JP4478458B2 (en) Method and apparatus for accessing an input / output device using desired security
EP0142819B1 (en) Access control system for storage having hardware area and software area
EP0425771A2 (en) An efficient mechanism for providing fine grain storage protection intervals
JPH07281948A (en) Memory controller
US6889308B1 (en) Method and apparatus for protecting page translations
EP0285309A2 (en) Memory protection apparatus for use in an electronic calculator