Fix code to conform to code style

This commit is contained in:
inference 2023-11-16 20:09:00 +00:00
parent 7928aff117
commit 2d25219322
Signed by: inference
SSH Key Fingerprint: SHA256:FtEVfx1CmTKMy40VwZvF4k+3TC+QhCWy+EmPRg50Nnc
2 changed files with 152 additions and 162 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- Inferencium - Website - Documentation - GrapheneOS hardened_malloc --> <!-- Inferencium - Website - Documentation - GrapheneOS hardened_malloc -->
<!-- Version: 1.0.3-alpha.10 --> <!-- Version: 1.0.3-alpha.11 -->
<!-- Copyright 2023 Jake Winters --> <!-- Copyright 2023 Jake Winters -->
<!-- SPDX-License-Identifier: BSD-3-Clause --> <!-- SPDX-License-Identifier: BSD-3-Clause -->
@ -55,8 +55,8 @@
<section id="memory_pages"> <section id="memory_pages">
<h2 id="memory_pages"><a href="#memory_pages">Increase Permitted Amount of Memory Pages</a></h2> <h2 id="memory_pages"><a href="#memory_pages">Increase Permitted Amount of Memory Pages</a></h2>
<p>Add <code>vm.max_map_count = 1048576</code> to <p>Add <code>vm.max_map_count = 1048576</code> to
<code>/etc/sysctl.conf</code> to accommodate hardened_malloc's large <code>/etc/sysctl.conf</code> to accommodate hardened_malloc's large amount of guard
amount of guard pages.</p> pages.</p>
</section> </section>
<section id="clone_source_code"> <section id="clone_source_code">
<h2 id="clone_source_code"><a href="#clone_source_code">Clone hardened_malloc Source Code</a></h2> <h2 id="clone_source_code"><a href="#clone_source_code">Clone hardened_malloc Source Code</a></h2>
@ -69,27 +69,22 @@
<section id="compile"> <section id="compile">
<h2 id="compile"><a href="#compile">Compile hardened_malloc</a></h2> <h2 id="compile"><a href="#compile">Compile hardened_malloc</a></h2>
<p><p><code>$ make <var>&lt;arguments&gt;</var></code></p> <p><p><code>$ make <var>&lt;arguments&gt;</var></code></p>
<p><code>CONFIG_N_ARENA=<var>n</var></code> can be adjusted to increase <p><code>CONFIG_N_ARENA=<var>n</var></code> can be adjusted to increase parallel
parallel performance at the expense of memory usage, or decrease memory performance at the expense of memory usage, or decrease memory usage at the expense of
usage at the expense of parallel performance, where <var>n</var> is an parallel performance, where <var>n</var> is an integer. Higher values prefer parallel
integer. Higher values prefer parallel performance, lower values prefer performance, lower values prefer lower memory usage. The number of arenas has no impact
lower memory usage. The number of arenas has no impact on the security on the security properties of hardened_malloc.<br>
properties of hardened_malloc. <b>Minimum number of arenas:</b> 1<br>
<ul> <b>Maximum number of arenas:</b> 256</p>
<li>Minimum number of arenas: 1</li> <p>For extra security, <code>CONFIG_SEAL_METADATA=true</code> can be used in order to
<li>Maximum number of arenas: 256</li> control whether Memory Protection Keys are used to disable access to all writable
</ul> allocator state outside of the memory allocator code. It's currently disabled by default
<p>For extra security, <code>CONFIG_SEAL_METADATA=true</code> can be due to a significant performance cost for this use case on current generation hardware.
used in order to control whether Memory Protection Keys are used to Whether or not this feature is enabled, the metadata is all contained within an isolated
disable access to all writable allocator state outside of the memory memory region with high entropy random guard regions around it.</p>
allocator code. It's currently disabled by default due to a significant <p>For low-memory systems, <code>VARIANT=light</code> can be used to compile the light
performance cost for this use case on current generation hardware. variant of hardened_malloc, which sacrifices some security for much less memory
Whether or not this feature is enabled, the metadata is all contained usage.</p>
within an isolated memory region with high entropy random guard regions
around it.</p>
<p>For low-memory systems, <code>VARIANT=light</code> can be used to
compile the light variant of hardened_malloc, which sacrifices some
security for much less memory usage.</p>
<p>For all compile-time options, see the <p>For all compile-time options, see the
<a href="https://github.com/GrapheneOS/hardened_malloc#configuration">configuration section</a> <a href="https://github.com/GrapheneOS/hardened_malloc#configuration">configuration section</a>
of hardened_malloc's extensive official documentation.</p> of hardened_malloc's extensive official documentation.</p>
@ -100,16 +95,11 @@
</section> </section>
<section id="preload_on_boot"> <section id="preload_on_boot">
<h2 id="preload_on_boot"><a href="#preload_on_boot">Set System to Preload hardened_malloc on Boot</a></h2> <h2 id="preload_on_boot"><a href="#preload_on_boot">Set System to Preload hardened_malloc on Boot</a></h2>
<p> <p><b>musl-based systems:</b> Add
<ul> <code>export LD_PRELOAD="<var>&lt;hardened_malloc path&gt;</var>"</code> to
<li>musl-based systems: Add <code>/etc/environment</code><br>
<code>export LD_PRELOAD="<var>&lt;hardened_malloc path&gt;</var>"</code> <b>glibc-based systems:</b> Add <code><var>&lt;hardened_malloc path&gt;</var></code> to
to <code>/etc/environment</code></li> <code>/etc/ld.so.preload</code></p>
<li>glibc-based systems:
Add <code><var>&lt;hardened_malloc path&gt;</var></code> to
<code>/etc/ld.so.preload</code></li>
</ul>
</p>
</section> </section>
</body> </body>
</html> </html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<!-- Inferencium - Website - Documentation - OpenSSL Self-signed Certificate Chain --> <!-- Inferencium - Website - Documentation - OpenSSL Self-signed Certificate Chain -->
<!-- Version: 1.0.2-alpha.13 --> <!-- Version: 1.0.2-alpha.14 -->
<!-- Copyright 2023 Jake Winters --> <!-- Copyright 2023 Jake Winters -->
<!-- SPDX-License-Identifier: BSD-3-Clause --> <!-- SPDX-License-Identifier: BSD-3-Clause -->