Patent ID: 11860762
Assignee: NEC CORPORATION
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 11:
12. A non-transitory computer readable medium storing a control flow inspection program causing a computer comprising:
first storage apparatus for storing, in advance, a plurality of pieces of execution order inspection information used for inspection of an execution order of a plurality of code blocks in a predetermined program; and
second storage apparatus, which is a cache for the first storage apparatus, to execute:
processing of acquiring prediction auxiliary information in a first code block of the plurality of code blocks and a control flow graph of the program;
processing of predicting a storage area of the execution order inspection information based on the prediction auxiliary information and the control flow graph, the storage area being a prefetch target to be prefetched from the first storage apparatus to the second storage apparatus, and the storage area being predicted as the prefetch target in accordance with execution of an inspection instruction of control flow integrity configured in the first code block;
processing of prefetching the predicted storage area from the first storage apparatus to the second storage apparatus;
processing of determining, at a time of execution of an inspection instruction of control flow integrity configured in a third code block that has been executed after the first code block, an access destination to be one of the first storage apparatus and the second storage apparatus based on the prediction auxiliary information in the third code block, and acquire first execution order inspection information that corresponds to the current execution order of the third code block from the determined access destination; and
processing of calculating second execution order inspection information that corresponds to the current execution order of the third code block and inspect whether it is possible to execute a code block executed after the third code block in accordance with the result of comparing the acquired first execution order inspection information with the calculated second execution order inspection information.