Techniques for metadata processing
First Claim
1. A method of processing instructions comprising:
- receiving, for metadata processing, a current instruction with an associated metadata tag, said metadata processing being performed in a metadata processing domain isolated from a code execution domain including the current instruction;
determining, in the metadata processing domain and in accordance with the current instruction and metadata tags associated with the current instruction, whether a rule exists in a rule cache for the current instruction, said rule cache including rules on metadata used by said metadata processing to define allowed operations; and
responsive to determining no rule exists in the rule cache for the current instruction, performing rule cache miss processing in the metadata processing domain, wherein the rule cache miss processing includes performing first rule cache miss processing for a first set of one or more rules using a first rule cache miss handler that is a hardware-implemented rule cache miss handler generating outputs, the outputs including metadata tags used in forming a new rule for the current instruction triggering the rule cache miss processing.
2 Assignments
0 Petitions
Accused Products
Abstract
Techniques are described for metadata processing that can be used to encode an arbitrary number of security policies for code running on a processor. Metadata may be added to every word in the system and a metadata processing unit may be used that works in parallel with data flow to enforce an arbitrary set of policies. In one aspect, the metadata may be characterized as unbounded and software programmable to be applicable to a wide range of metadata processing policies. Techniques and policies have a wide range of uses including, for example, safety, security, and synchronization. Additionally, described are aspects and techniques in connection with metadata processing in an embodiment based on the RISC-V architecture.
-
Citations
45 Claims
-
1. A method of processing instructions comprising:
-
receiving, for metadata processing, a current instruction with an associated metadata tag, said metadata processing being performed in a metadata processing domain isolated from a code execution domain including the current instruction; determining, in the metadata processing domain and in accordance with the current instruction and metadata tags associated with the current instruction, whether a rule exists in a rule cache for the current instruction, said rule cache including rules on metadata used by said metadata processing to define allowed operations; and responsive to determining no rule exists in the rule cache for the current instruction, performing rule cache miss processing in the metadata processing domain, wherein the rule cache miss processing includes performing first rule cache miss processing for a first set of one or more rules using a first rule cache miss handler that is a hardware-implemented rule cache miss handler generating outputs, the outputs including metadata tags used in forming a new rule for the current instruction triggering the rule cache miss processing. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method for performing processor-mediated data transfers between tagged and untagged data sources comprising:
-
executing, on a processor, a first instruction that loads first data from an untagged data source, said untagged data source including memory locations not having associated metadata tags; tagging, by first hardware, the first data with a first metadata tag denoting the first data is untrusted and from a public data source, wherein the first data and the first metadata tag are stored in a first buffer; and executing, on the processor, first code that triggers metadata processing using first one or more rules, wherein the metadata processing using the first one or more rules performs retagging that retags the first data to have a second metadata tag denoting the first data is trusted. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A system comprising:
-
a processor; one or more tagged memories, wherein each memory location of the one or more tagged memories has an associated metadata tag; one or more untagged memories including a first untagged memory, wherein memory locations of the one or more untagged memories do not have associated metadata tags; a rule cache including rules on metadata used in performing metadata processing to define allowed operations in connection with instructions, wherein prior to executing a current instruction by the processor, metadata processing using one or more rules of the rule cache is performed to determine whether execution of the current instruction is allowed; a first instruction stored in a computer readable medium, wherein the first instruction, when executed by the processor, loads first data from the first untagged memory into a data cache used by the processor, wherein the first data stored in the data cache has an associated first metadata tag; a second instruction stored in a computer readable medium, wherein the second instruction, when executed by the processor, stores second data from the data cache to the first untagged memory, wherein the second data stored in the data cache has an associated second metadata tag; a first hardware component that converts untagged data to tagged data used in the system by the processor, wherein responsive to execution of the first instruction, the first hardware component receives, from the first untagged memory, the first data without any associated metadata tag, and outputs the first data having the associated first metadata tag; and a second hardware component that converts tagged data to untagged data, wherein responsive to execution of the second instruction, the second hardware component receives the second data having the associated second metadata tag and outputs the second data without any associated metadata tag. - View Dependent Claims (26, 27, 28)
-
-
29. A method of processing a current instruction comprising:
-
receiving, for metadata processing, the current instruction; and performing metadata processing for the current instruction in a metadata processing domain isolated from a code execution domain including the current instruction, said current instruction referencing a first memory location having a first metadata tag used in the metadata processing, said metadata processing for the current instruction including; performing processing to retrieve the first metadata tag from memory; prior to receiving the first metadata tag for the first memory location from the memory, determining a predicted value of the first metadata tag of the first memory location; determining, using the predicted value of the first metadata tag of the first memory location, a first result metadata tag for a result operand of the current instruction; and receiving, from the memory, the first metadata tag; determining whether the first metadata tag matches the predicted value of the first metadata tag; and responsive to determining the first metadata tag matches the predicted value of the first metadata tag, using the first result metadata tag as a final result metadata tag for the result operand. - View Dependent Claims (30, 31, 32, 33, 34, 35, 36, 37, 38)
-
-
39. A system comprising:
-
a pipeline processor including a plurality of pipeline stages, said plurality of stages including a memory stage and a writeback stage; a programmable unit for metadata processing (PUMP) that operates prior to completion of the memory stage, wherein the PUMP performs metadata processing for a current instruction referencing a first memory location having a first metadata tag used in the metadata processing, wherein the PUMP receives first inputs including first metadata tags for the current instruction and wherein the PUMP generates first outputs provided as inputs to the writeback stage, the first outputs including a predicted value of the first metadata tag of the first memory location and a first result metadata tag for a result operand of the current instruction, wherein the first result metadata tag is determined by the PUMP in accordance with the predicted value of the first metadata tag for the first memory location; and hardware components of said writeback stage that determine whether the first metadata tag for the first memory location matches the predicted value of the first metadata tag, and that use the first result metadata tag as a final result metadata tag for the result operand when the first metadata tag matches the predicted value of the first metadata tag. - View Dependent Claims (40, 41)
-
-
42. A non-transitory computer readable medium comprising code stored thereon that, when executed, performs a method of processing instructions comprising:
-
receiving, for metadata processing, a current instruction with an associated metadata tag, said metadata processing being performed in a metadata processing domain isolated from a code execution domain including the current instruction; determining, in the metadata processing domain and in accordance with the current instruction and metadata tags associated with the current instruction, whether a rule exists in a rule cache for the current instruction, said rule cache including rules on metadata used by said metadata processing to define allowed operations; and responsive to determining no rule exists in the rule cache for the current instruction, performing rule cache miss processing in the metadata processing domain, wherein the rule cache miss processing includes performing first rule cache miss processing for a first set of one or more rules using a first rule cache miss handler that is a hardware-implemented rule cache miss handler generating outputs, the outputs including metadata tags used in forming a new rule for the current instruction triggering the rule cache miss processing.
-
-
43. A system comprising:
-
one or more processors; and a memory comprising code stored therein that, when executed by at least a first of the one or more processors, performs a method of processing instructions comprising; receiving, for metadata processing, a current instruction with an associated metadata tag, said metadata processing being performed in a metadata processing domain isolated from a code execution domain including the current instruction; determining, in the metadata processing domain and in accordance with the current instruction and metadata tags associated with the current instruction, whether a rule exists in a rule cache for the current instruction, said rule cache including rules on metadata used by said metadata processing to define allowed operations; and responsive to determining no rule exists in the rule cache for the current instruction, performing rule cache miss processing in the metadata processing domain, wherein the rule cache miss processing includes performing first rule cache miss processing for a first set of one or more rules using a first rule cache miss handler that is a hardware-implemented rule cache miss handler generating outputs, the outputs including metadata tags used in forming a new rule for the current instruction triggering the rule cache miss processing.
-
-
44. A non-transitory computer readable medium comprising code stored thereon that, when executed, performs a method of processor-mediated data transfers between tagged and untagged data sources comprising:
-
executing, on a processor, a first instruction that loads first data from an untagged data source, said untagged data source including memory locations not having associated metadata tags; tagging, by first hardware, the first data with a first metadata tag denoting the first data is untrusted and from a public data source, wherein the first data and the first metadata tag are stored in a first buffer; and executing, on the processor, first code that triggers metadata processing using first one or more rules, wherein the metadata processing using the first one or more rules performs retagging that retags the first data to have a second metadata tag denoting the first data is trusted.
-
-
45. A non-transitory computer readable medium comprising code stored thereon that, when executed, performs a method of processing a current instruction comprising:
-
receiving, for metadata processing, the current instruction; and performing metadata processing for the current instruction in a metadata processing domain isolated from a code execution domain including the current instruction, said current instruction referencing a first memory location having a first metadata tag used in the metadata processing, said metadata processing for the current instruction including; performing processing to retrieve the first metadata tag from memory; prior to receiving the first metadata tag for the first memory location from the memory, determining a predicted value of the first metadata tag of the first memory location; determining, using the predicted value of the first metadata tag of the first memory location, a first result metadata tag for a result operand of the current instruction; and receiving, from the memory, the first metadata tag; determining whether the first metadata tag matches the predicted value of the first metadata tag; and responsive to determining the first metadata tag matches the predicted value of the first metadata tag, using the first result metadata tag as a final result metadata tag for the result operand.
-
Specification