Reconstructing control flow graph for control flow checking

In the space radiation environment, a large number of cosmic rays often lead to transient faults on the on-board computer. These transient faults result in data flow errors or control flow errors during program running. The present software implemented hardware fault tolerant technology mainly uses the signature analysis method to realize the control flow checking, namely, through assigning signature for each basic block and inserting some instructions into every basic block to realize the control flow checking. Because the size of different basic blocks in one program usually exist obvious difference, applying unified checking method for these basic blocks will reduce the protection efficiency. To solve this problem, this paper has proposed a control flow checking optimization method named RCFG by reconstructing control flow graph. RCFG firstly merges basic blocks into larger logic blocks, then cuts the logic blocks into basic logic blocks with similar size. At last, control flow detection algorithm can be applied based on the control flow graph composed with the basic logic blocks. RCFG can effectively improve the protection efficiency of algorithm, and user can regulate the balance between performance and reliability by configuring the size of basic logic block. This paper has finished the fault injection experiment for a typical signature analysis algorithm named CFCSS. According to the experiment result, compared with the original CFCSS algorithm, the average performance expense of the CFCSS algorithm implemented based on RCFG increased by 16.6%, and the average memory expense increased by 13.5%, but the number of the faults resulting in the program outputting wrong result reduced by 47.67% equally.