[go: up one dir, main page]

JPH0133857B2 - - Google Patents

Info

Publication number
JPH0133857B2
JPH0133857B2 JP8115780A JP8115780A JPH0133857B2 JP H0133857 B2 JPH0133857 B2 JP H0133857B2 JP 8115780 A JP8115780 A JP 8115780A JP 8115780 A JP8115780 A JP 8115780A JP H0133857 B2 JPH0133857 B2 JP H0133857B2
Authority
JP
Japan
Prior art keywords
address
key
protection
program
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.)
Expired
Application number
JP8115780A
Other languages
Japanese (ja)
Other versions
JPS576952A (en
Inventor
Kimiaki Uchama
Masahiro Kurata
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP8115780A priority Critical patent/JPS576952A/en
Publication of JPS576952A publication Critical patent/JPS576952A/en
Publication of JPH0133857B2 publication Critical patent/JPH0133857B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Description

【発明の詳細な説明】 本発明は、記憶処理装置における記憶保護方式
に関し、特にアクセス・キー付きベース・アドレ
ス記憶保護方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a storage protection system in a storage processing device, and more particularly to an access keyed base address storage protection system.

情報処理装置において命令を実行する場合、記
憶領域にアクセスが行われるまでの過程には、次
の2つの段階がある。
When executing an instruction in an information processing device, there are the following two steps in the process until a storage area is accessed.

第1の段階は実効アドレスの生成段階であつ
て、これは命令で指定されたレジスタ(アドレス
修飾用のレジスタ)に格納されているアドレス
と、偏差成分(命令中に保持される偏差(デイス
プレイスメント)および命令で指定された修飾レ
ジスタの内容)との和を算出し、アクセスの対象
となる実アドレスを生成する。実アドレスが生成
される場合、命令で指定されるアドレス修飾用の
レジスタをベース・アドレス・レジスタと呼び、
データの先頭アドレスを示す。
The first stage is the generation of an effective address, which consists of the address stored in the register specified by the instruction (register for address modification) and the deviation component (the deviation held during the instruction). ) and the contents of the modified register specified by the instruction) to generate the real address to be accessed. When a real address is generated, the address modification register specified by the instruction is called the base address register.
Indicates the start address of data.

第2段階は、実記憶装置へのアクセス段階であ
つて、これは命令から生成された実効アドレスを
記憶領域に付与された論理アドレスに対応づけ、
アドレス変換機構を経て実記憶装置にアクセスす
る。
The second stage is the access stage to the real storage device, which associates the effective address generated from the instruction with the logical address assigned to the storage area.
The real storage device is accessed through the address translation mechanism.

このようにして記憶領域にアクセスが行われる
が、記憶領域に対する書き込みの制限、プログラ
ム暴走を防止するための命令の実行の制限、およ
び機密情報を守るための読み出し制限のために、
従来より記憶保護が行われている。
Although the storage area is accessed in this way, there are restrictions on writing to the storage area, restrictions on the execution of instructions to prevent program runaway, and restrictions on reading to protect confidential information.
Memory protection has traditionally been practiced.

従来より、一般的に用いられている記憶保護方
式はキー保護方式であつて、例えば記憶領域を
2Kバイト単位に分割して、それぞれにキー情報
を割り当て、一方、処理装置の状態を示すプログ
ラム状態語(以下PSW)の中にもキーを設定し
ておき、処理装置が記憶領域をアクセスするとき
には、PSW内のキーとアクセスの対象となる記
憶領域に割り当てられているキーとを比較するこ
とにより、記憶領域の保護を行う。
Conventionally, the commonly used memory protection method is the key protection method, which protects the storage area, for example.
Divide it into 2K bytes and assign key information to each. On the other hand, a key is also set in the program status word (PSW) that indicates the status of the processing unit, and when the processing unit accesses the storage area, , the storage area is protected by comparing the key in the PSW with the key assigned to the storage area to be accessed.

第1図aは、PSWのビツト構成を示すもので、
2語64ビツトのうちビツト8〜11に、保護キー
と比較して記憶保護を行うアクセス・キーKYが
格納されている。
Figure 1a shows the bit configuration of PSW.
Bits 8 to 11 of the 2 words and 64 bits store an access key KY that protects the memory by comparing it with the protection key.

第1図bは、主記憶装置における保護キーの格
納状態を示すもので、主記憶装置は一定バイト
(例えば2048バイト)ごとのブロツクに分割され、
各ブロツクに対して第1図bに示す保護キー
KEYが設けられる。
Figure 1b shows the storage state of the protection key in the main memory.The main memory is divided into blocks of a certain number of bytes (for example, 2048 bytes).
The protection key shown in Figure 1b for each block
A key is provided.

すなわち、ビツト0〜3は、対応するブロツク
に情報の読み出しと書き込みを行うとき、PSW
のアクセス・キーKYと一致しているかを比較す
るアクセス保護ビツトKEYであり、ビツト4は、
記憶保護を書き込みだけ「0」、または読み書き
「1」に適用する読み出し保護ビツトFである。
That is, bits 0 to 3 are set to PSW when reading and writing information to the corresponding block.
The access protection bit KEY is compared to see if it matches the access key KY, and bit 4 is
This is a read protection bit F that applies memory protection only to write to "0" or to read and write to "1".

