# US 2021/0064547 A1 · Prevention of trust domain access using memory ownership bits in relation to cache lines

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

- Number: US 2021/0064547 A1
- Document ID: US20210064547A1
- Status: Published application
- Kind: A1
- Application number: 16/456,718
- Filed: 2019-06-28
- Published: 2021-03-04
- Earliest claimed: 2019-06-28
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Siddhartha Chhabra; Vedvyas Shanbhogue; Ravi L. Sahita
- Web page: https://patentgrep.com/patent/US20210064547A1

## CPC

- G06F 12/1408: {by using cryptography (for digital transmission H04L9/00)}
- G06F 21/64: Protecting data integrity, e.g. using checksums, certificates or signatures
- G06F 11/1068: {in sector programmable memories, e.g. flash disk (G06F11/1072 takes precedence)}
- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0826: {Limited pointers directories; State-only directories without pointers}
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 12/1458: {by checking the subject access rights}
- G06F 21/72: in cryptographic circuits
- H04L 9/0643: {Hash functions, e.g. MD5, SHA, HMAC or f9 MAC}
- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F 2212/1052: Security improvement
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A processor includes a processor core and a memory controller coupled to the processor core. The memory controller comprising a cryptographic engine to: detect, in a write request for a cache line, a key identifier (ID) within a physical address of a location in memory; determine that the key ID is a trust domain key ID of a plurality of key IDs; responsive to a determination that the key ID is the trust domain key ID, set an ownership bit of the cache line to indicate the cache line belongs to a trust domain; encrypt the cache line to generate encrypted data; determine a message authentication code (MAC) associated with the cache line; and write the encrypted data, the ownership bit, and the MAC of the cache line to the memory.

## Claims

### Claim 1

A processor comprising:
a processor core; and
a memory controller coupled to the processor core, the memory controller comprising a cryptographic engine to:
detect, within a write request for a cache line, a key identifier (ID) in a physical address of a location in memory;
determine that the key ID is a trust domain key ID of a plurality of key IDs;
responsive to a determination that the key ID is the trust domain key ID, set an ownership bit of the cache line to indicate the cache line belongs to a trust domain;
encrypt the cache line to generate encrypted data;
determine a message authentication code (MAC) associated with the cache line; and
write the encrypted data, the ownership bit, and the MAC of the cache line to the memory.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the memory comprises a sequestered range to which is written the ownership bit in association with the cache line stored in the memory, the processor further comprising an on-die cache to cache the ownership bit for the processor core.

### Claim 3 (depends on 1)

The processor of claim 1, wherein to determine the MAC, the cryptographic engine is further to apply a keyed hash algorithm over a combination of at least the encrypted data, an encrypted physical address, and the ownership bit.

### Claim 4 (depends on 1)

The processor of claim 1, wherein the ownership bit is encoded with error correction code (ECC) bits of the cache line.

### Claim 5 (depends on 4)

The processor of claim 4, wherein the cryptographic engine is further to generate an ECC calculation in conjunction with the write of the cache line to the memory, wherein the ownership bit is included within the ECC calculation.

### Claim 6 (depends on 1)

The processor of claim 1, wherein, in response to a read request for the cache line, the cryptographic engine is further to:
determine whether a second key ID within the read request is a trust domain key ID of the plurality of key IDs; and
record an access type bit indicating whether the second key ID is a trust domain key ID.

### Claim 7 (depends on 6)

The processor of claim 6, wherein the cryptographic engine is further to:
determine that a value of the access type bit matches that of the ownership bit;
verify integrity with respect to the MAC; and
return, in response to the read request and in response to a MAC mismatch, a poison bit and invalid data that matches a fixed pattern.

### Claim 8 (depends on 7)

The processor of claim 7, where the cryptographic engine is further to set a poison status bit in a key data structure of the cryptographic engine, the poison status bit being associated with the key ID.

### Claim 9 (depends on 6)

The processor of claim 6, wherein the cryptographic engine is further to:
determine that a value of the access type bit does not match that of the ownership bit; and
return, in response to the read request, a poison bit and invalid data that matches a fixed pattern.

