This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-09-07 00:00:00 +00:00
parent b6ff026ac6
commit 7f8f455318

View File

@@ -1264,7 +1264,12 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</ul>
</li>
<li><a href="#userland-multithreading">20.4. Userland multithreading</a></li>
<li><a href="#userland-content-bibliography">20.5. Userland content bibliography</a></li>
<li><a href="#c-debugging">20.5. C debugging</a>
<ul class="sectlevel3">
<li><a href="#stack-smashing">20.5.1. Stack smashing</a></li>
</ul>
</li>
<li><a href="#userland-content-bibliography">20.6. Userland content bibliography</a></li>
</ul>
</li>
<li><a href="#userland-assembly">21. Userland assembly</a>
@@ -17299,7 +17304,7 @@ root</pre>
<div class="ulist">
<ul>
<li>
<p>simulates a generic more realistic pipelined and optionally out of order CPU cycle by cycle, including a realistic DRAM memory access model with latencies, caches and page table manipulations. This allows us to:</p>
<p>simulates a generic more realistic <a href="#gem5-cpu-types">optionally pipelined and out-of-order</a> CPU cycle by cycle, including a realistic DRAM memory access model with latencies, caches and page table manipulations. This allows us to:</p>
<div class="openblock">
<div class="content">
<div class="ulist">
@@ -20134,7 +20139,7 @@ Indirect leak of 1346 byte(s) in 2 object(s) allocated from:
<div class="sect2">
<h3 id="gem5-cpu-types"><a class="anchor" href="#gem5-cpu-types"></a><a class="link" href="#gem5-cpu-types">18.16. gem5 CPU types</a></h3>
<div class="paragraph">
<p>gem5 has a few in tree CPU models for different purposes, here is an overview of the most interesting ones:</p>
<p>gem5 has a few in tree CPU models for different purposes. In fs.py and se.py, those are selectable with the <code>--cpu-type</code> option. Here is an overview of the most interesting ones:</p>
</div>
<div class="ulist">
<ul>
@@ -20162,7 +20167,7 @@ Indirect leak of 1346 byte(s) in 2 object(s) allocated from:
</div>
</li>
<li>
<p><code>DerivO3CPU</code>: out-of-order core</p>
<p><code>DerivO3CPU</code>: out-of-order core. "O3" Stands for "Out Of Order"!</p>
</li>
</ul>
</div>
@@ -21228,6 +21233,32 @@ echo 1 &gt; /proc/sys/vm/overcommit_memory
<li>
<p><a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/userland/cpp/hello.cpp">userland/cpp/hello.cpp</a></p>
</li>
<li>
<p>templates</p>
<div class="ulist">
<ul>
<li>
<p><a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/userland/cpp/template.cpp">userland/cpp/template.cpp</a>: basic example</p>
</li>
<li>
<p><a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/userland/cpp/template_class_with_static_member.cpp">userland/cpp/template_class_with_static_member.cpp</a>: <a href="https://stackoverflow.com/questions/3229883/static-member-initialization-in-a-class-template" class="bare">https://stackoverflow.com/questions/3229883/static-member-initialization-in-a-class-template</a></p>
</li>
<li>
<p><a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/userland/cpp/if_constexpr.cpp">userland/cpp/if_constexpr.cpp</a>: C++17 <code>if constexpr</code></p>
<div class="ulist">
<ul>
<li>
<p><a href="https://stackoverflow.com/questions/12160765/if-else-at-compile-time-in-c/54647315#54647315" class="bare">https://stackoverflow.com/questions/12160765/if-else-at-compile-time-in-c/54647315#54647315</a></p>
</li>
<li>
<p><a href="https://stackoverflow.com/questions/37617677/implementing-a-compile-time-static-if-logic-for-different-string-types-in-a-co" class="bare">https://stackoverflow.com/questions/37617677/implementing-a-compile-time-static-if-logic-for-different-string-types-in-a-co</a></p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="sect3">
@@ -21464,7 +21495,22 @@ echo 1 &gt; /proc/sys/vm/overcommit_memory
</div>
</div>
<div class="sect2">
<h3 id="userland-content-bibliography"><a class="anchor" href="#userland-content-bibliography"></a><a class="link" href="#userland-content-bibliography">20.5. Userland content bibliography</a></h3>
<h3 id="c-debugging"><a class="anchor" href="#c-debugging"></a><a class="link" href="#c-debugging">20.5. C debugging</a></h3>
<div class="paragraph">
<p>Let&#8217;s group the hard-to-debug undefined-behaviour-like stuff found in C / C+ here and how to tackle those problems.</p>
</div>
<div class="sect3">
<h4 id="stack-smashing"><a class="anchor" href="#stack-smashing"></a><a class="link" href="#stack-smashing">20.5.1. Stack smashing</a></h4>
<div class="paragraph">
<p><a href="https://stackoverflow.com/questions/1345670/stack-smashing-detected/51897264#51897264" class="bare">https://stackoverflow.com/questions/1345670/stack-smashing-detected/51897264#51897264</a></p>
</div>
<div class="paragraph">
<p><a href="https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/userland/c/smash_stack.c">userland/c/smash_stack.c</a></p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="userland-content-bibliography"><a class="anchor" href="#userland-content-bibliography"></a><a class="link" href="#userland-content-bibliography">20.6. Userland content bibliography</a></h3>
<div class="ulist">
<ul>
<li>