処理装置から主記憶装置がアクセスされると
き、PSWのアクセス・キーKYと、主記憶装置の
各ブロツクごとの保護キーKEYとが比較され、
例えば保護キーのKEYとFおよびアクセス・キ
ーKYの内容により第1図cに示すような制御が
行われる。
When the main memory is accessed from the processing unit, the access key KY of the PSW is compared with the protection key KEY for each block of the main memory.
For example, control as shown in FIG. 1c is performed depending on the contents of the protection keys KEY and F and the access key KY.

第1図cでは、各条件(CND)において、読
み出し(RD)と書き込み(WT)が許可される
ときOK、許可されないときNOで示されている。
In FIG. 1c, under each condition (CND), when read (RD) and write (WT) are permitted, OK is shown, and when they are not permitted, NO is shown.

これらのキーの割り当ておよび比較照合は、オ
ペレーテイング・システム(OS)の制御のもと
で行われる。例えば、第1図dに示すように、ソ
フトウエアの基本的な働きを行うOSが格納され
ている領域にはキーK=“0”が、またその下で
ユーザごとのプログラムF0〜2が格納されてい
る領域には、それぞれ“0”以外の異なつたキー
K=“1”、“2”、“3”が割り当てられ、一方、
PSWのアクセス・キーとしては、OSが実行され
るときにはキー“0”が、またユーザ・プログラ
ムF0、1、2が実行されるときには、それぞれ
の領域と同一のキーが割り当てられる。処理装置
のキーがK=“0”のプログラムは、どの領域に
もアクセスできるので、シシステムを管理するプ
ログラムはユーザ・プログラムへのアクセスが可
能である。
The assignment and comparison of these keys is performed under the control of the operating system (OS). For example, as shown in Figure 1d, the key K="0" is stored in the area where the OS that performs the basic functions of the software is stored, and the programs F0 to F2 for each user are stored under it. Different keys K=“1”, “2”, and “3” other than “0” are assigned to the areas where
As the PSW access key, the key "0" is assigned when the OS is executed, and when the user programs F0, 1, and 2 are executed, the same keys as the respective areas are assigned. A program whose key of the processing device is K="0" can access any area, so a program that manages the system can access user programs.

このように、従来の記憶保護方式では、前述の
第2段階で使用した論理アドレスの記憶領域を一
定区画に分割して、分割された区画ごとに、例え
ばリング・レベル、アクセス権、記憶保護キー等
の保護キーを与え、一方、命令実行時に前述の第
1段階で使用したベース・アドレスとは別個に、
例えばPSWにリング・レベル、記憶保護キー、
等のアクセス・キーを与える。そして、これら2
つの要素(キー)の関係で、記憶保護を行つてい
る。
In this way, in conventional storage protection methods, the storage area of the logical address used in the second stage described above is divided into certain sections, and each partition is configured with information such as the ring level, access rights, and storage protection key. etc., while separate from the base address used in the first step above when executing the instruction.
For example, PSW has ring level, memory protection key,
and other access keys. And these 2
Memory protection is performed based on the relationship between two elements (keys).

つまり、従来の記憶保護は、アクセス先記憶区
画と、アクセス命令の存在する記憶区画の各々に
付与された保護情報の関係を照合することにより
行われている。
In other words, conventional storage protection is performed by checking the relationship between the access destination storage partition and the protection information given to each storage partition in which the access command exists.

しかし、これら2つの要素間の関係による保護
方式は、プログラムあるいはプログラム集合体等
の命令集合を単位として保護を行うものである。
つまり、PSWはあるプログラム内のブロツクご
とに書き替えられ、その度にアクセス・キーが書
き込まれれるので、集合単位で記憶の保護が行わ
れる。
However, the protection system based on the relationship between these two elements protects a program or a set of instructions such as a set of programs as a unit.
In other words, the PSW is rewritten for each block within a program, and the access key is written each time, so storage is protected in units of sets.

したがつて、次のような欠点がある。 Therefore, there are the following drawbacks.

(1) アクセス権情報(アクセス・キー)を管理す
るプログラムを作成しようとしても、どのよう
なプログラム単位に、またどの区画に対するア
クセス権情報を与えればよいかを定めることが
できないため、有効な管理プログラムの作成が
困難である。
(1) Even if you try to create a program to manage access rights information (access keys), it is difficult to effectively manage it because it is not possible to determine what program units or which partitions access rights information should be given to. It is difficult to create a program.

(2) プログラム作成者は、アクセス対象の保護情
報(保護キー)を知り、アクセス権情報を制御
しなければならないため、プログラミング時の
負担が大きく、作成されたプログラムに誤りが
生じ易い。
(2) Since the program creator must know the protection information (protection key) of the access target and control the access right information, the burden of programming is heavy and errors are likely to occur in the created program.