### Claim 10

A method comprising:
detecting, within a write request for a cache line by a memory controller of a processor, a key identifier (ID) in a physical address of a location in memory;
determining, by the memory controller, that the key ID is a trust domain key ID of a plurality of key IDs;
setting, by the memory controller responsive to determining that the key ID is the trust domain key ID, an ownership bit of the cache line to indicate the cache line belongs to a trust domain;
encrypting, by the memory controller, the cache line to generate encrypted data;
determining, by the memory controller, a message authentication code (MAC) associated with the cache line; and
writing, by the memory controller, the encrypted data, the ownership bit, and the MAC of the cache line to the memory.

### Claim 11 (depends on 10)

The method of claim 10, wherein the memory comprises a sequestered range to which is written the ownership bit in association with the cache line stored in the memory, the method further comprising caching the ownership bit in on-die cache of the processor.

### Claim 12 (depends on 10)

The method of claim 10, wherein determining the MAC comprises applying a keyed hash algorithm over a combination of at least the encrypted data, an encrypted physical address, and the ownership bit.

### Claim 13 (depends on 10)

The method of claim 10, further comprising:
encoding the ownership bit within error correction code (ECC) bits of the cache line; and
generating an ECC calculation, in conjunction with writing the cache line to the memory, which includes the ownership bit.

### Claim 14 (depends on 10)

The method of claim 10, wherein, in response to a read request for the cache line, further comprising:
determining whether a second key ID within the read request is a trust domain key ID of the plurality of the key IDs; and
recording an access type bit indicating whether the second key ID is a trust domain key ID.

### Claim 15 (depends on 14)

The method of claim 14, further comprising:
determining that a value of the access type bit matches that of the ownership bit;
verifying integrity with respect to the MAC; and
returning, in response to the read request and in response to a MAC mismatch, a poison bit and invalid data that matches a fixed pattern.

### Claim 16 (depends on 15)

The method of claim 15, further comprising setting a poison status bit in a key data structure of the memory controller, the poison status bit being associated with the key ID.

### Claim 17 (depends on 14)

The method of claim 14, further comprising:
determining that a value of the access type bit does not match that of the ownership bit; and
returning, in response to the read request, a poison bit and invalid data that matches a fixed pattern.

### Claim 18

A system comprising:
a memory device to store cache lines and associated ownership bits;
a processor core; and
a memory controller coupled between the memory device and the processor core, wherein the memory controller comprises a cryptographic engine to:
detect, within a read request for a cache line from the processor core, a key identifier (ID) within a physical address of a location in the memory device;
determine that the key ID is a trust domain key ID of a plurality of key IDs;
read the cache line from the memory; and
determine whether an ownership bit, stored in the memory device for the cache line, is set to indicate the cache line belongs to a trust domain.

### Claim 19 (depends on 18)

The system of claim 18, wherein the cryptographic engine is further to:
record an access type bit indicating whether the key ID is the trust domain key ID; and
determine whether a value of the access type bit matches that of the ownership bit.

### Claim 20 (depends on 19)

The system of claim 19, wherein, in response to a determination that the value of the access type bit matches that of the ownership bit, the cryptographic engine is further to:
determine that a poison status bit, associated with the key ID in a key data structure, is set; and
return, in response to the read request, a poison bit and invalid data that matches a fixed pattern.

### Claim 21 (depends on 19)

The system of claim 19, wherein, in response to a determination that the value of the access type bit matches that of the ownership bit, the cryptographic engine is further to:
determine that a poison status bit, associated with the key ID in a key data structure, is not set;
verify integrity with respect to a message authentication code (MAC) stored with the cache line; and
return, in response to the read request and in response to a MAC mismatch, a poison bit and invalid data that matches a fixed pattern.

### Claim 22 (depends on 21)

The system of claim 21, wherein the cryptographic engine is further to:
determine that key poisoning is enabled; and
set a poison status bit associated with the key ID in a key data structure, to indicate the key ID is invalid.
