US 11,860,762 B2
Semiconductor device, control flow inspection method, non-transitory computer readable medium, and electronic device
Astha Jada, Tokyo (JP); Toshiki Kobayashi, Tokyo (JP); Takayuki Sasaki, Tokyo (JP); Daniele Enrico Asoni, Zurich (CH); and Adrian Perrig, Zurich (CH)
Assigned to NEC CORPORATION, Tokyo (JP)
Appl. No. 17/618,930
Filed by NEC Corporation, Tokyo (JP)
PCT Filed Jun. 25, 2019, PCT No. PCT/JP2019/025133
§ 371(c)(1), (2) Date Dec. 14, 2021,
PCT Pub. No. WO2020/261377, PCT Pub. Date Dec. 30, 2020.
Prior Publication US 2022/0245054 A1, Aug. 4, 2022
Int. Cl. G06F 9/44 (2018.01); G06F 11/36 (2006.01)
CPC G06F 11/3612 (2013.01) [G06F 11/3688 (2013.01)] 12 Claims
OG exemplary drawing
 
1. A semiconductor device comprising:
first storage apparatus configured to store, 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;
second storage apparatus, which is a cache for the first storage apparatus;
at least one memory configured to store instructions, and
at least one processor configured to execute the instructions to:
predict a storage area of the execution order inspection information based on prediction auxiliary information in a first code block of the plurality of code blocks and a control flow graph of the program, 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;
prefetch the predicted storage area from the first storage apparatus to the second storage apparatus;
determine, 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
calculate 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.