(3) 一定区画ごとに保護情報が割り当てられてい
ても、その区画内に異なる種類の情報が格納さ
れている場合には、情報ごとの保護が行われな
い。また、プログラムが処理する情報ごとの大
きさに合わせた保護を行うためには、複雑な管
理プログラムあるいは記憶領域に異なつた大き
さの区画を設ける必要があり、処理能力も低下
しやすい。
(3) Even if protection information is assigned to each specific section, if different types of information are stored within that section, protection for each piece of information will not be performed. Furthermore, in order to provide protection tailored to the size of each piece of information processed by a program, it is necessary to create a complex management program or to provide partitions of different sizes in the storage area, which tends to reduce processing performance.

いま、ある領域KがプログラムAとプログラム
Bとで共用され、プログラムAは別の領域Jにも
アクセスするときのように、1つのプログラムが
複数の異なる領域にアクセスする場合、保護を行
うためには、アクセス領域を変更する度ごとに、
アクセス・キーを変更する手続きを要求する必要
があり、これを避けるためには、あらかじめその
プログラムに対して、アクセスする可能性のある
すべての領域の保護キーに対応した有効なアクセ
ス・キーを付与する必要がある。
Now, when one program accesses multiple different areas, such as when a certain area K is shared by program A and program B and program A also accesses another area J, in order to perform protection, Each time you change the access area,
It is necessary to request a procedure to change the access key, and to avoid this, it is necessary to give the program in advance a valid access key that corresponds to the protection keys of all areas that it may access. There is a need to.

このように、従来の記憶保護方式では、保護さ
れる単位が大きくなる傾向にあり、厳密な保護を
行い難く、しかも保護キーの管理に加えてアクセ
ス・キーの制御が複雑である。
As described above, in conventional storage protection systems, the units to be protected tend to be large, making it difficult to perform strict protection, and in addition to managing protection keys, controlling access keys is complicated.

本発明の目的は、このような欠点を除去するた
め、情報に対しアクセスを許可するプログラムの
範囲を厳密に制限し、かつアクセス時およびアク
セス権情報付与時の処理を簡単にできる記憶保護
方式を提供することにある。
An object of the present invention is to provide a memory protection method that strictly limits the range of programs that are allowed to access information and that simplifies processing when accessing and granting access right information, in order to eliminate these drawbacks. It is about providing.

本発明の記憶保護方式は、命令で示すベース・
アドレスとして、アクセス領域の位置を示すロケ
ーシヨン情報の他に、アクセス・キーを付加し、
両者を一体として扱うことにより、保護情報の存
在を意識することなく、命令単位で領域外へのア
クセスを制限するようにしたことを特徴としてい
る。
The storage protection method of the present invention is based on the instructions.
As an address, in addition to location information indicating the location of the access area, an access key is added,
By treating both as one, the system is characterized by restricting access to areas outside the area on a command-by-command basis, without being aware of the existence of protected information.

以下、本発明の実施例を、図面により説明す
る。
Embodiments of the present invention will be described below with reference to the drawings.

第2図は、本発明のベース・アドレスの構成を
示す図である。
FIG. 2 is a diagram showing the structure of the base address of the present invention.

ベース・レジスタの中にプログラムのベース・
アドレス(番地の基準となる番地)を格納し、命
令語の番地にこの番地を加算すれば、絶体アドレ
スが得られる。プログラムを移動するときには、
番地の変化分だけベース・レジスタの値を調整す
ればよい。プログラム全体が連続した1個のブロ
ツクのときには、ベース・アドレスは1個でよい
が、分散した複数個のブロツクから構成されると
きには、その数だけのベース・レジスタが必要で
ある。
The base register of the program
By storing the address (the reference address) and adding this address to the address of the instruction word, the absolute address can be obtained. When moving programs,
It is sufficient to adjust the value of the base register by the change in address. When the entire program consists of one continuous block, only one base address is required, but when it consists of a plurality of distributed blocks, as many base registers as that number are required.

プログラムのためのベース・アドレスは、プロ
セジヤー・ベース・アドレスと呼ばれる。ベー
ス・レジスタが主記憶装置の最大容量まで表現で
きるビツト数を持つていれば、命令語の番地部
(デイスプレイスメント)は短いビツト数でも主
記憶装置のすべてをアドレスできるので、命令語
の短縮が可能である。
The base address for a program is called the processor base address. If the base register has the number of bits that can express up to the maximum capacity of the main memory, the address part (displacement) of the instruction word can address all of the main memory even with a small number of bits, so the instruction word can be shortened. It is possible.

本発明では、第2図に示すように、ベース・ア
ドレス1がロケーシヨン成分2とアクセス・キー
3から構成されており、これらが一体として取り
扱われる。
In the present invention, as shown in FIG. 2, a base address 1 is composed of a location component 2 and an access key 3, which are treated as one.

第3図は、本発明のベース・アドレスを用い
て、実効アドレスを生成する過程の説明図であ
る。
FIG. 3 is an explanatory diagram of the process of generating an effective address using the base address of the present invention.

