Low-level code rewriter verification
First Claim
1. A process for verifying operation of a low-level rewriter, the process utilizing a device which has at least one logical processor in operable communication with at least one memory, the process comprising the steps of:
- obtaining initial low-level file(s) containing code and metadata;
generating rewritten low-level file(s) from the initial low-level file(s) by applying the low-level rewriter to the initial low-level file(s) independently of any low-level code transformation; and
comparing metadata of the initial low-level file(s) with matching metadata of the rewritten low-level file(s) for semantic equivalence, wherein the comparing step comprises at least one of the following;
testing for equality between flag(s) of a metadata entity of the initial low-level file(s) and flag(s) of a matching metadata entity of the rewritten low-level file(s);
testing for equality between a string of a metadata entity of the initial low-level file(s) and a string of a matching metadata entity of the rewritten low-level file(s);
testing for equality between field(s) of a metadata entity of the initial low-level file(s) and field(s) of a matching metadata entity of the rewritten low-level file(s);
testing for equality between method(s) of a metadata entity of the initial low-level file(s) and method(s) of a matching metadata entity of the rewritten low-level file(s).
2 Assignments
0 Petitions
Accused Products
Abstract
Verification of low-level rewriters such as binary rewriters involves “vanilla” rewriting a file to generate a rewritten low-level file without performing any optimization, compaction, or other substantive low-level code transformation during the rewrite. Then the metadata of the original low-level file is automatically compared with matching metadata of the rewritten low-level file for semantic equivalence. A properly functioning rewriter produces semantically equivalent files, whereas a defective rewriter may produce files whose metadata semantics differ. Comparison may distinguish composite metadata entities from self-contained metadata entities, and transitive closures of metadata may be compared. Comparison may also test for bitwise equality of self-contained metadata entities, and test for equality between respective flags, strings, fields, and/or methods of the original and rewritten files. Syntactic variants may be detected during comparison, and metadata may be converted into a canonical form to facilitate comparison.
-
Citations
19 Claims
-
1. A process for verifying operation of a low-level rewriter, the process utilizing a device which has at least one logical processor in operable communication with at least one memory, the process comprising the steps of:
-
obtaining initial low-level file(s) containing code and metadata; generating rewritten low-level file(s) from the initial low-level file(s) by applying the low-level rewriter to the initial low-level file(s) independently of any low-level code transformation; and comparing metadata of the initial low-level file(s) with matching metadata of the rewritten low-level file(s) for semantic equivalence, wherein the comparing step comprises at least one of the following; testing for equality between flag(s) of a metadata entity of the initial low-level file(s) and flag(s) of a matching metadata entity of the rewritten low-level file(s); testing for equality between a string of a metadata entity of the initial low-level file(s) and a string of a matching metadata entity of the rewritten low-level file(s); testing for equality between field(s) of a metadata entity of the initial low-level file(s) and field(s) of a matching metadata entity of the rewritten low-level file(s); testing for equality between method(s) of a metadata entity of the initial low-level file(s) and method(s) of a matching metadata entity of the rewritten low-level file(s). - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer-readable memory configured with data and with instructions that when executed by at least one processor causes the at least one processor to perform a process for binary rewriter verification, the process comprising the steps of:
-
obtaining an initial binary file containing code and metadata; generating a rewritten binary file from the initial binary file by applying the binary rewriter to the initial binary file independently of any binary code transformation; distinguishing a composite metadata entity in the initial binary file from a self-contained metadata entity in the initial binary file; comparing a metadata entity alpha_initial in the initial binary file with a metadata entity alpha_rewritten in the rewritten binary file for semantic equivalence after determining that one entity is a syntactic variant of the other entity; and comparing additional metadata of the initial binary file with additional metadata of the rewritten binary file for semantic equivalence. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A computer system comprising:
-
a logical processor; a memory in operable communication with the logical processor; an initial binary file residing in the memory and containing code and metadata; a binary rewriter verification tool residing in the memory and having a metadata semantic equivalence tester; at least one of; a binary rewriter residing in the memory; a rewritten binary file residing in the memory; and a determination produced by the binary rewriter verification tool as to metadata semantic equivalence of the initial binary file and at least one of;
the rewritten binary file, a file produced using the binary rewriter. - View Dependent Claims (16, 17, 18, 19)
-
Specification