80386 programmer's reference manual Chapter 6 Protection notes
2014-02-01 00:18
357 查看
1. Why protection?
Identify and detect bugs.
2. Overview: 5 aspects
Type checking
Limit checking
Restriction of addressable domain
Restriction of procedure entry points
Restriction of instruction set
Protection is a hardware mechanism, applies both to segment translation and to page translation.
3. Segment level protection.
Here we mainly talking about Privilege levels.
Segment descriptor contains a filed called DPL(descriptor privilege level)
Selectors contains RPL(requestor's privilege level)
An internal register contains CPL(current privilege level), usually CPL = DPL, it changes when controls transferred to different segments.
The processor automatically evaluates the right of a procedure to access
another segment by comparing the CPL to one or more other privilege levels.
The evaluation is performed at the time the selector of a descriptor is
loaded into a segment register. The criteria used for evaluating access to
data differs from that for evaluating transfers of control to
executable
segments; therefore, the two types of access are considered separately in
the following sections.
DPL >= max(CPL, RPL);
The instructions that affect system data structures can only be executed
when CPL is zero. If the CPU encounters one of these instructions when CPL
is greater than zero, it signals a general protection exception. These
instructions include:
CLTS
HLT
LGDT
LIDT
LLDT
LMSW
LTR
MOV to/from CRn
MOV to /from DRn
MOV to/from TRn
Identify and detect bugs.
2. Overview: 5 aspects
Type checking
Limit checking
Restriction of addressable domain
Restriction of procedure entry points
Restriction of instruction set
Protection is a hardware mechanism, applies both to segment translation and to page translation.
3. Segment level protection.
Here we mainly talking about Privilege levels.
Segment descriptor contains a filed called DPL(descriptor privilege level)
Selectors contains RPL(requestor's privilege level)
An internal register contains CPL(current privilege level), usually CPL = DPL, it changes when controls transferred to different segments.
The processor automatically evaluates the right of a procedure to access
another segment by comparing the CPL to one or more other privilege levels.
The evaluation is performed at the time the selector of a descriptor is
loaded into a segment register. The criteria used for evaluating access to
data differs from that for evaluating transfers of control to
executable
segments; therefore, the two types of access are considered separately in
the following sections.
DPL >= max(CPL, RPL);
The instructions that affect system data structures can only be executed
when CPL is zero. If the CPU encounters one of these instructions when CPL
is greater than zero, it signals a general protection exception. These
instructions include:
CLTS
HLT
LGDT
LIDT
LLDT
LMSW
LTR
MOV to/from CRn
MOV to /from DRn
MOV to/from TRn
相关文章推荐
- INTEL 80386 PROGRAMMER'S REFERENCE MANUAL 1986
- MySQL 5.7 Reference Manual Chapter 13 Functions and Operators 参考手册第十三章函数与操作符内容总结
- MySQL 5.7 Reference Manual Chapter 4 Tutorial 参考手册第四章教程内容总结
- MySQL 5.7 Reference Manual Chapter 10 Language Structure 参考手册第十章语言结构内容总结
- "Zend Framework" Programmer's Reference Guide - reading notes (Chapter 2)
- 谁有这本书的电子版《The Annotated C++ Reference Manual》
- C Reference Manual Reading Notes: 008 The C Preprocessor and Preprocessor Commands
- MySQL :: MySQL 5.0 Reference Manual :: 20.6.16.1 Problems Linking to the MySQL Client Library
- 【资源共享】完整版RK3399芯片手册《RK3399 Technical Reference Manual 1.4》
- BWA manual reference page
- ODBC Programmer Reference中文...
- Quick reference for manual unpacking
- iOS常见问题之 cannot create __weak reference in file using manual reference counting
- read the pragmatic programmer ---chapter 2
- PHP - Manual手册 - Function Reference函数参考 - File System Related Extensions文件系统相关扩展 - Filesystem文件系统 - Filesystem Functions文件系统函数 -
- 【MySQL 5.7 Reference Manual】15.4.12.1 InnoDB Temporary Table Undo Logs(InnoDB临时表Undo日志)
- [MySQL Reference Manual] 10 全球化
- C Reference Manual Reading Notes: 009 Preprocessor Lexical Conventions
- [Translating Project I] The Annotated C++ Reference Manual
- [读书笔记]A Programmer's Guide to Data Mining - chapter 1 Introduction