ベース・アドレス1は、ベース・レジスタ4に
格納されている。また、命令7は、命令コード
f、レジスタ番号r1、インデツクス・レジスタ番
号x2、ベース・レジスタ番号B2、デイスプレイ
スメントD2から構成されている。
Base address 1 is stored in base register 4. Further, instruction 7 is composed of instruction code f, register number r 1 , index register number x 2 , base register number B 2 , and displacement D 2 .

命令7により指定したベース・レジスタ4の内
容と、命令7により指定したインデツクス・レジ
スタ6の内容(偏差)と、命令7中に保持する偏
差5との和をとつて、アクセス対象の実効アドレ
ス9を生成する。
The effective address 9 to be accessed is calculated by adding the contents of base register 4 specified by instruction 7, the contents (deviation) of index register 6 specified by instruction 7, and deviation 5 held in instruction 7. generate.

この様に生成された実効アドレス9の前部のベ
ース・アドレス1のアクセス・キー3に対応する
部分をキー成分21として扱い、後部をアドレス
成分8として扱う。
The front part of the effective address 9 generated in this way, which corresponds to the access key 3 of the base address 1, is treated as the key component 21, and the rear part is treated as the address component 8.

この実施例では、アクセス・キー3がアドレス
演算の対象となつているが、この演算の結果アク
セス・キー3とキー成分21とが異つてしまうケ
ースでも記憶域に割付けられた保護キーと、この
キー成分21とが一致する事は少ないので、両者
の一致関係でチエツクする方法を用いれば、問題
はない。第3−1図は、アクセス・キー3をアド
レス演算の対象としない本発明のベース・アドレ
スを用いて実効アドレスを生成する過程の説明図
である。
In this embodiment, the access key 3 is the target of the address calculation, but even in the case where the access key 3 and the key component 21 are different as a result of this calculation, the protection key assigned to the storage area and this Since it is rare for the key component 21 to match, there is no problem if a method of checking the matching relationship between the two is used. FIG. 3-1 is an explanatory diagram of the process of generating an effective address using the base address of the present invention in which the access key 3 is not the target of address calculation.

ベース・アドレス1は、ベース・レジスタ4に
格納されている。また、命令7は、命令コード
f、レジスタ番号r1、インデツクス・レジスタ番
号x2、ベース・レジスタ番号B2、デイスプレイ
スメントD2から構成されている。
Base address 1 is stored in base register 4. Further, instruction 7 is composed of instruction code f, register number r 1 , index register number x 2 , base register number B 2 , and displacement D 2 .

命令7により指定したベース・レジスタ4の内
容と、命令7により指定したインデツクス・レジ
スタ6の内容(偏差)と、命令7中に保持する偏
差5との和をとつて、アクセス対象の実効アドレ
ス9のアドレス成分8を生成する。生成されたア
ドレス成分8とベース・アドレスのアクセス・キ
ー3とから、実効アドレス9が求められる。
The effective address 9 to be accessed is calculated by adding the contents of base register 4 specified by instruction 7, the contents (deviation) of index register 6 specified by instruction 7, and deviation 5 held in instruction 7. address component 8 is generated. An effective address 9 is determined from the generated address component 8 and the base address access key 3.

このように、実効アドレス9の生成において、
キー成分21を分離して扱う事は、第3図に示し
た実施例に比して次の効果がある。
In this way, in generating the effective address 9,
Separating and handling the key component 21 has the following effects compared to the embodiment shown in FIG.

(1) インデツクス・レジスタの加算により生じた
アドレス成分の桁上りを検出でき、より厳密に
記憶保護を行うことができる。
(1) Carry of address components caused by addition of index registers can be detected, and memory protection can be performed more strictly.

(2) アクセス・キー3の内容がキー成分21とし
て保存されるので、より厳密に記憶保護を行う
ことができる。
(2) Since the contents of the access key 3 are saved as the key component 21, memory protection can be performed more strictly.

(3) キー成分21を保持する金物をアクセス・キ
ー3を保持する金物で代用する事が可能であ
り、金物を削減することができる。なお、本実
施例では、ロケーシヨン成分2とアクセス・キ
ー3の配置が逆の場合でもよい。
(3) It is possible to replace the hardware that holds the key component 21 with the hardware that holds the access key 3, and the number of hardware can be reduced. Note that in this embodiment, the location component 2 and the access key 3 may be arranged in reverse.

第4図は、本発明の実効アドレスのアドレス成
分が論理アドレスのときの保護情報チエツク動作
の説明図である。
FIG. 4 is an explanatory diagram of the protection information check operation when the address component of the effective address of the present invention is a logical address.

先ず、実効アドレス9のアドレス成分8のセグ
メント番号S10より、セグメント・テーブル
(ST)13を参照してページ・テーブル・アドレ
スを読み出し、このセグメントのページ・テーブ
ル(PT)14を得る。次に、アドレス成分8の
ページ番号(P)11より、ページ・テーブル1
4のエントリを得る。
First, the page table address is read from the segment number S10 of the address component 8 of the effective address 9 by referring to the segment table (ST) 13, and the page table (PT) 14 of this segment is obtained. Next, from page number (P) 11 of address component 8, page table 1
Get 4 entries.

