













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A lecture note on virtual memory wrap-up for CSE351 course in Autumn 2017. It covers topics such as memory overview, context switching, page table reality, practice VM questions, row hammer exploit, and consequences of row hammer. lab and homework due dates, a virtual section on virtual memory, and a practice VM question. It is useful as study notes with a rate of 8 out of 10. The typology is lecture notes and the possible academic course is Computer Science. The possible academic year is 2017. more useful for university students and the university is the University of Washington. The extraction succeeded.
Typology: Lecture notes
1 / 21
This page cannot be seen from the preview
Don't miss anything!
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
Virtual Address
TLBLookup
Page Table“Walk”
UpdateTLB
Page Fault (OS loads page)
ProtectionCheck
PhysicalAddress
TLB Miss
TLB Hit
Page notin Mem
AccessDenied
AccessPermitted
ProtectionFault^ SIGSEGV Pagein Mem
Check cache
Find in Disk
Find in Mem
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
Disk
Main memory(DRAM)
Cache
CPU
Page
Page
Line
Block
requested 32‐bits
MMU^ TLB
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
Cannot use this naïve implementation of the virtual→physical page mapping – it’s
way
too big
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
Page tablebase register(PTBR)
VPN 1
0 p‐
n‐
VPO
VPN 2
...^
VPN k PPN
0 p‐
m‐
PPO
PPN Virtual Address
...^ Physical Address ...
Level 1page table
Level 2page table
Level kpage table
TLB
PTE VPN^
→
PTE VPN^
→
PTE VPN^
→
This is called a
page walk
This is extra(non‐testable)material
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
Total entries in pagetable
Minimum bit‐width ofPTBR
TLBT bits
Max # of valid entriesin a page table
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
#define MAT_SIZE = 2048for(int i=0; i<MAT_SIZE; i++)
mat[i*(MAT_SIZE+1)] = i;
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
For Fun: DRAMMER Security Attack ^ Why are we talking about this?^
Recent:
Announced in October 2016; Google released
Uses your system’s memory setup to gain
It’s a software attack that uses
only hardware
vulnerabilities
and requires
no user permissions
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
disturbance
errors
” (interference)
~ 100K to 1M times
By Dsimic (modified), CC BY‐SA 4.0,https://commons.wikimedia.org/w/index.php?curid=
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
gain read/write access to a page containing a page table, hence granting process read/write access to
all of
physical memory
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
Use timing to infer memory row layout & find “bad” rows • Allocate a huge chunk of memory and try many addresses, looking fora reliable/repeatable bit flip
fork
extra processes; hope to elevate privileges in any page table
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
^ Apologies that the text is so small on the video
CSE351, Autumn 2017
L23: Virtual Memory Wrap-Up
is an unprivileged instruction in x
/proc/self/pagemap
on Linux
(not human‐readable)
Patched the ION memory allocator