Masking mechanism that facilitates safely executing untrusted native code
AssigneeGoogle Inc.
InventorsBennet S. Yee, J. Bradley Chen, David C. Sehr
Life of this patent
Estimating the term…
Abstract
This disclosure presents a system that uses masking to safely execute native code. This system includes a processing element that executes the native code and a memory which stores code and data for the processing element. The processing element includes a masking mechanism that masks one or more bits of a target address during a control flow transfer to transfer control to a restricted set of aligned byte boundaries in the native code.
Claims20
A computing device that uses masking to safely execute native code, comprising:
- a processing element that executes the native code;
- and
- a memory configured to store code and data for the processing element;
- and
- a masking mechanism within the processing element that masks one or more bits of a target address during a control flow transfer to transfer control to a restricted set of aligned byte boundaries in the native code, wherein the masking mechanism is configured to mask the target address for a subset of control transfer instructions, and wherein the masking mechanism determines whether to mask the target address of a control flow instruction based on at least one of an instruction opcode or a type of address encoding for the control flow instruction.
A method for using masking to safely execute native code, comprising:
- receiving the native code to be executed on a processing element;
- executing the native code on the processing element;
- and
- while executing the native code, using a masking mechanism in the processing element to mask one or more bits of a target address for control flow instructions in the native code to transfer control to a restricted set of aligned byte boundaries in the native code by masking the target address for a subset of control transfer instructions, wherein masking the target address comprises determining whether to mask the target address of a control flow instruction based on at least one of an instruction opcode or a type of address encoding for the control flow instruction.
A computer-readable storage medium storing instructions that when executed by a computing device cause the computing device to perform a method for using masking to safely execute native code, the method comprising:
- receiving the native code to be executed on a processing element;
- executing the native code on the processing element;
- and
- while executing the native code, using a masking mechanism in the processing element to mask one or more bits of a target address for control flow instructions in the native code to transfer control to a restricted set of aligned byte boundaries in the native code by masking the target address for a subset of control transfer instructions, wherein masking the target address comprises determining whether to mask the target address of a control flow instruction based on at least one of an instruction opcode or a type of address encoding for the control flow instruction.
Dependencies are inferred from the claim text.