このエントリは、ページ内保護単位分割表示ビ
ツトFと、分割フアクタαと、XPTアドレスよ
り構成されている。分割表示ビツトFが“0”の
ときには、分割されていないことを示し、“1”
のときには、分割されていることを示す。また、
分割フアクタαは、1ページを分割して使える保
護単位の数であり、ページによつてこの値は異な
る。この値により、アドレス成分8のミニページ
番号(mP)12を示すフイールドの大きさが変
化する。1ページ内を分割して、各分割単位ごと
の保護キーβ15を登録する制御表(XPT)1
6は、ページ・テーブル14のエントリから求め
られる。そのページの制御表(XPT)16が得
られた後、実効アドレス9のアドレス成分8のミ
ニページ番号mP12より、目的の分割区画の保
護キーβ15が求められる。
This entry consists of an intra-page protection unit division display bit F, a division factor α, and an XPT address. When the split display bit F is “0”, it indicates that there is no split, and it is set to “1”.
indicates that it is divided. Also,
The division factor α is the number of protection units that can be used by dividing one page, and this value differs depending on the page. Depending on this value, the size of the field indicating the mini page number (mP) 12 of the address component 8 changes. Control table (XPT) 1 for dividing one page and registering protection key β15 for each division unit
6 is determined from the entries in page table 14. After the control table (XPT) 16 for that page is obtained, the protection key β15 of the target partition is determined from the mini page number mP12 of the address component 8 of the effective address 9.

次に、キー成分21と保護キーβ15とを比較
することにより、保護を行う。
Next, protection is performed by comparing the key component 21 and the protection key β15.

なお、キー成分21と保護キー15との比較チ
エツクの方法としては、大小関係に基づくもの
と、一致関係に基づくものとがある。
Note that there are two methods for comparing and checking the key component 21 and the protection key 15: one based on a magnitude relationship, and the other based on a matching relationship.

第5図は、本発明の実施例を示すメモリ分割区
画の要求とベース・アドレスの受渡し処理の説明
図である。
FIG. 5 is an explanatory diagram of a memory partition request and base address delivery process showing an embodiment of the present invention.

キーの一致性によりチエツクする方式を用いる
要求元プログラム18から管理プログラム17に
対して、記憶領域の分割区画要求19があると、
管理プログラム17は、ステツプ21〜23で分
割区画を行つて保護キーを生成した後、これらを
管理テーブル16のエントリーに登録し、ステツ
プ24でアクセス・キーを生成して、要求元プロ
グラム18に対してベース・アドレスの通知20
を行う。
When a storage area division request 19 is made to the management program 17 from the request source program 18 using a method of checking based on key consistency,
After the management program 17 performs partitioning and generates protection keys in steps 21 to 23, it registers these in entries in the management table 16, generates access keys in step 24, and sends them to the requesting program 18. Notification of base address 20
I do.

すなわち、記憶領域の分割区画の要求19に対
して、管理プログラム17は、与える区画の先頭
アドレスをロケーシヨン成分2とし、あるロジツ
クにしたがつてキーを生成してそれを保護キー1
5とした後、保護キー管理テーブルXPT16の
与える区画に対応するエントリに登録する。一
方、このキーをアクセス・キー3として、ベー
ス・アドレス1を生成し、ベース・アドレス1を
要求元プログラムに通知する。
That is, in response to a request 19 for dividing a storage area, the management program 17 sets the start address of the given partition as location component 2, generates a key according to a certain logic, and uses it as protection key 1.
5, and then register it in the entry corresponding to the given section in the protection key management table XPT16. On the other hand, using this key as access key 3, base address 1 is generated and base address 1 is notified to the requesting program.

この分割区画にアクセスするプログラムは、記
憶領域の管理プログラム17より通知されたベー
ス・アドレス1を使用して、第3図または第3−
1図に示す命令7のように使つて実効アドレスを
生成し、アクセスを行う。
A program that accesses this divided partition uses the base address 1 notified by the storage area management program 17 and uses the base address 1 as shown in FIG.
It is used as shown in instruction 7 in Figure 1 to generate an effective address and perform access.

次に、キーの生成について、説明する。 Next, key generation will be explained.

このようなベース・アドレス1に付与されたア
クセス・キーは、隣接する区画に対する実効アド
レスを不連続にする作用と、同一区画の用途が変
更された場合に、旧実効アドレスを無効にする作
用を持つ。したがつて、キーの作成には、論理的
な時間経過とともに変化する値を使用することが
最も望ましい。これは、タイマーの値から生成す
る方法や、領域要求の割り当てごとにカウント・
アツプするサイクリツク・カウンタを利用するこ
とにより簡単に実現することができる。
The access key assigned to base address 1 has the functions of discontinuing the effective addresses for adjacent partitions and invalidating the old effective address when the use of the same partition changes. have Therefore, it is most desirable to create keys using logical, time-varying values. This can be generated from the value of a timer or by counting and counting each time a space request is allocated.
This can be easily achieved by using a cycle counter that increases.

