A branch result determination method and device for security protection

By determining the branch result in advance during the decoding stage, the performance loss and vulnerability attacks caused by disabling branch prediction in existing technologies are solved. This achieves security protection while reducing performance loss and prevents malicious code from leaking information during the processor recovery window.

CN115658151BActive Publication Date: 2026-07-14NAT UNIV OF DEFENSE TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NAT UNIV OF DEFENSE TECH
Filing Date
2022-11-10
Publication Date
2026-07-14

Smart Images

  • Figure CN115658151B_ABST
    Figure CN115658151B_ABST
Patent Text Reader

Abstract

The application discloses a branch result fast determination method and device for security protection, and comprises the following steps: in the instruction fetch stage, the conditional branch instruction is identified and pre-decoded; the branch target address and the branch result of the conditional branch instruction are calculated in advance in the decoding stage, and the pipeline control and the selection of the program counter PC value are carried out according to the branch result to read the next instruction, so that the determination of the branch result of the conditional branch instruction is advanced from the execution stage to the decoding stage to reduce the recovery window of the conditional branch instruction. The branch result which can be determined only in the execution stage (EX) of the processor pipeline is advanced to the instruction decoding stage (ID) in the application, the window period of the processor for processing error prediction and recovery is reduced, the malicious code does not have enough clock cycles to complete the task, the process of the ghost series vulnerability attack is destroyed, the security protection purpose is achieved, and the performance loss caused by the existing protection measures is reduced.
Need to check novelty before this filing date? Find Prior Art