Information Security System Design Foundation Fourth Week study summary

Source: Internet
Author: User

The development history of $3.1x86

1 The flat mode of the DOS era, not distinguishing between user space and kernel space, very insecure
2-8086 segmented mode
3 IA32 Flat mode with protected mode

$3.2 Program Code1. Machine-Level code: Two abstractions of Machine-level compilation: The instruction set architecture and the storage address are virtual addresses. An instruction only performs a very basic operation. 2, about the format of the note: all with "." The lines that begin are all commands that know the assembler and linkerGcc-s xxx.c-o xxx.s Get assembly code, you can also use objdump-d XXX disassembly; Note the first two and the last two assembly code, all functions have, build function call stack frame, should understand, memorize. Note: 64-bit machine want to get 32 code: GCC-M32-S xxx.c MAC OS does not have objdump, there is a basic equivalent command otool ubuntu gcc-s code.c (without-o1) generated code closer to the textbook In the code (delete ".") The beginning of the statement)       $3.3 Data Format1. The word represents a 16-bit data type. There are three types of floating-point numbers: Single-precision, double-precision, and extended precision. 2. Three variants of the transfer instruction: Movb (transfer byte) MOVW (transfer word) MOVL (transfer words)$3.4 Access Information1, Operand indicator: Performs an action in which the source data value to be referenced has been prevented from the target location of the result. The operands are divided into three categories: immediate count, register, and memory. (three types of addressing methods learned by the assembly)        2. Data transfer instruction: MOV: The source operand is copied to the destination operand. Two operands cannot all point to registersa stack is a data structure that can add or remove values, following the principle of LIFO. push pushes into the stack, pop deletes data. One end of an element that can be inserted and deleted is called the top of the stack. The address of the top element of the stack is the lowest                 $3.5 arithmetic and logic operations1. Load valid address: Read data from memory to register.         2, unary operand and two operation number:a unary operand is both a source and a destination. Binary operand: The second number is both a source and a destination. ,3. Shift operation: First give the shift amount and then give the value of the shift. The shift amount can be an immediate number, or it can be placed in the single-word solution register element. 4, the above instruction can be used for both unsigned number operation and complement operation. 5, the special arithmetic operation:        $3.6 Control1. Conditional execution is required to determine the order of operation execution based on the results of the data test. 2, Condition code: CF carry mark. ZF 0 logo. SF symbol flag. of overflow flag.        How to use:①: Sets the byte to 1 or 0 according to a combination of the condition code②: Condition jumps to some other part of the program③: Conditional transfer of data        3. Jump instruction and its code: jump unconditionallyDirect jump: Jump target As part of the instruction code, give a label as a jump targetindirect jump: The jump target is read from register or memory, ' * ' followed by an operand indicator. other conditional directives can be found on 128 pages of reference books4. Translation Conditions BranchThe most common method of translating conditional expressions and statements from C to machine code combines conditional and unconditional jumps      5. Circulationthe assembly cycle can be combined with conditional tests and jumps to achieve6. Conditional Delivery InstructionsThe traditional way to implement conditional operations is to take advantage of controlled conditional shifts. Control transfer of actual use of datathe code that is based on conditional data transfer is better than the code based on conditional control transfer. 7. Switch statementmultiple branches can be based on a whole line value. Improve code readabilityThe switch statement is typical of multiple branches and uses a data type such as a jump table, which is faster and more efficient to search. so the key here is to understand that using a jump table is a very effective way to implement multiple branches. $3.7 Process1, stack frame structure: The machine stack to pass the process parameters, store return information, save register for later recovery and local storage. A partial stack assigned to a single process is called a stack frame%EBP is the frame pointer,%ESP is the stack pointer2. Transfer control:               

Information Security System Design Foundation Fourth Week study summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.