いま、第5図において、プログラム18がユー
ザAのプログラムAであり、その他にユーザBの
プログラムBが存在するものと仮定する。先ず、
プログラムAが記憶領域を要求すると、管理プロ
グラム17からベース・アドレスad1(アクセ
ス・キーは例えば805)で示される区画エリアC
が与えられ、プログラムAはその区画エリアCを
使用した後、管理プログラム17に返却する。
Now, in FIG. 5, it is assumed that program 18 is user A's program A, and user B's program B also exists. First of all,
When program A requests a storage area, the management program 17 assigns partitioned area C indicated by base address ad1 (access key is 805, for example).
is given, and after program A uses the divided area C, it returns it to the management program 17.

次に、プログラムBが記憶領域を要求すると、
管理プログラム17からベース・アドレスad2
(アクセス・キーは例えば910)で示される区画と
して、プログラムAが返却した区画エリアCが与
えられたものとする。この場合、アドレスad1
とad2はキーが異なるため(805と910)、プログ
ラムAにバグがあり、プログラムAが区画Cに対
しベース・アドレスad1を使つてアクセスして
も、本発明のチエツク機構により検出され、プロ
グラムBが使用している区画Cの情報は保護され
る。
Then, when program B requests storage space,
Base address ad2 from management program 17
Assume that the partition area C returned by the program A is given as the partition indicated by (the access key is 910, for example). In this case, address ad1
and ad2 have different keys (805 and 910), so even if there is a bug in program A and program A accesses partition C using base address ad1, it will be detected by the check mechanism of the present invention and program B The information of partition C used by is protected.

このように、ベース・アドレスの作成は、言語
処理プログラムや管理プログラムの領域割り付け
時に実施されるので、このアドレスを用いるプロ
グラムは、何らベース・アドレスの構成要素を意
識することがない。
In this way, since the base address is created at the time of area allocation for the language processing program or management program, the program that uses this address is not aware of the components of the base address.

なお、このようなアドレス構造の情報処理シス
テムでは、情報収集プログラムのようなデータ構
造を無視して動作したいプログラムのために、保
護キーのチエツク回路を無効とするスイツチを備
えるとともに、その操作命令も設けることができ
る。
Note that an information processing system with such an address structure is equipped with a switch that disables the protection key check circuit for programs such as information gathering programs that want to operate without regard to the data structure, and also has a switch that disables the protection key check circuit. can be provided.

本発明の記憶保護方式では、 (1) 記憶領域の分割区画を利用するプログラム
は、保護情報の存在を意識することなく、領域
のアドレスとしての意識のみでよいため、プロ
グラムの作成がきわめて簡単となる。
In the memory protection method of the present invention, (1) a program that uses divided partitions of a storage area does not need to be aware of the existence of protection information, but only needs to be aware of the area address, making it extremely easy to create a program. Become.

(2) キーの値として、時系列的な値を付与する
と、時間的に領域に対するアクセスを制限でき
るため、使用済で管理プログラムに返却した区
画に対して、プログラム内のバグによつて再返
却したり、あるいは再アクセスすることを防止
することができ、厳密な保護が可能である。
(2) By assigning a chronological value as a key value, access to the area can be restricted over time, so if a used partition is returned to the management program, it may be returned due to a bug in the program. It is possible to prevent users from accessing or re-accessing the information, and strict protection is possible.

(3) プログラム間の情報の授受および共用は、情
報格納領域アドレスの授受を介して行われるた
め、プログラム間で情報の授受、共用が行われ
ると、保護情報も同時に授受されることにな
り、プログラム間を越えた保護も簡単に実現で
きる。
(3) Information is exchanged and shared between programs through the exchange of information storage area addresses, so when information is exchanged and shared between programs, protected information is also exchanged at the same time. Protection that goes beyond programs can also be easily achieved.

(4) 従来は、プログラム内の1ブロツクごとに書
き替えられるPSWにアドレス・キーが含まれ
ていたが、本発明では命令で指定するベース・
アドレスにアドレス・キーが含まれているた
め、命令単位にアドレス・キーを書き替えるこ
とができ、したがつて命令単位に区画エリア外
へのアクセスを制限して、厳密な保護を行うこ
とができる。
(4) Conventionally, the address key was included in the PSW that was rewritten for each block in the program, but in the present invention, the base key specified by the instruction is
Since the address includes an address key, the address key can be rewritten on a per-instruction basis, allowing strict protection by restricting access to areas outside the partitioned area on a per-instruction basis. .

(5) 実効アドレスによつて示される空間が、ベー
ス・アドレス内のキー情報により見掛け上拡大
されることになり、誤まつた実効アドレスに対
応する論理アドレスが存在する確率を十分小さ
くできるため、ベース・アドレスの設定誤りに
対しても十分な保護が可能となる。例えば、ベ
ース・アドレスのロケーシヨン成分を16ビツ
ト、アクセス・キーを4ビツトとすると、誤ま
つた実効アドレスに対する確率は従来1/216
であるのに対して、本発明では1/220となり、
十分に小さくなる。
(5) The space indicated by the effective address is apparently expanded by the key information in the base address, and the probability that a logical address corresponding to a mistaken effective address exists can be sufficiently reduced. Sufficient protection can also be provided against base address setting errors. For example, if the location component of the base address is 16 bits and the access key is 4 bits, the probability of an incorrect effective address is conventionally 1/2 16
In contrast, in the present invention, it is 1/2 20 ,
be small enough.

