Spoiler
Spoiler
Saad Islam1 , Ahmad Moghimi1 , Ida Bruhns2 , Moritz Krebbel2 , Berk Gulmezoglu1 , Thomas Eisenbarth1, 2 ,
and Berk Sunar1
1 Worcester Polytechnic Institute, Worcester, MA, USA
2 University of Lübeck, Lübeck, Germany
(SDB). For simplicity, we use Store Buffer to mention the logically combined mance Counter (HPC) event [24], loosenet is defined by Intel as the mecha-
SAB and SDB units. nism that only compare the page offsets.
Figure 2: The speculative load is demonstrated on a hypothetical processor with 7 pipeline stages: F = Fetch, D = Decode, X1−4 =
Executions, and C = Commit. When the memory stores are blocked competing for resources (State 1), the load will bypass the
stores (State 2). The load block including the dependent instructions will not be committed until the dependency of the address
W versus X,Y ,Z are resolved (State 3). In case of a dependency hazard (State 4), the pipeline is flushed and the load is restarted.
Yes
Figure 3: The dependency check logic: loosenet initially The attack model for S POILER is the same as Rowhammer
checks the least 12 significant bits (page offset) and the finenet and cache attacks where the attacker’s code is needed to be
checks the upper address bits, related to the page number. The executed on the same underlying hardware as of the victim.
final dependency using the physical address matching might As described in Section 3, speculative loads may face other
still fail due to partial physical address checks. aliasing conditions in addition to the 4K aliasing, due to the
partial checks on the higher address bits. To confirm this, we
design an experiment to observe timing behavior of a specu-
2. Finenet: The next stage, called finenet, uses upper ad- lative load based on higher address bits. For this purpose, we
dress bits. The finenet can be implemented to check the propose Algorithm 1 that executes a speculative load after
upper virtual address bits [20], or the physical address multiple stores and further make sure to fill the store buffer
tag [31]. Either way, it is an intermediate stage, and it is with addresses that cause 4K aliasing during the execution of
not the final dependency resolution. In case of a finenet the load. Having w as the window size, the algorithm iterates
hit, the processor blocks the load and/or forwards the over a number of different memory pages, and for each page, it
store data, otherwise, the dependency resolution will go performs stores to that page and all previous w pages within
into the final stage. a window. Since the size of the store buffer varies between
different processor generations, we choose a big enough win-
3. Physical Address Matching: At the final stage, the dow (w = 64) to ensure that the load has 4K aliasing with
physical addresses will be checked. Since this stage is the maximum number of entries in the store buffer and hence
the final chance to resolve potential false dependencies, maximum potential conflicts. Following the stores, we mea-
we expect the full physical address to be checked. How- sure the timing of a load operation from a different memory
ever, one possible design suggests that if the physical ad- page, as defined by x. Since we want the load to be executed
dresses are not available, the physical address matching speculatively, we can not use a store fence such as mfence be-
returns true and continues with the store forwarding [20]. fore the load. As a result, our measurements are an estimate
of execution time for the speculatively load and nearby mi-
Since the page offset is identical between the virtual and phys- croarchitectural events. This may include a negligible portion
ical address, loosenet can be performed as soon as the store of overhead for the execution of stores, and/or any delay due
is decoded. [2] suggests that the store buffer only holds bit to the dependency resolution. If we iterate over a diverse set
19 to 12 of the physical address. Although the PAB holds the of addresses with different virtual and physical page numbers,
full translated physical address, it is not clear in which stage but the same page offset, we should be able to monitor any
this information can be available to the MOB. As a result, discrepancy.
end for -1
0 5 10 15 20 25 30
t1 = rdtscp() Counter Number
load
data ←−− bu f f er[x × PAGE_SIZE]
t2 = rdtscp()
measure[p] ← t2 − t1 Figure 5: Correlation with HPCs listed in Table 5 in
end for the appendix. Ld_Blocks_Partial:Address_Alias and
return measure Cycle_Activity:Stalls_Ldm_Pending (both dotted red)
have strong positive and negative correlations, respectively.
600
rdtsc
Cycles
400
200
0
0 100 200 300 400 500 600 700 800 900 1000 experiment. At each iteration, only one performance counter
(a) Step-wise peaks with a very high latency can be observed on some of the is monitored alongside the aforementioned timing measure-
virtual pages ment. After each speculative load, the performance counter
value and the load time are both recorded. Finally, we obtain
1000
the timings and performance counter value pairs as depicted
Cycles
500 in Figure 4.
Stalls_Ldm_Pending
0
0 100 200 300 400 500 600 700 800 900 1000 To find any relation between the observed high latency
(b) Affected HPC event: Cycle_Activity:Stalls_Ldm_Pending and a particular event, we compute correlation coefficients
between counters and the timing measurements. Since the
20
latency only occurs in the small region of the trace where the
Dependency
10
timing increases, we only need to compute the correlation on
Address_Alias
these regions. When an increase of at least 200 clock cycles
0
0 100 200 300 400 500 600 700 800 900 1000
is detected, the next s values from timing and the HPC traces
are used to calculate the correlations, where s is the number
(c) Affected HPC event: Ld_Blocks_Partial:Address_Alias
of steps from Table 1 and 200 is the average execution time
for a load.
Figure 4: S POILER’s timing measurements and hardware per-
formance counters recorded simultaneously. As shown in Figure 5, two events have a high correla-
tion with the leakage: Cycle_Activity:Stalls_Ldm_Pending
has the highest correlation of 0.985. This event shows
4.1 Speculative Dependency Analysis
the number of cycles for which the execution is stalled
In this section, we use Algorithm 1 and Hardware Perfor- and no instructions are executed due to a pending load.
mance Counters (HPC) to perform an empirical analysis of Ld_Blocks_Partial:Address_Alias has an inverse correla-
the dependency resolution logic. HPCs can keep track of tion with the leakage. This event counts the number of false de-
low-level hardware-related events in the CPU. The counters pendencies in the MOB when loosenet resolves the 4K alias-
are accessible via special purpose registers and can be used ing condition. Separately, Exe_Activity:Bound_on_Stores
to analyze the performance of a program. They provide a increases with more number of stores within the inner
powerful tool to detect microarchitectural components that window loop in Algorithm 1, but it does not have a cor-
cause bottlenecks. Software libraries such as Performance relation with the leakage. The reason behind this behav-
Application Programming Interface (PAPI) [51] simplifies ior is that the store buffer is full, and additional store op-
programming and reading low-level HPC on Intel processors. erations are pending. However, since there is no correla-
Initially, we execute Algorithm 1 for 1000 different virtual tion with the leakage, this shows that the timing behavior
pages. Figure 4(a) shows the cycle count for each iteration is not due to the stores delay. We also attempt to profile
with a set of 4 kB aliased store addresses. Interestingly, we any existing counters related to the memory disambigua-
observe multiple step-wise peaks with a very high latency. tion. However, the events Memory_Disambiguation.Success
Then, we use PAPI to monitor 30 different performance coun- and Memory_Disambiguation.Reset are not available on the
ters listed in Table 5 in the appendix while running the same modern architectures that are tested.
1000
Cycle 15
500
22
0
0 100 200 300 400 500 600 700 800 900 1000
Page Number
Figure 6: Step-wise peaks with 22 steps and a high latency can be observed on some of the pages (Core i7-8650U processor).
Every time the counter resets to zero, the next iteration of the
load will be blocked to be checked against the store buffer
entries. Mispredictions result in performance overhead due to
pipeline flushes. To avoid repeated mispredictions, a watch-
dog mechanism monitors the success rate of the prediction,
and it can temporarily disable the memory disambiguator.
The predictor of the memory disambiguator should go into
a stable state after the first few iterations, since the mem-
ory load is always truly independent of any aliased store.
Hence the saturating counter for the target speculative load
address passes the threshold, and it never resets due to a false
Figure 7: Histogram of the measurement for the speculative prediction. As a result, the memory disambiguator should
load with various store addresses. Load will be fast, 30 cy- always fetch the data into the cache without any access to the
cles, without any dependency. If there exists 4K aliasing only store buffer. However, since the memory disambiguation per-
between the stores, the average is 100. The average is 200 forms speculation, the dependency resolution at some point
when there is 4K aliasing of load and stores. The 1 MB verifies the prediction. The misprediction watchdog is also
aliasing has a distinctive high latency. supposed to only disable the memory disambiguator when
the misprediction rate is high, but in this case we should have
a high prediction rate. Accordingly, the observed leakage oc-
( Section 7), the most interesting scenario is the 1 MB aliasing curs after the disambiguation and during the last stages of
which takes more than 1200 cycles for the highest point in dependency resolution, i.e., the memory disambiguator only
the peak. For simplicity, we refer to the 1 MB aliased address performs prediction on the 4K aliasing at the initial loosenet
as aliased address, in the rest of the paper. check, and it cannot protect the pipeline from 1 MB aliasing
that appears at a later stage.
4.4 Discussion
4.4.1 The Curious Case of Memory Disambiguation
4.4.2 Hyperthreading Effect
The processor uses an additional speculative engine, called
the memory disambiguator [10, 32], to predict memory false Similar to the 4K Aliasing [40, 49], we empirically test
dependencies and reduce the chance of their occurrences. The whether the 1 MB aliasing can be used as a covert/side chan-
main idea is to predict if a load is independent of preceding nel through logical processors. Our observation shows that
stores and proceed with the execution of the load by ignor- when we run our experiments on two logical processors on
ing the store buffer. The predictor uses a hash table that is the same physical core, the number of steps in the peaks is
indexed with the address of the load, and each entry of the exactly halved. This matches the description by Intel [24]
hash table has a saturating counter. If the pre-commitment where it is stated that the store buffer is split between the
dependency resolution does not detect false dependencies, logical processors. As a result, the 1 MB aliasing effect is not
the counter is incremented, otherwise it will be reset to zero. visible and exploitable across logical cores. [31] suggests
After multiple successful executions of the same load instruc- that loosenet checks mask out the stores on the opposite
tion, the predictor assumes that the load is safe to execute. thread.
Figure 8: Reverse engineering physical page mappings in • collect: All addresses mapping to the already found evic-
JavaScript. The markers point to addresses having same 20 tion set are removed from P by testing if they are evicted
bits of physical addresses being part of the same eviction set. by the found set. After finding 128 initial cache sets, this
approach utilizes the linearity property of the cache: For
each found eviction set, the bits 6-11 are enumerated
5 S POILER from JavaScript instead. This provides 63 more eviction sets for each
found set, leading to full cache coverage.
Microarchitectural attacks from JavaScript have a high impact
as drive-by attacks in the browser can be accomplished with- We test this approach on an Intel Core i7-4770 with four
out any privilege or physical proximity. In such attacks, co- physical cores and a shared 8MB 16-way L3 cache with
location is automatically granted by the fact that the browser Chromium 68.0.3440.106, Firefox 62 and Firefox Developer
loads a website with malicious embedded JavaScript code. Edition 63. The approach yields an 80% accuracy rate to find
The browsers provide a sandbox where some instructions like all 8192 eviction sets when starting with a pool of 4096 pages.
clflush and prefetch and file systems such as procfs are The entire eviction set creation process takes an average of
inaccessible, limiting the opportunity for attack. Genkin et 46 s. We improve the algorithm by 1) using the addresses
al. [14] showed that side-channel attacks inside a browser removed from the eviction set in the contract phase as a new
can be performed more efficiently and with greater porta- candidate set and 2) removing more than one address at a time
bility through the use of [Link], WebAssembly from the eviction set during the contract phase. The improved
introduces an additional abstraction layer, i.e. it emulates eviction set creation process takes 35 s on average.
a 32-bit environment that translates the internal addresses
to virtual addresses of the host process (the browser). We- 5.1.1 Evaluation
bAssembly only uses addresses of the emulated environment
The probability of finding a congruent address is P(C) =
and similar to JavaScript, it does not have direct access to
2γ−c−s , where c is the number of bits determining the cache
the virtual addresses. Using S POILER from JavaScript opens
set, γ is the number of bits attackers know, and s is the num-
the opportunity to puncture these abstraction layers and to
ber of slices [56]. Since S POILER allows us to control γ ≥ c
obtain physical address information directly. Figure 8 shows
bits, we are only left with uncertainty about a few address
the address search in JavaScript using S POILER. Compared
bits that influence the slice selection algorithm [26]. In the-
to native implementations, we replace the rdtscp measure-
ory, the eviction set search is sped up by a factor of 4096
ment with a timer based on a shared array buffer [19]. We
by using aliased addresses in the pool, since on average one
cannot use any fence instruction such as lfence, and as a
of 28 instead of one of 220 addresses is an aliased address.
result, there remains some negligible noise in the JavaScript
Additionally, the address pool is much smaller, where 115
implementation. However, the aliased addresses can still be
addresses are enough to find all the eviction sets. In native
clearly seen, and we can use this information to improve the
code, the overhead involved in finding the aliased addresses
state-of-the art eviction set creation for both Rowhammer and
is negligible, less than a second in our experiments. However,
cache attacks.
in JavaScript, due to the noise, it takes 9s for finding aliased
addresses and then 3s for eviction set as compared to the base-
5.1 Efficient Eviction Set Finding line of 46s for classic method in Table 2. Success rate however
We use the algorithm proposed in [14]. It is a slight improve- is 100% with S POILER as compared to 80% for the classic
ment to the former state-of-the-art brute force method [42] method. Besides, success rate of the classical method can be
and consists of three phases: affected by the availability and consumption of memory on
the system.
• expand: A large pool of addresses P is allocated with the From each aliased address pool, 4 eviction sets can be found
last twelve bits of all addresses being zero. A random (corresponding to the 4 slices which are the only unknown
Cycles
400
200 500
(a) 19 bits used by memory controller, no unknown bits
0
106
Frame Numbers
Cycles
600
400 2
106
1.982468
200 1.982466
400 S POILER. The solid plot shows the decimal values of the phys-
200 ical frame numbers from the pagemap file. Once the peaks
0 20 40 60 80 100
Peak Number
in the dotted plot become regular, the solid plot is linearly
increasing, which shows contiguous memory allocation.
(d) 23 bits used by memory controller, 3 unknown bits
Figure 9: Bank co-location for various DRAM configurations 6.3 Double-Sided Rowhammer with S POILER
(a), (b), (c) & (d) from Table 3. The regularity of the peaks
shows that the allocated memory was contiguous, which is As double-sided Rowhammer attacks are based on the as-
coincidental. sumption that rows within a bank are contiguous, we mount a
practical double-sided Rowhammer attack on several DRAM
modules using S POILER without any root privileges. First,
6.2 Contiguous Memory we use S POILER to detect a suitable amount of contiguous
memory. If enough contiguous memory is available in the
system, S POILER finds it, otherwise a double-sided Rowham-
For a double-sided Rowhammer attack, we need to hammer mer attack is not feasible. In our experiments, we empirically
rows adjacent to the victim row in the same bank. This re- configure S POILER to detect 10 MB of contiguous memory.
quires detecting contiguous memory pages in the allocated Second, we apply the row conflict side channel only to the
memory, since the rows are written to the banks sequentially. located contiguous memory, and get a list of virtual addresses
Without contiguous memory, the banks will be filled randomly which are contiguously mapped within a bank. Finally, we
and we will not be able to locate neighboring rows. We show start performing a double-sided Rowhammer attack by se-
that an attacker can use S POILER to detect contiguous memory lecting 3 consecutive addresses from our list. While we have
using 1 MB aliasing peaks. For this purpose, we compare the demonstrated the bit flips in our own process, we can free that
physical frame numbers to the S POILER leakage for 10000 memory which can then be assigned to a victim process by
different virtual pages allocated using malloc. Figure 10 using previously known techniques like spraying and memory
shows the relation between 1 MB aliasing peaks and physical waylaying [16]. As the bit flips are highly reproducible, we
page frame numbers. When the distance between the peaks can again flip the same bits in the victim process to demon-
is random, the trend of frame numbers also change randomly. strate a full attack. Table 4 shows some of the DRAM modules
After around 5000 pages, we observe that the frame numbers susceptible to Rowhammer attack.
increase sequentially. The number of pages between the peaks
The native version of Rowhammer in this work is also ap-
remains constant at 256 where this distance comes from the 8
plicable in JavaScript. The JavaScript-only variant implemen-
bits of physical address leakage due to 1 MB aliasing.
tation of Rowhammer by Gruss et al. [18], named rowham-
We also compare the accuracy of obtaining contiguous mer.js5 , can be combined with S POILER to implement an
memory detected by S POILER by analyzing the actual physi- end-to-end attack. In the original [Link], 2MB huge
cal addresses from the pagemap file. By checking the differ- pages were assumed to get a contiguous chunk of physical
ence between physical page numbers for each detected virtual memory. With S POILER, this assumption is no longer required
page, we can determine the accuracy of our detection method: as explained in Section 6.3.
the success rate for finding contiguous memory is above 99% Figure 11 shows the number of hammers compared to the
disregarding the availability of the contiguous pages. For de- the amount of bit flips for configuration (e) in Table 3. We
tailed experiment on the availability of the contiguous pages,
see Section 10.3 in the appendix. 5 [Link]
10
M378B5273DH0-CK0 Ivy Bridge X
0
Number of Steps
M378B5273DH0-CK0 Sandy Bridge X 0 500 1000 1500 2000 2500 3000 3500 4000
20 add
M378B5773DH0-CH9 Sandy Bridge X
10
M378B5173EB0-CK0 Sandy Bridge ×
0
NT2GC64B88G0NF-CG Sandy Bridge × 0 100 200 300 400 500 600 700 800 900 1000
KY996D-ELD Sandy Bridge × 20 leal
M378B5773DH0-CH9 Nehalem X 10
5 10h, 50m
stores are committed before the victim’s speculative load,
1h, 5m
there will be no dependency resolution hazard.
0
0 1 2 3 4 5 6 We first perform an analysis of the depth of the operations
Number of Hammers 108 that can be executed between the stores and the load to
investigate the viability of S POILER. In this experiment, we
Figure 11: Amount of bit flips increases with the increase in repeat a number of instructions between stores and the load
number of hammerings. The timings do not include the time that are free from memory operations. Figure 12 shows the
taken for reboots and 1 minute sleep time. number of stall steps due to the dependency hazard with the
added instructions. Although nop is not supposed to take any
cycle, adding 4000 nop will diffuse the timing latency. Then,
repeat this experiment 30 times for every measurement and we test add and leal, which use the Arithmetic Logic Unit
the results are then averaged out. On every experiment, the (ALU) and the Address Generation Unit (AGU), respectively.
system is rebooted using a script because once the memory Figure 12 shows that only 1000 adds can be executed be-
becomes fragmented, no more contiguous memory is avail- tween the stores and load before the S POILER effect is lost.
able. The number of bit flips increases with more number of Since each add typically takes about 1 cycle to execute, this
hammerings. Hammering for 500 million times is found to roughly gives a 1000 cycle depth for S POILER. Considering
be an optimal number for this DRAM configuration, as the the observed depth, we discuss potential attacks that can track
continuation of hammering is not increasing bit flips. the speculative load in the following two scenarios.
800
Cycle
1400
600
1200
400
200 1000
0 50 100 150 200 250 300
Page Number 800
200 300 400 500 600 700 800 900 1000
Page Number
Figure 13: Execution time of mincore system call. When a
kernel load address has aliasing with the attacker’s stores Figure 14: The effect of S POILER on TLB flush. The execu-
(red/1MB Conflict), the step-wise delay will appear. These tion cycle always increases for 4 kB aliased addresses, except
timings are measured with Kernel Page Table Isolation dis- for some of the virtual pages inside in the store buffer where
abled. we observe step-wise hills.
address of a kernel memory load by the knowledge of our relation due to the speculative load. As a result, we can not
arbitrary filled store addresses. The blue (No Conflict) line use S POILER to track memory accesses inside an enclave.
shows the timing when there is no aliasing between the target Further exploration of the root cause of the TLB flush effect
memory load and the attackers store. Surprisingly, only by can be carried out as a future work.
filling the store buffer, the system call executes much slower:
the normal execution time for mincore should be around
250 cycles (cyan/No Store). This proof of concept shows 8 Mitigations
that S POILER can be used to leak information from more
privileged contexts, however this is limited only to loads that
appear at the beginning of the next context. Software Mitigations The attack exploits the fact that when
there is a load instruction after a number of store instruc-
tions, the physical address conflict causes a high timing be-
7.2 Negative Result: S POILER SGX havior. This happens because of the speculatively executed
In this experiment, we try to combine S POILER with the load before all the stores are finished executing. There is
CacheZoom [41] approach to create a novel single-threaded no software mitigation that can completely erase this prob-
side-channel attack against SGX enclaves with high temporal lem. While the timing behavior can be removed by inserting
and spatial resolution (4-byte) [40]. We use SGX-STEP [53] store fences between the loads and stores, this cannot be
to precisely interrupt every single instruction. Nemesis [54] enforced to the user’s code space, i.e., the user can always
shows that the interrupt handler context switch time is depen- leak the physical address information. Another yet less robust
dent on the execution time of the currently running instruction. approach is to execute other instructions between the loads
On our test platform, Core i7-8650U, each context switch on and stores to decrease the depth of the attack. However,
an enclave takes about 12000 cycles to execute. If we fill both of the approaches are only applicable to defend against
the store buffer with memory addresses that match the page attacks such as the one described in Section 7.
offset of a load inside the enclave in the interrupt handler, As for most attacks on JavaScript, removing accurate timers
the context switch timing is increased to about 13500 cycles. from the browser would be effective against S POILER. Indeed,
While we cannot observe any correlation between the matched some timers have been removed or distorted by jitters as a
4 kB or 1 MB aliased addresses, we do see unexpected peri- response to attacks [35]. There is however a wide range of
odic downward peaks with a similar step-wise behavior as timers with varying precision available, and removing all of
S POILER(Figure 14). We later reproduce a similar behavior them seems impractical [13, 46].
by running S POILER before an ioctl routine that flushes When it is not possible to mitigate the microarchitectural
the TLB on each call. Intel SGX also performs an implicit attacks, developers can use dynamic tools to at least de-
TLB flush during each context switch. We can thus infer that tect the presence of such leakage [6, 9, 63]. One of the dy-
the downward peaks occur due to the TLB flush, especially namic approaches is gained by monitoring hardware perfor-
since the addresses for the downward peaks do not have any mance counters in real-time. As explained in Section 4.1, two
address correlation with the load address. This suggests that of the counters Ld_Blocks_Partial:Address_Alias and
the TLB flush operation itself is affected by S POILER. This Cycle_Activity:Stalls_Ldm_Pending have high correla-
effect eliminates the opportunity to observe any potential cor- tions with the leakage.
Responsible Disclosure We informed the Intel Product Secu- [10] Jack Doweck. Inside intel R core microarchitecture. In Hot Chips 18
Symposium (HCS), 2006 IEEE, pages 1–35. IEEE, 2006.
rity Incident Response Team (iPSIRT) of our findings. iPSIRT
[11] Dmitry Evtyushkin, Dmitry Ponomarev, and Nael Abu-Ghazaleh. Jump
thanked for reporting the issue and for the coordinated dis-
over aslr: Attacking branch predictors to bypass aslr. In The 49th
closure. iPSIRT then released the public advisory and CVE. Annual IEEE/ACM International Symposium on Microarchitecture,
Here is the time line for the responsible disclosure: MICRO-49, pages 40:1–40:13, Piscataway, NJ, USA, 2016. IEEE Press.
[12] Agner Fog. The microarchitecture of intel, amd and via cpus: An
• 12/01/2018: We informed our findings to iPSIRT. optimization guide for assembly programmers and compiler makers.
• 12/03/2018: iPSIRT acknowledged the receipt. Copenhagen University College of Engineering, pages 02–29, 2012.
• 04/09/2019: iPSIRT released public advisory (INTEL- [13] Pietro Frigo, Cristiano Giuffrida, Herbert Bos, and Kaveh Razavi.
SA-00238) and assigned CVE (CVE-2019-0162). Grand pwning unit: Accelerating microarchitectural attacks with the
gpu. In Grand Pwning Unit: Accelerating Microarchitectural Attacks
with the GPU, page 0, Washington, DC, USA, 2018. IEEE, IEEE Com-
Acknowledgments puter Society.
[14] Daniel Genkin, Lev Pachmanov, Eran Tromer, and Yuval Yarom. Drive-
We thank Yuval Yarom, our shepherd Eric Wustrow and the by key-extraction cache attacks from portable code. In International
anonymous reviewers for their valuable comments for improv- Conference on Applied Cryptography and Network Security, pages
83–102. Springer, 2018.
ing the quality of this paper.
[15] Mel Gorman. Understanding the Linux Virtual Memory Manager.
6 [Link] Prentice Hall, London, 2004.
40
10.3 Memory Utilization and Contiguity 20 520KB Contiguous Memory from pagemap File
520KB Contiguous Memory from Leakage Peaks
The probability of obtaining contiguous memory depends on 0
20 30 40 50 60 70 80 90
memory utilization of the system. We conduct an experiment System Memory Consumption (%)
to examine the effect of memory utilization on availability
of contiguous memory. In this experiment, 1 GB memory
is allocated. During the experiment, the memory utilization Figure 16: Finding contiguous memory of 520 kB with in-
of the system is increased gradually from 20% to 90%. We creasing memory utilization. The overlap between the red
measure the probability of getting the contiguous memory and blue plot indicates the high accuracy of the contiguous
with two methods. The first one is checking the physical frame memory detection capability of S POILER as verified by the
numbers from pagemap file to look for 520 kB of contiguous pagemap file.
memory. The second method is using S POILER to find the 520
kB of contiguous memory. This 520 kB is required to get three
25
consecutive rows within a bank for a DRAM configuration 520KB Contiguous Memory from pagemap File
Contiguous Memory (%)