# US 11,307,861 B2 · Securing conditional speculative instruction execution

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,307,861 B2
- Document ID: US11307861B2
- Status: Granted
- Kind: B2
- Application number: 16/942,591
- Filed: 2020-07-29
- Published: 2020-11-12
- Granted: 2022-04-19
- Earliest claimed: 2018-05-02
- Assignees: Micron Technology, Inc.
- Applicants: Micron Technology, Inc.
- Inventors: Steven Jeffrey Wallach
- Web page: https://patentgrep.com/patent/US11307861B2

## CPC

- G06F 9/3842: {Speculative instruction execution}
- G06F 9/3844: {using dynamic branch prediction, e.g. using branch history tables}
- G06F 9/30058: {Conditional branch instructions}
- G06F 9/30192: {according to data descriptor, e.g. dynamic data typing}
- G06F 9/323: {for indirect branch instructions}
- G06F 9/3824: {Operand accessing}
- G06F 9/3861: {Recovery, e.g. branch miss-prediction, exception handling (error detection or correction G06F11/00)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method performed in a processor, includes: receiving, in the processor, a branch instruction in the processing; determining, by the processor, an address of an instruction after the branch instruction as a candidate for speculative execution, the address including an object identification and an offset; and determining, by the processor, whether or not to perform speculative execution of the instruction after the branch instruction based on the object identification of the address.

## Claims

### Claim 1

A method comprising:
determining, by a processor, a memory address associated with an instruction for execution after a branch instruction, the memory address including an object identification and an offset; and
determining, by the processor, whether to execute the instruction after the branch instruction based on the object identification of the memory address.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining whether the object identification identifies a kernel of an operating system; and
in response to a determination that the object identification identifies a kernel of an operating system, preventing, by the processor, execution of the instruction after the branch instruction.

### Claim 3 (depends on 2)

The method of claim 2, wherein the determining of whether the object identification identifies a kernel of an operating system includes comparing the object identification to a predetermined identifier.

### Claim 4 (depends on 3)

The method of claim 3, wherein the predetermined identifier has a value of zero.

### Claim 5 (depends on 4)

The method of claim 4, wherein the memory address has a predetermined width of 128 bits; the object identification is represented by 64 bits of the memory address; and the offset is represented by 64 bits of the memory address.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
determining whether the object identification identifies an object different from an object associated with the branch instruction; and
in response to a determination that the object identified by the object identification is different from the object associated with the branch instruction, preventing, by the processor, execution of the instruction after the branch instruction.

### Claim 7 (depends on 6)

The method of claim 6, wherein the determining of whether the object identified by the object identification is different from the object associated with the branch instruction includes:
comparing the object identification of the memory address associated with the instruction after the branch instruction with an object identification of the memory address associated with the branch instruction.

### Claim 8 (depends on 6)

The method of claim 6, further comprising:
storing in a register of the processor, the memory address associated with the instruction after the branch instruction.

### Claim 9 (depends on 8)

The method of claim 8, wherein the memory address identifies a memory location at which the instruction to be executed after the branch instruction is stored.

### Claim 10 (depends on 8)

The method of claim 8, wherein the memory address identifies a memory location at which a data item to be operated upon by the instruction to be executed after the branch instruction is stored.

### Claim 11

A processor, comprising:
a register of a first predetermined width, the register having:
an object identification portion of a second predetermined width; and
an offset portion; and
an execution unit configured to execute an instruction using a memory address stored in the register;
wherein the processor is configured to determine whether or not to execute the instruction based on an object identification of the memory address stored in the object identification portion of the register.

### Claim 12 (depends on 11)

The processor of claim 11, wherein in response to a determination that the object identification is equal to a predetermined value, the processor skips execution of the instruction.

### Claim 13 (depends on 12)

The processor of claim 12, wherein the predetermined value is zero.

### Claim 14 (depends on 13)

The processor of claim 13, wherein the predetermined value stored in the object identification portion identifies a kernel of an operating system.

### Claim 15 (depends on 11)

The processor of claim 11, wherein the object identification is a first object identification; the instruction is a first instruction; and in response to a determination that the first object identification is different from a second object identification of a second instruction executed before the first instruction, the processor skips execution of the instruction.

### Claim 16 (depends on 15)

The processor of claim 15, wherein second instruction is a branch instruction.

### Claim 17 (depends on 15)

The processor of claim 15, wherein second instruction is an instruction of a subroutine call.

### Claim 18

A computer system, comprising:
a memory storing a set of instructions and a set of data items; and
a processor configured to load the instructions for execution according to memory addresses and execute the instructions to operate on the data items identified using memory addresses;
wherein a second instruction is to be executed after a first instruction; and
wherein the processor is configured to determine whether to execute the second instruction based on an object identification of a memory address associated with the second instruction.

### Claim 19 (depends on 18)

The computer system of claim 18, wherein the processor is configured to avoid execution of the second instruction in response to a determination that the object identification of the memory address associated with the second instruction is equal to a predetermined value representing a kernel of an operating system of the computer system.

### Claim 20 (depends on 18)

The computer system of claim 18, wherein the processor is configured to avoid execution of the second instruction in response to a determination that the object identification of the memory address associated with the second instruction is different from an object identification of a memory address associated with the first instruction.
