发明名称 CONTROL FLOW GRAPH FLATTENING DEVICE AND METHOD
摘要 Control Flow Graph flattening of a function of software code comprising a plurality of basic blocks having an address and at least one instruction. A processor (710) creates (508) a dispatcher basic block comprising instructions to look up an address in a jump table and to jump to the address, creates (510) the jump table associating a label (X i ) of each basic block with the address of the basic block, creates (512) a coefficient array comprising diffusion function coefficients, replaces (514) a Jump terminal instruction by a jump to the dispatcher basic block in each of the plurality of basic blocks, creates and inserts (518) a first branch function (B1 i ()) and a second branch function (B2 i ()), the first branch function (B1 i ()) calculating the label (X i+1 ) of a subsequent basic block based on a diffusion function (D Pi ) for the present basic block, the second branch function (B2 i ()) calculating the diffusion function index (P i+1 ) of the subsequent basic block based on the present diffusion function index (P i ), creates and inserts (524) a transition function (F()) into the dispatcher basic block, the transition function obtaining the address in the jump table based on at least the label (X i+1 ) of a subsequent basic block, and creates and inserts (522) diffusion functions (D Pi ) in the plurality of basic blocks, each diffusion function calculating a value based on at least one diffusion coefficient in the coefficient array and the label (X i ) of the present basic block.
申请公布号 EP3012764(A1) 申请公布日期 2016.04.27
申请号 EP20150190953 申请日期 2015.10.22
申请人 THOMSON LICENSING 发明人 SALMON-LEGAGNEUR, CHARLES;MONSIFROT, ANTOINE
分类号 G06F21/14;G06F9/30;G06F9/45 主分类号 G06F21/14
代理机构 代理人
主权项
地址