tum-i4 / self-checksumming

10 stars 6 forks source link

SC metadata is inconsistent with what OH expects #37

Closed mr-ma closed 6 years ago

mr-ma commented 6 years ago

We are interested in identifying instructions which are protected by SC in other passes. For instance, OH will use this info to conclude two things - 1) Explicit doubly protected instructions which are protected by both the SC and OH, and 2) Implicit doubly protected instructions whose SC guard is protected by OH. The former only materializes when SC checkees are input independent, otherwise OH can't protect them. The latter, however occurs when SC gaurds are placed in input independent branches, where OH can hash them.

For 1 we mark checkee instructions with checkee metadata. OH, or any other pass, can check this tag to identify explicit protections. To support 2 we add a guard metadata to SC guard instructions, merely to the guardMe calls. To connect a guard to its checkee on at the OH end, or any other pass, guard metadata includes checkees' function names as well. E.g. guardMe(0x,0x,0x) !guard f1, where f1 is the name of the checkee