CN107301123A - A kind of signature arithmetic code error detection algorithm of table- driven - Google Patents
A kind of signature arithmetic code error detection algorithm of table- driven Download PDFInfo
- Publication number
- CN107301123A CN107301123A CN201710367340.1A CN201710367340A CN107301123A CN 107301123 A CN107301123 A CN 107301123A CN 201710367340 A CN201710367340 A CN 201710367340A CN 107301123 A CN107301123 A CN 107301123A
- Authority
- CN
- China
- Prior art keywords
- instruction
- node
- basic block
- cfid
- signature
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3636—Debugging of software by tracing the execution of the program
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3604—Analysis of software for verifying properties of programs
- G06F11/3612—Analysis of software for verifying properties of programs by runtime analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种表驱动的签名错误检测算法,该算法是基于有限状态自动机理论(FSM),在二维表(CFID表)中存储控制流图的信息,通过比较基本块中的签名和存储在CFID表中的签名检测出非法的指令跳转。对于CFCSS算法不能检测的共享分支扇入节点的非法指令跳转错误,本发明可成功检测出这类错误。实验结果显示,本发明平均错误检测覆盖率达到98.1%,并且本发明在每个基本块中插入的错误检测指令较CFCSS中的更少。The invention discloses a table-driven signature error detection algorithm. The algorithm is based on the theory of finite state automata (FSM), stores the information of the control flow graph in a two-dimensional table (CFID table), and compares the signatures in the basic blocks and the signature stored in the CFID table detects illegal instruction jumps. For the illegal instruction jump errors of shared branch fan-in nodes that cannot be detected by the CFCSS algorithm, the present invention can successfully detect such errors. Experimental results show that the average error detection coverage rate of the present invention reaches 98.1%, and the present invention inserts fewer error detection instructions in each basic block than that in CFCSS.
Description
技术领域technical field
本发明涉及纯软件错误检测技术领域,具体的说是一种表驱动的签名错误检测算法(EDSS),应用于合法的分支、不合法的分支以及带有两个共享分支扇入节点的非法分支等的错误检测。The present invention relates to the technical field of pure software error detection, specifically a table-driven signature error detection algorithm (EDSS), which is applied to legal branches, illegal branches and illegal branches with two shared branch fan-in nodes etc. error detection.
背景技术Background technique
随着技术的发展,微处理器性能的改善将越来越依赖于体积更小、速度更快的晶体管,并同时实现低阈值电压和更加严格的噪声余量。然而,这种对改善性能、降低功耗的常规需求却常常导致很多可靠性问题的出现。不同于制造与设计性错误等频繁产生的错误,临时性错误(也常被称作软错误),源于诸如电磁干扰、电压毛刺或高能量粒子等的环境影响,常常会导致不可预测的行为。最典型的软错误是单粒子翻转(SEU),该错误指的是发生在顺序逻辑以及单粒子瞬变(SET)中的位翻转,容忍这些错误最首要和最重要的步骤就是检测出这些错误,目前已有相当多的错误检测技术。As technology develops, improvements in microprocessor performance will increasingly rely on smaller, faster transistors while achieving low threshold voltages and tighter noise margins. However, this general need to improve performance and reduce power consumption often leads to many reliability problems. Unlike frequent errors such as manufacturing and design errors, temporary errors (also often referred to as soft errors), resulting from environmental effects such as electromagnetic interference, voltage glitches, or high-energy particles, often lead to unpredictable behavior . The most typical soft error is single event upset (SEU), which refers to bit flips that occur in sequential logic and single event transients (SET). The first and most important step in tolerating these errors is to detect these errors , there are quite a few error detection techniques.
错误检测可以通过纯硬件方式、软硬件结合方式以及纯软件方式得以实现。一种常用的纯硬件检错方式运用了看门狗协处理器,该处理器通过监测外部总线和主处理器的行为,实现并发的系统级错误检测,但却导致了时间和面积开销的增大,并且随着具有内部高速缓存和现代流水线技术的微处理器的广泛应用,这种纯硬件检错方式已经显得不必要了。现在用于错误检测的软硬件混合型的检错方式也有很多,例如Argus和CRAFT。Argus基于冯诺依曼型处理器核,可检测出核中除输入输出、异常、中断部分的其他错误。然而,包括通过纯软件签名的控制流检测(CFCSS)、通过断言的控制流检测(ACFC)、运用断言的增强型的控制流检测(ECCA)、通过冗余指令的错误检测(EDDI)等在内的纯软件处理方法,比上述这两种概念运用的更加广泛,因为这些纯软件检错方式不要求特定的硬件设备提供支持。ACFC在执行过程中赋予每一个基本块一个奇偶校验位,可检测出奇偶性错误;EDDI通过复制指令,并通过插入合适的检测指令进行验证,但这种方法易导致代码容量增加近100%以及性能方面的损失。Error detection can be realized by pure hardware, combination of software and hardware, and pure software. A common hardware-only approach to error detection uses a watchdog coprocessor that monitors the behavior of external buses and the host processor to enable concurrent system-level error detection, but results in increased time and area overhead. Large, and with the widespread use of microprocessors with internal caches and modern pipeline technology, this pure hardware error detection method has become unnecessary. There are also many mixed software and hardware error detection methods for error detection, such as Argus and CRAFT. Argus is based on the von Neumann processor core, which can detect other errors in the core except input and output, exception and interrupt. However, including control flow inspection through pure software signatures (CFCSS), control flow inspection through assertions (ACFC), enhanced control flow inspection using assertions (ECCA), error detection through redundant instructions (EDDI), etc. The pure software processing methods in the system are more widely used than the above two concepts, because these pure software error detection methods do not require specific hardware devices to provide support. ACFC assigns a parity bit to each basic block during execution, which can detect parity errors; EDDI verifies by copying instructions and inserting appropriate detection instructions, but this method easily leads to an increase in code capacity by nearly 100% and loss of performance.
发明内容Contents of the invention
本发明的目的是提供一种表驱动的签名错误检测算法EDSS,该算法运用CFID表能检测出控制流图中非法跳转错误,对二维表使用的要求也较为简单。当出现非法跳转时,通过检测赋予变量Reg的签名和表中存储的目标节点的签名,控制流错误能被可靠检测出。根据这种方法,共享多于两个扇入节点导致的非法指令跳转错误也可由该算法得以检测。该算法良好的解决了合法的分支、不合法的分支以及带有两个共享分支扇入节点的非法分支等的错误检测问题。The object of the present invention is to provide a table-driven signature error detection algorithm EDSS, which can detect illegal jump errors in the control flow diagram by using CFID tables, and the requirements for the use of two-dimensional tables are relatively simple. When an illegal jump occurs, control flow errors can be reliably detected by checking the signature assigned to the variable Reg and the signature of the target node stored in the table. According to this method, illegal instruction jump errors caused by sharing more than two fan-in nodes can also be detected by the algorithm. This algorithm well solves the problem of error detection of legal branches, illegal branches and illegal branches with fan-in nodes of two shared branches.
本发明的目的是这样实现的:The purpose of the present invention is achieved like this:
一种表驱动的签名错误检测算法,特点是该检测算法包括以下具体步骤:A table-driven signature error detection algorithm is characterized in that the detection algorithm includes the following specific steps:
步骤1:确定所有基本块,即节点,建立程序P的控制流图,为每一个节点编号,即基本块标识号,在控制流图中以自然数开始,即vi, i=1, 2….N;Step 1: Determine all basic blocks, that is, nodes, establish a control flow graph of program P, number each node, that is, the basic block identification number, and start with a natural number in the control flow graph, namely vi, i=1, 2.... N;
步骤2:对每一个节点vi都赋予一个签名SSi,如果i≠j, 则SSi≠SSj,其中i,j=1,2,…N;每一个签名 SSi 与相应的基本块标识vi中的i相等;Step 2: Assign a signature SSi to each node vi, if i≠j, then SSi≠SSj, where i, j=1, 2,...N; each signature SSi and the corresponding basic block identify i in vi equal;
步骤3:对每一个vi,i=1,2,3…,进行如下操作:Step 3: For each vi,i=1,2,3..., do the following:
a)对每一个分支bri,j ,它的前驱节点为vi ,后继节点为vj;这些分支由一个二维表表示,该二维表称为CFID[i,j];在该表中,行i表示前驱节点,列j表示后继节点;a) For each branch bri,j, its predecessor node is vi, and its successor node is vj; these branches are represented by a two-dimensional table called CFID[i,j]; in this table, the row i represents the predecessor node, column j represents the successor node;
b)如果分支 bri,j在控制流图中,将后继节点的签名SSj 填入CFID[i,j]对应的位置;否则CFID[i,j]位置应填入0值;b) If the branch bri,j is in the control flow graph, fill the signature SSj of the successor node into the position corresponding to CFID[i,j]; otherwise, the position of CFID[i,j] should be filled with 0;
c)Reg寄存器中存储的全局变量在基本块每一次执行其检测指令时都更新一次,以跟踪程序执行过程中签名的变化;c) The global variable stored in the Reg register is updated every time the basic block executes its detection instruction, so as to track the change of the signature during program execution;
d)在基本块的初始位置插入一条判断指令,“if SSi≠CFID[Reg,SSi] error elseReg=SSi”,即判断SSi与CFID[Reg,SSi]是否相等,如果相等,则将SSi赋值给Reg,如果不相等,则报错。d) Insert a judgment instruction at the initial position of the basic block, "if SSi≠CFID[Reg,SSi] error elseReg=SSi", that is to judge whether SSi is equal to CFID[Reg,SSi], if they are equal, assign SSi to Reg, if not equal, report an error.
所述二维表是一个二维数组,对应i行j列位置上的数值即为CFID[i,j],代表控制流中的位置标识和跳转路径;行数值i表示前驱节点的标识号,列数值j表示当前节点的标识号;The two-dimensional table is a two-dimensional array, and the value corresponding to row i and column j is CFID[i,j], which represents the position identifier and jump path in the control flow; the row value i represents the identification number of the predecessor node , the column value j represents the identification number of the current node;
所述基本块指的是一串连续的指令,程序从基本块中的第一条指令开始执行,在执行完最后一条指令后离开基本块;除了基本块中的最后一条指令不做要求外,基本块中的其余指令均不允许为分支指令、跳转指令或者调用指令。The basic block refers to a series of continuous instructions, and the program starts to execute from the first instruction in the basic block, and leaves the basic block after executing the last instruction; except that the last instruction in the basic block is not required, The remaining instructions in the basic block are not allowed to be branch instructions, jump instructions or call instructions.
所述控制流图由节点集合V={v1,v2,…,vi,…vn}和路径集合E={e1,e2,…,ei,…,em}组成,控制流图准确描述程序P的控制流,即程序P表示为P={V,E};一个节点vi表示一个基本块,其中i为正整数,表示基本块在程序中的位置;一条路径表示从vi到vj的分支bri,j;bri,j代表分支指令,跳转指令、子程序调用指令或返回指令。The control flow graph is composed of a node set V={v1,v2,...,vi,...vn} and a path set E={e1,e2,...,ei,...,em}, and the control flow graph accurately describes the program P Control flow, that is, the program P is expressed as P={V,E}; a node vi represents a basic block, where i is a positive integer, indicating the position of the basic block in the program; a path represents the branch bri from vi to vj, j; bri, j represents a branch instruction, a jump instruction, a subroutine call instruction or a return instruction.
本发明在通过软件签名的控制流检错方式(CFCSS)的基础上,提出了一种基于表驱动的签名错误检测算法。该算法是基于有限状态自动机理论(FSM),在二维表(CFID表)中存储控制流图的信息,通过比较基本块中的签名和存储在CFID表中的签名检测出非法的指令跳转。对于CFCSS算法不能检测的共享分支扇入节点的非法指令跳转错误,本发明(EDSS算法)可成功检测出这类错误。The present invention proposes a table-driven signature error detection algorithm on the basis of the control flow error detection method (CFCSS) through software signature. The algorithm is based on the finite state automata theory (FSM), stores the information of the control flow graph in a two-dimensional table (CFID table), and detects illegal instruction jumps by comparing the signature in the basic block with the signature stored in the CFID table change. For the illegal instruction jump errors of shared branch fan-in nodes that cannot be detected by the CFCSS algorithm, the present invention (EDSS algorithm) can successfully detect such errors.
本发明在CFCSS基础上,结合有限状态自动机理论(FSM)和控制流图的基本原理,与先前在CFCSS中使用的方法完全不同。编译时,控制流图中的信息,包括各节点之间的关系,都是通过构建一张二维CFID表表达的。表中存储着控制流图合法路径中目标节点的签名。当出现非法跳转时,通过检测赋予变量Reg的签名和表中存储的目标节点的签名,控制流错误能被可靠检测出。On the basis of CFCSS, the present invention combines the basic principles of finite state automaton theory (FSM) and control flow graph, which is completely different from the method previously used in CFCSS. When compiling, the information in the control flow graph, including the relationship between nodes, is expressed by constructing a two-dimensional CFID table. The table stores the signature of the target node in the legal path of the control flow graph. When an illegal jump occurs, control flow errors can be reliably detected by checking the signature assigned to the variable Reg and the signature of the target node stored in the table.
本发明的有益效果:Beneficial effects of the present invention:
本发明运用CFID表能检测出控制流图中非法跳转错误,并且对二维表使用的要求也较为简单。The invention uses the CFID table to detect illegal jump errors in the control flow diagram, and the requirements for the use of the two-dimensional table are relatively simple.
本发明优势在于它的简洁性,在检测指令中,无需按位异或操作指令来计算动态签名,而仅需要在每个基本块上进行比较操作。The advantage of the present invention lies in its succinctness. In the detection instruction, there is no need to calculate the dynamic signature by a bitwise XOR operation instruction, but only need to perform a comparison operation on each basic block.
本发明可以实现对合法的分支,不合法的分支以及带有两个共享分支扇入节点的非法分支等的错误检测。The invention can realize error detection of legal branches, illegal branches, illegal branches with two shared branch fan-in nodes, and the like.
尽管典型的可靠系统均要求通过硬件技术来定位临时性错误,但纯软件技术能够提供更低消耗和更灵活的选择。本发明提出的技术就是一项纯软件错误检测技术,该技术使用一张二维表和签名来监测目标程序的控制流。程序编译时,每个基本块都被赋予了数值各异的整数值签名,这些签名被保存在相应的基本块和一张二维表的对应位置。通过这些签名的比较,系统可检测出控制流图(CFG)中的任何异常情况,并可采取合适的措施以避免错误结果的输出。While typical reliable systems require hardware techniques to locate temporary errors, pure software techniques offer lower cost and more flexible options. The technology proposed by the invention is a pure software error detection technology, which uses a two-dimensional table and a signature to monitor the control flow of the target program. When the program is compiled, each basic block is given an integer value signature with different values, and these signatures are stored in the corresponding positions of the corresponding basic block and a two-dimensional table. Through the comparison of these signatures, the system can detect any abnormal situation in the control flow graph (CFG), and can take appropriate measures to avoid the output of erroneous results.
本发明对比于已有的CFCSS错误检测技术,在不增加代码空间开销和对程序性能影响更小的前提下,解决了CFCSS算法不能检测的两个或多个共享扇入节点非法跳转的问题,提高了控制流错误检测的覆盖率。本发明的平均错误检测覆盖率为98.1%(比CFCSS技术高出1.3%),并且在每个基本块中为错误检测插入的指令数相对更少。Compared with the existing CFCSS error detection technology, the present invention solves the problem of illegal jump of two or more shared fan-in nodes that cannot be detected by the CFCSS algorithm without increasing code space overhead and having less impact on program performance , improving the coverage of control flow error detection. The average error detection coverage rate of the present invention is 98.1% (1.3% higher than the CFCSS technology), and the number of instructions inserted for error detection in each basic block is relatively less.
附图说明Description of drawings
图1为本发明中合法指令跳转的检测示意图;Fig. 1 is the detection schematic diagram of legal instruction jump among the present invention;
图2为本发明中非法指令跳转的检测示意图;Fig. 2 is the detection schematic diagram of illegal instruction jump among the present invention;
图3为本发明中两个共享分支扇入节点的非法指令跳转的检测示意图;FIG. 3 is a schematic diagram of detection of illegal instruction jumps of two shared branch fan-in nodes in the present invention;
图4为本发明与CFCSS的检错覆盖率比较图;Fig. 4 is the error detection coverage comparison figure of the present invention and CFCSS;
图5为本发明中多扇入节点问题中CFCSS与本发明的检错能力比较图。FIG. 5 is a comparison diagram of the error detection capabilities of CFCSS and the present invention in the multi-fan-in node problem in the present invention.
具体实施方式detailed description
以下结合附图对本发明进行详细的描述。The present invention will be described in detail below in conjunction with the accompanying drawings.
附图1是对不带共享扇入节点的允许执行分支的检测,图中所有基本块都已被标识且编号。如附图1左边所示,每一个基本块都被赋予了不同的且与其自身位置标识相等的数值。附图1右边表明了检测指令是如何进行错误检测的。当程序执行到v3时,在接着执行v3中的指令之前,SS3与 CFID[Reg, SS3]的比较应首先执行。Reg是一个用于存储动态签名的全局变量,该全局变量被储存在分配好的寄存器中。如果SS3 与 CFID[Reg, SS3]的相等关系成立,即若brReg,3是一条合法的分支,则Reg将被更新为SS3,且该基本块中的原指令将被继续执行,直到程序执行到下一基本块v6。接下去SS6 与 CFID[Reg, SS6]的比较同上个基本块一样被执行。如果brReg,6是一条非法的分支,CFID[Reg,SS6]对应的值一定为0而不是SS6,错误语句被执行,从而控制流错误被检测出。Accompanying drawing 1 is the detection of the allowed execution branch without shared fan-in nodes, and all basic blocks in the figure have been identified and numbered. As shown on the left side of FIG. 1 , each basic block is assigned a different value that is equal to its own position identifier. The right side of accompanying drawing 1 shows how the detection instruction performs error detection. When the program executes to v3, the comparison of SS3 with CFID[Reg, SS3] shall be performed first before proceeding to execute the instructions in v3. Reg is a global variable used to store dynamic signatures, which are stored in allocated registers. If the equality relationship between SS3 and CFID[Reg, SS3] is established, that is, if brReg,3 is a legal branch, Reg will be updated to SS3, and the original instructions in the basic block will continue to be executed until the program execution reaches Next basic block v6. The next comparison of SS6 with CFID[Reg, SS6] is performed as in the previous basic block. If brReg,6 is an illegal branch, the value corresponding to CFID[Reg,SS6] must be 0 instead of SS6, the error statement is executed, and the control flow error is detected.
附图2表示一条非法跳转指令的执行以及该错误是如何被检测出的。这种情况下的控制流错误可分为两种情况:一种指向if条件语句的非法跳转;另一种指向下一基本块中间位置的非法跳转。在非法跳转br1,4被执行前,Reg有原值SS1。前一种情况下,当程序执行到v4的if 语句时,CFID[Reg,SS4]从存储在缓存器cache中的二维CFID表中读出,并且由于br1,4是不被允许的,CFID[Reg,SS4]对应的值为0。因此,这种不匹配导致接下去的“error”指令将控制流转移到出错处理程序中。Figure 2 shows the execution of an illegal jump instruction and how the error is detected. The control flow error in this case can be divided into two cases: one is an illegal jump pointing to the if conditional statement; the other is an illegal jump pointing to the middle of the next basic block. Before the illegal jump br1,4 is executed, Reg has the original value SS1. In the former case, when the program executes to the if statement of v4, CFID[Reg,SS4] is read from the two-dimensional CFID table stored in the cache, and since br1,4 is not allowed, CFID [Reg, SS4] corresponds to 0. Therefore, this mismatch causes the following "error" instruction to transfer control flow to the error handler.
而在后一种情况下,跳转到基本块中间部分的非法跳转在本发明(EDSS算法)下也可被检测出来。但是由于分支跳过了v4的检测指令,检测产生延迟。从v1到v4的非法跳转产生,程序控制转移到v4中的一条指令。Reg保持v1中的签名不变,直到程序在执行了v4中的指令后运行到v7。显然,这种情况下CFID[Reg,v7]的对应值为0,这与SS7不同,所以,条件分支指令“if SS7≠CFID[Reg,SS7] error else Reg=SS7”应跳转到出错处理程序。In the latter case, the illegal jump to the middle part of the basic block can also be detected under the present invention (EDSS algorithm). But because the branch skips the v4 test instruction, the test is delayed. An illegal jump from v1 to v4 occurs, and program control is transferred to an instruction in v4. Reg keeps the signature in v1 unchanged until the program runs to v7 after executing the instructions in v4. Obviously, in this case, the corresponding value of CFID[Reg,v7] is 0, which is different from SS7, so the conditional branch instruction "if SS7≠CFID[Reg,SS7] error else Reg=SS7" should jump to error handling program.
附图3显示了多个节点共享多个分支扇入节点作为目标节点的情况。在CFCSS技术下易发生指令跳转混淆的问题,但本发明(EDSS算法)为其提供了简单的解决办法,避免了混淆问题的出现。附图3中,v7为一个有3个前驱节点v3,v4,v5( pred(v7)= {v3,v4,v5})的分支扇入节点。根据本发明的算法,SS7被分别填入CFID[3,7], CFID[4,7] 和CFID[5,7]中。节点v8也是一个分支扇入节点,但只有两个前驱节点v4,v5,不包括v3,即pred(v8)={v4, v5}。因此,CFID[4,8] 和CFID[5,8]中均存储着SS8 ,而 CFID[3,8] 中存储着0值。程序允许的跳转指令br4,7、br5,8以图2中显示的相同方式被检测和执行。假设一条非法跳转br3,8出现,并执行到v8的检测指令位置,在该位置进行CFID[Reg,8]与SS8的比较。Reg在该非法跳转执行前的值为SS3,且CFID[3,8]在二维CFID表中的对应值为0,因此该控制流错误就被检测出来了,如果非法的指令分支指向目标基本块中除if-else检测指令之外的其他位置,其中产生的控制流错误一样可通过未在v8中进行更新的全局变量Reg被检测出。由此看来,只要各个节点被赋予了签名,建立了本发明(EDSS算法)的二维CFID表,就可避免CFCSS中新产生的无法检测出的非法指令跳转错误。Figure 3 shows a situation where multiple nodes share multiple branch fan-in nodes as target nodes. The problem of instruction jump confusion is prone to occur under the CFCSS technology, but the present invention (EDSS algorithm) provides a simple solution for it and avoids the occurrence of the confusion problem. In the accompanying drawing 3, v7 is a branch fan-in node with 3 precursor nodes v3, v4, v5 (pred(v7)={v3,v4,v5}). According to the algorithm of the present invention, SS7 is filled in CFID[3,7], CFID[4,7] and CFID[5,7] respectively. Node v8 is also a branch fan-in node, but there are only two precursor nodes v4, v5, excluding v3, that is, pred(v8)={v4, v5}. Therefore, SS8 is stored in both CFID[4,8] and CFID[5,8], while 0 is stored in CFID[3,8]. The program-allowed jump instructions br4,7, br5,8 are detected and executed in the same manner as shown in FIG. 2 . Assume that an illegal jump br3,8 occurs, and executes to the detection instruction position of v8, where CFID[Reg,8] is compared with SS8. The value of Reg before the execution of the illegal jump is SS3, and the corresponding value of CFID[3,8] in the two-dimensional CFID table is 0, so the control flow error is detected. If the illegal instruction branch points to the target Control flow errors generated in basic blocks other than if-else detection instructions can also be detected through the global variable Reg that has not been updated in v8. From this point of view, as long as each node is given a signature and the two-dimensional CFID table of the present invention (EDSS algorithm) is established, the newly generated illegal command jump error that cannot be detected in the CFCSS can be avoided.
类似CFCSS的算法设计,本发明(EDSS算法)相比之下更加简洁和高效。节点中没有嵌入指令来计算动态运行时的签名,同样,也没有多余的指令在运行过程中调整签名。当一个程序进行编译时,本发明给程序控制流图中的每一个节点赋予了一个签名,N等于程序中的节点总数。Similar to the algorithm design of CFCSS, the present invention (EDSS algorithm) is more concise and efficient in comparison. There are no instructions embedded in nodes to compute signatures at runtime dynamically, and likewise, there are no redundant instructions to adjust signatures on the fly. When a program is compiled, the present invention assigns a signature to each node in the program control flow diagram, and N is equal to the total number of nodes in the program.
附图4显示了本发明(EDSS算法)有着和CFCSS一样的检错覆盖率,由此可知,本发明具备CFCSS一样的错误检测能力,满足错误检测的要求。Figure 4 shows that the present invention (EDSS algorithm) has the same error detection coverage as CFCSS, so it can be seen that the present invention has the same error detection capability as CFCSS and meets the requirements of error detection.
附图5显示了在算法增加的代码空间开销方面的比较,本发明(EDSS算法)优于CFCSS。本发明在对签名的计算方面不要求在程序中插入计算动态签名的指令,这就相应地减少了插入指令的数目。在这方面,CFCSS技术给每个基本块设置了3条指令,而本发明给每个基本块仅设置2条指令。Accompanying drawing 5 shows the comparison in the code space overhead that the algorithm increases, and the present invention (EDSS algorithm) is better than CFCSS. In terms of signature calculation, the present invention does not require inserting instructions for calculating dynamic signatures in the program, which reduces the number of inserted instructions correspondingly. In this respect, the CFCSS technology sets 3 instructions for each basic block, but the present invention only sets 2 instructions for each basic block.
本发明的保护内容不局限于以上实施例。在不背离发明构思的精神和范围下,本领域技术人员能够想到的变化和优点都被包括在本发明中,并且以所附的权利要求书为保护范围。The protection content of the present invention is not limited to the above embodiments. Without departing from the spirit and scope of the inventive concept, changes and advantages conceivable by those skilled in the art are all included in the present invention, and the appended claims are the protection scope.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710367340.1A CN107301123A (en) | 2017-05-23 | 2017-05-23 | A kind of signature arithmetic code error detection algorithm of table- driven |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710367340.1A CN107301123A (en) | 2017-05-23 | 2017-05-23 | A kind of signature arithmetic code error detection algorithm of table- driven |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107301123A true CN107301123A (en) | 2017-10-27 |
Family
ID=60137304
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710367340.1A Pending CN107301123A (en) | 2017-05-23 | 2017-05-23 | A kind of signature arithmetic code error detection algorithm of table- driven |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107301123A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111221670A (en) * | 2019-10-21 | 2020-06-02 | 西安空间无线电技术研究所 | A Single Event Soft Error Protection Design Method to Mitigate Detection Conflicts |
| CN115698984A (en) * | 2020-06-18 | 2023-02-03 | 华为技术有限公司 | Graph instruction processing method and device |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040034794A1 (en) * | 2000-05-28 | 2004-02-19 | Yaron Mayer | System and method for comprehensive general generic protection for computers against malicious programs that may steal information and/or cause damages |
| CN101763291A (en) * | 2009-12-30 | 2010-06-30 | 中国人民解放军国防科学技术大学 | Method for detecting error of program control flow |
| CN101944064A (en) * | 2010-10-12 | 2011-01-12 | 中国人民解放军国防科学技术大学 | Control flow error detection optimizing method based on reconstructed control flow graph |
-
2017
- 2017-05-23 CN CN201710367340.1A patent/CN107301123A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040034794A1 (en) * | 2000-05-28 | 2004-02-19 | Yaron Mayer | System and method for comprehensive general generic protection for computers against malicious programs that may steal information and/or cause damages |
| CN101763291A (en) * | 2009-12-30 | 2010-06-30 | 中国人民解放军国防科学技术大学 | Method for detecting error of program control flow |
| CN101944064A (en) * | 2010-10-12 | 2011-01-12 | 中国人民解放军国防科学技术大学 | Control flow error detection optimizing method based on reconstructed control flow graph |
Non-Patent Citations (1)
| Title |
|---|
| 陈建 等: ""表驱动的纯软件签名错误检测算法"", 《HTTP://WWW.DOC88.COM/P-3973568240860.HTML》 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111221670A (en) * | 2019-10-21 | 2020-06-02 | 西安空间无线电技术研究所 | A Single Event Soft Error Protection Design Method to Mitigate Detection Conflicts |
| CN111221670B (en) * | 2019-10-21 | 2023-03-28 | 西安空间无线电技术研究所 | Single-particle soft error protection design method for relieving detection conflict |
| CN115698984A (en) * | 2020-06-18 | 2023-02-03 | 华为技术有限公司 | Graph instruction processing method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101763291B (en) | Method for detecting error of program control flow | |
| US8412980B2 (en) | Fault tolerant stability critical execution checking using redundant execution pipelines | |
| US8996926B2 (en) | DMA integrity checker | |
| US7334161B2 (en) | Breakpoint logic unit, debug logic and breakpoint method for a data processing apparatus | |
| KR101546033B1 (en) | Reliable execution using compare and transfer instruction on an smt machine | |
| US20150106588A1 (en) | Computer Processor Employing Hardware-Based Pointer Processing | |
| US8266597B2 (en) | Dynamically patching computer code using breakpoints | |
| US9367374B2 (en) | Handling system interrupts with long running recovery actions | |
| Gupta et al. | SHAKTI-F: A fault tolerant microprocessor architecture | |
| US9348681B2 (en) | Apparatus and method for detecting fault of processor | |
| TW201734768A (en) | Branch instruction | |
| CN108491317B (en) | A SDC Error Detection Method Based on Instruction Vulnerability Analysis | |
| CN105630732A (en) | Hot switching method for dual-mode redundant microprocessor | |
| US20070239917A1 (en) | Interrupt routing within multiple-processor system | |
| CN107301123A (en) | A kind of signature arithmetic code error detection algorithm of table- driven | |
| Geier et al. | Compasec: a compiler-assisted security countermeasure to address instruction skip fault attacks on RISC-V | |
| Kumar et al. | On-line detection of faults in carry-select adders | |
| US20070067677A1 (en) | Program-controlled unit and method | |
| US9003198B2 (en) | Method and apparatus for data processing | |
| Maghsoudloo et al. | An efficient adaptive software-implemented technique to detect control-flow errors in multi-core architectures | |
| Sedaghat et al. | A software-based error detection technique using encoded signatures | |
| US20100017579A1 (en) | Program-Controlled Unit and Method for Operating Same | |
| US20090217107A1 (en) | Method and Device for Data Processing | |
| US20100011183A1 (en) | Method and device for establishing an initial state for a computer system having at least two execution units by marking registers | |
| CN100514284C (en) | Microprocessor with integral procedure transfer computing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20171027 |