(6) 他プログラムへ領域の使用権を譲渡すること
により、所有者は使用権を放棄し、譲り受けた
側のみが使用権を持つことになるが、その場
合、譲渡機能マクロ(プログラム)を作成し
て、そのプログラムによりキーを変更して、新
しいベース・アドレスとして再割り付けを行え
ば、機密保護が簡単かつ厳密にできる。例え
ば、AプログラムからBプログラムに対しある
区画エリアCを譲渡した後、Aプログラムで区
画エリアCにアクセスしても、キーが変更され
ているため、チエツクされて書き込みあるいは
読み出しが不可能となり、機密が漏曳されな
い。
(6) By transferring the right to use an area to another program, the owner waives the right to use the area, and only the transferee has the right to use the area. In that case, create a transfer function macro (program). Security can be easily and strictly secured by changing the key using the program and reassigning it as a new base address. For example, after transferring a partitioned area C from program A to program B, even if program A accesses partitioned area C, the key has been changed, so it will be checked and cannot be read or written, making it confidential. is not leaked.

(7) ベース・アドレスを動作プログラムのプロセ
ジヤー・ベース・アドレスとして使用する場
合、ブランチ等の制御の移行する範囲の検査に
キーを使用できるので、きわめて有効である。
(7) When the base address is used as the processor base address of the operating program, it is extremely effective because the key can be used to check the range to which control such as branches is transferred.

以上のように、本発明によれば、キー情報と記
憶領域の先頭アドレス情報を一括して記憶領域の
アドレスとして扱い、記憶領域側の区画に割り付
けたキー情報と比較するので、アクセスを許可す
るプログラムの範囲を厳密に制限することがで
き、かつアクセス時およびアクセス権情報付与時
の処理を簡単にする等、種々の効果を与える。
As described above, according to the present invention, the key information and the start address information of the storage area are collectively treated as the address of the storage area and compared with the key information assigned to the partition on the storage area side, so access is permitted. It provides various effects, such as being able to strictly limit the scope of a program and simplifying processing when accessing and granting access right information.

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

第1図は従来の記憶保護方式の一例を示す説明
図、第2図は本発明の実施例を示すベース・アド
レスの構成図、第3図および第3−1図はそれぞ
れ本発明によるベース・アドレスを用いて命令か
ら実効アドレスを生成する過程の説明図、第4図
は第3図および第3−1図による実効アドレスが
論理アドレスのときの保護キー格納制御表と保護
キーのチエツク動作の説明図、第5図は本発明に
よるメモリ分割区画の要求とベース・アドレスの
受渡しの処理を示す図である。 1:ベース・アドレス、2:ロケーシヨン成
分、3:アクセス・キー、4:ベース・レジス
タ、5:デイスプレイスメント、6:インデツク
ス・レジスタ、7:命令、8:実効アドレスのア
ドレス成分、9:実効アドレス、10:セグメン
ト番号、11:ページ番号、12:ミニページ番
号、13:セグメント・テーブル(ST)、14:
ページ・テーブル(PT)、15:保護キー、1
6:保護キー登録制御表(XPT)、17:管理プ
ログラム、18:要求元プログラム、19:分割
区画要求、20:ベース・アドレス通知、21:
実効アドレスのキー成分。
FIG. 1 is an explanatory diagram showing an example of a conventional storage protection system, FIG. 2 is a configuration diagram of a base address showing an embodiment of the present invention, and FIG. 3 and FIG. FIG. 4 is an explanatory diagram of the process of generating an effective address from an instruction using an address. FIG. 4 shows the protection key storage control table and protection key check operation when the effective address is a logical address according to FIG. 3 and FIG. The explanatory diagram, FIG. 5, is a diagram showing the process of requesting a memory partition and passing a base address according to the present invention. 1: Base address, 2: Location component, 3: Access key, 4: Base register, 5: Displacement, 6: Index register, 7: Instruction, 8: Address component of effective address, 9: Effective address , 10: Segment number, 11: Page number, 12: Mini page number, 13: Segment table (ST), 14:
Page table (PT), 15: Protection key, 1
6: Protection key registration control table (XPT), 17: Management program, 18: Request source program, 19: Split partition request, 20: Base address notification, 21:
Key component of effective address.

Claims (1)

