The topic
A cache side channel uses the cycle gap between a hit and a miss. On a shared last-level cache, that gap lets one process observe which lines another process touched.
Where it belongs
Course: Computer architecture. No course number is attached here.
Teach this after: the cache lecture, including hierarchy, associativity, line size, and set indexing. Part 1 can be given in that same week. Part 2 waits until students can explain a hit and a miss. At KU this lecture was given in Fall 2024.
Files and how to use them
Use the two slide decks as the class lectures. There is no homework file. Part 2 includes a measurement you can show in class. Students do not turn that measurement in.
- Lecture, part 1. Use with the cache unit, or immediately after it. Hierarchy, the parameters that define a cache, and the geometry of the student’s own machine.
- Lecture, part 2. Use only after part 1. Flush and reload, prime and probe, and the recorded hit and miss times.
Video lectures
These are links, not files stored with the module. Play one in class, or send the link to students.
Further reading
Optional papers for the instructor, or for a student who wants to read past the assignment.
- FLUSH+RELOAD: A High Resolution, Low Noise, L3 Cache Side-Channel Attack, Yarom and Falkner, USENIX Security Symposium, 2014. The attack the second lecture walks through.
- Yan, Fletcher, and Torrellas, “Cache Telepathy: Leveraging Shared Resource Attacks to Learn DNN Architectures,” USENIX Security Symposium, pp. 2003–2020, 2020. A later use of the same kind of shared-cache leak.
- Hill, Masters, Ranganathan, Turner, and Hennessy, “On the Spectre and Meltdown Processor Security Vulnerabilities,” IEEE Micro, vol. 39, no. 2, pp. 9–19, 2019.
The lecture
The course has already taught the cache as a performance structure: hierarchy, associativity, line size, and set indexing. This module uses the same structure as a side channel. A hit and a miss on a shared last-level line take different numbers of cycles, and that gap is wide enough to observe another process.
Outcome
The lecture closes on a recorded probe-time series. Across 90 probes, hits fall between 96 and 104 cycles and misses fall between 144 and 168. A threshold at 110 sits in a gap of about 40 cycles. No graded assignment is stated in the materials, and no survey was given.
Part 1. The cache as the course already draws it
Hierarchy from registers to main memory, the parameters that define a cache, and the three associativity arrangements. Students read the sizes, associativity, and line size of their own machine from the operating system and from a topology tool.
Part 2. The same structure as a channel
Flush+Reload needs four things: memory shared with the victim, a cycle counter, an instruction that evicts one cache line, and a last-level cache shared across cores.
The lecture walks the sequence. Flush a shared line. Let the victim run. Reload the line and time the access. The flush is the cache-line flush instruction, with a fence on each side. The reload is timed between two reads of the timestamp counter.
When the attacker and the victim do not share memory, the lecture uses Prime+Probe instead. The attacker fills a cache set, lets the victim run, and times a later access to see whether the victim evicted a line.
Fall 2024 is the offering in which this lecture entered the computer architecture course. The two decks are listed above.



