# US 2021/0264027 A1 · Reuse-trap: re-purposing cache reuse distance to defend against side channel leakage

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

- Number: US 2021/0264027 A1
- Document ID: US20210264027A1
- Status: Published application
- Kind: A1
- Application number: 17/181,197
- Filed: 2021-02-22
- Published: 2021-08-26
- Earliest claimed: 2020-02-20
- Assignees: The George Washington University
- Applicants: The George Washington University
- Inventors: Guru Prasadh VENKATARAMANI; Milo{hacek over (s)} DOROSLOVACKI; Hongyu FANG
- Web page: https://patentgrep.com/patent/US20210264027A1

## CPC

- G06F 21/554: {involving event detection and direct action}
- G06F 21/556: {involving covert channels, i.e. data leakage between processes (inhibiting the analysis of circuitry or operation with measures against power attack G06F21/755)}
- G06F 2221/034: Test or assess a computer or a system
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system for defending against a side channel attack. The system includes a reuse distance buffer configured to measure one or more reuse distances for a microarchitecture block according to information of marker candidates and information of target events of a microarchitecture block; and a defense actuator configured to determine existence of a side channel attack in the microarchitecture block according to the one or more reuse distances for the microarchitecture block.

## Claims

### Claim 1

A system for defending against a side channel attack, comprising:
a reuse distance buffer configured to measure one or more reuse distances for a microarchitecture block according to information of marker candidates and information of target events of a microarchitecture block; and
a defense actuator configured to determine existence of a side channel attack in the microarchitecture block according to the one or more reuse distances for the microarchitecture block.

### Claim 2 (depends on 1)

The system of claim 1, further comprising:
an event filter configured to, in response to the microarchitecture block having the marker candidates and the target events, forward the information of the marker candidates and the information of the target events to the reuse distance buffer.

### Claim 3 (depends on 2)

The system of claim 2, wherein the event filter includes:
an event buffer configured to determine whether the microarchitecture block has the marker candidates and the target events.

### Claim 4 (depends on 1)

The system of claim 1, wherein the information of the marker candidates includes attributes of the marker candidates, and the information of the target events includes attributes of the target events.

### Claim 5 (depends on 1)

The system of claim 1, wherein the reuse distance buffer includes:
a marker attribute register configured to store the information of the marker candidates; and
a target event accumulator configured to count the number of target events in the microarchitecture block.

### Claim 6 (depends on 1)

The system of claim 1, wherein the defense actuator is further configured to obfuscate the side channel attack.

### Claim 7 (depends on 1)

The system of claim 1, wherein the defense actuator is further configured to:
update a number of positive reuse distance samples for the one or more reuse distances for the microarchitecture block;
determine, in response to the number of positive reuse distance samples exceeding a predetermined threshold, existence of a side channel attack in the microarchitecture block;
obfuscate, in response to the existence of a side channel attack in the microarchitecture block being determined, the side channel attack.

### Claim 8 (depends on 1)

The system of claim 1, further comprising:
an event filter configured to, in response to the microarchitecture block having the marker candidates and the target events, forward the information of the marker candidates and the information of the target events to the reuse distance buffer; and
the microarchitecture block includes a cache set.

### Claim 9 (depends on 8)

The system of claim 8, wherein the defense actuator includes:
a score recorder configured to determine existence of the side channel attack in the cache set according to the one or more reuse distances for the cache set.

### Claim 10 (depends on 8)

The system of claim 8, wherein:
the defense actuator further includes a prefetcher;
the score recorder is further configured to send, in response to the existence of the side channel attack being determined, send an index of the cache set and an identity of the side channel attack to the prefetcher, and
the prefetcher is configured to obfuscate the side channel attack according to the index of the cache set and the identity of the side channel attack.

### Claim 11 (depends on 8)

The system of claim 8, wherein the reuse distance buffer has:
a first register configured to store a victim address in response to a first cache miss from a victim;
a second register configured to store an identity of a non-victim process; and
an accumulator configured to count a number of cache misses of the non-victim process after the first cache miss.

### Claim 12 (depends on 11)

The system of claim 11, wherein the reuse distance buffer is further configured to record, in response to a victim address of a second cache miss from victim being the same as the victim address of the first cache miss, the number of cache misses of the non-victim process between the first and second cache misses from the victim as a reuse distance.

### Claim 13 (depends on 11)

The system of claim 11, wherein:
the victim address of the first cache miss is a first victim address; and
the reuse distance buffer is further configured to, in response to a second cache miss having a second victim address that is different from the first victim address of the first cache miss, replace the first victim address in the first register with the second victim address with a probability.

### Claim 14 (depends on 11)

The system of claim 11, wherein the accumulator is further configured to increase in response to a non-victim process of a second cache miss being the same as a current non-victim process.

### Claim 15 (depends on 1)

The system of claim 1, further comprising:
a speculative load buffer configured to track the information of the target events of the microarchitecture block, wherein the target events include potential mis-speculated load instructions, and the information of target events include instruction pointers and target physical addresses of the potential mis-speculated load instructions; and
a conflict tracker configured to record the information of the marker candidates, wherein the information of the marker candidates includes a memory address of a memory line suffering a conflict miss.

### Claim 16 (depends on 15)

The system of claim 15, wherein the reuse distance buffer has:
a first register configured to store an address of a cache miss; and
a second register configured to count a number of squashed loads between two repetitive cache misses.

### Claim 17 (depends on 15)

The system of claim 15, further comprising:
a branch predictor configured to identify two consecutive status changes.

### Claim 18 (depends on 15)

The system of claim 15, wherein the defense actuator is further configured to flush one or more entries of the branch predictor to obfuscate the side channel attack.

### Claim 19 (depends on 1)

The system of claim 1, wherein the reuse distance buffer is further configured to perform a synchronization by adjusting a frequency of sampling of the number of target events between repetitive marker events according to an occurrence frequency of the repetitive marker events.

### Claim 20 (depends on 19)

The system of claim 19, wherein the reuse distance buffer is further configured to:
reduce the frequency of sampling of the number of target events in response to the occurrence frequency of the repetitive marker events being reduced; and
increase the frequency of sampling of the number of target events in response to the occurrence frequency of the repetitive marker events being increased.