【特許請求の範囲】[Claims] 1 記憶領域を区画に分割し、該区画ごとに保護
キーを割り当てるとともに、該記憶領域にアクセ
スする命令がベース・アドレスの格納場所を指定
するような情報処理装置において、該ベース・ア
ドレスがロケーシヨン成分とアクセス・キーで構
成され、該ベース・アドレスの内容と命令により
指定されたインデツクス・レジスタの内容と命令
中に保持された偏差との和から実効アドレスのア
ドレス成分を、また該ベース・アドレスのアクセ
ス・キーをそのままアクセス・キーとして実効ア
ドレスに付加し、一方、該実効アドレスのアドレ
ス成分をもとにして記憶領域に割り当てられた保
護キーを得、該保護キーと上記実効アドレスに付
加されたキー成分とを比較チエツクすることを特
徴とする記憶保護方式。
1 In an information processing device in which a storage area is divided into partitions, a protection key is assigned to each partition, and an instruction to access the storage area specifies a storage location of a base address, the base address is a location component. and an access key, and calculates the address component of the effective address from the sum of the contents of the base address, the contents of the index register specified by the instruction, and the deviation held during the instruction, and also calculates the address component of the base address. The access key is added as an access key to the effective address, and on the other hand, a protection key assigned to the storage area is obtained based on the address component of the effective address, and the protection key and the protection key are added to the effective address. A memory protection method characterized by comparing and checking key components.
JP8115780A 1980-06-16 1980-06-16 Storage protecting system Granted JPS576952A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8115780A JPS576952A (en) 1980-06-16 1980-06-16 Storage protecting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8115780A JPS576952A (en) 1980-06-16 1980-06-16 Storage protecting system

Publications (2)

Publication Number Publication Date
JPS576952A JPS576952A (en) 1982-01-13
JPH0133857B2 true JPH0133857B2 (en) 1989-07-17

Family

ID=13738600

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8115780A Granted JPS576952A (en) 1980-06-16 1980-06-16 Storage protecting system

Country Status (1)

Country Link
JP (1) JPS576952A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2851804A1 (en) 2013-09-20 2015-03-25 Fujitsu Limited Arithmetic processing device, information processing device, control method for information processing device, and control program for information processing device

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5809546A (en) * 1996-05-23 1998-09-15 International Business Machines Corporation Method for managing I/O buffers in shared storage by structuring buffer table having entries including storage keys for controlling accesses to the buffers
US5802397A (en) * 1996-05-23 1998-09-01 International Business Machines Corporation System for storage protection from unintended I/O access using I/O protection key by providing no control by I/O key entries over access by CP entity
US5787309A (en) * 1996-05-23 1998-07-28 International Business Machines Corporation Apparatus for protecting storage blocks from being accessed by unwanted I/O programs using I/O program keys and I/O storage keys having M number of bits
US5900019A (en) * 1996-05-23 1999-05-04 International Business Machines Corporation Apparatus for protecting memory storage blocks from I/O accesses
US5724551A (en) * 1996-05-23 1998-03-03 International Business Machines Corporation Method for managing I/O buffers in shared storage by structuring buffer table having entries include storage keys for controlling accesses to the buffers
US7233998B2 (en) 2001-03-22 2007-06-19 Sony Computer Entertainment Inc. Computer architecture and software cells for broadband networks
US7231500B2 (en) 2001-03-22 2007-06-12 Sony Computer Entertainment Inc. External data interface in a computer architecture for broadband networks
US6826662B2 (en) 2001-03-22 2004-11-30 Sony Computer Entertainment Inc. System and method for data synchronization for a computer architecture for broadband networks
US6809734B2 (en) 2001-03-22 2004-10-26 Sony Computer Entertainment Inc. Resource dedication system and method for a computer architecture for broadband networks
US6526491B2 (en) 2001-03-22 2003-02-25 Sony Corporation Entertainment Inc. Memory protection system and method for computer architecture for broadband networks
US7093104B2 (en) 2001-03-22 2006-08-15 Sony Computer Entertainment Inc. Processing modules for computer architecture for broadband networks

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2851804A1 (en) 2013-09-20 2015-03-25 Fujitsu Limited Arithmetic processing device, information processing device, control method for information processing device, and control program for information processing device

Also Published As

Publication number Publication date
JPS576952A (en) 1982-01-13

Similar Documents

Publication Publication Date Title
US10977190B2 (en) Dynamic address translation with access control in an emulator environment
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
JP7359837B2 (en) Memory protection unit that uses memory protection tables stored within the memory system
US9244856B2 (en) Dynamic address translation with translation table entry format control for identifying format of the translation table entry
EP2229630B1 (en) Dynamic address translation with format control
US8631216B2 (en) Dynamic address translation with change record override
US8019964B2 (en) Dynamic address translation with DAT protection
EP2229631B1 (en) Dynamic address translation with frame management
US8082405B2 (en) Dynamic address translation with fetch protection
US20120011341A1 (en) Load Page Table Entry Address Instruction Execution Based on an Address Translation Format Control Field
US5724551A (en) Method for managing I/O buffers in shared storage by structuring buffer table having entries include storage keys for controlling accesses to the buffers
US5900019A (en) Apparatus for protecting memory storage blocks from I/O accesses
US5787309A (en) Apparatus for protecting storage blocks from being accessed by unwanted I/O programs using I/O program keys and I/O storage keys having M number of bits
JPH0133857B2 (en)
US5802397A (en) System for storage protection from unintended I/O access using I/O protection key by providing no control by I/O key entries over access by CP entity
US11288200B2 (en) Method and system for task-based cache isolation
CN108932205B (en) Method and equipment for defending RowHammer attack
CN119537266A (en) Floating internal context memory