From 9529ff5823e3baead631fdec04bca71616ee37a2 Mon Sep 17 00:00:00 2001 From: inference Date: Tue, 13 Jun 2023 12:31:35 +0100 Subject: [PATCH] Add privilege requirements. --- security/hardened_malloc.adoc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/security/hardened_malloc.adoc b/security/hardened_malloc.adoc index 9ca569c..548459f 100644 --- a/security/hardened_malloc.adoc +++ b/security/hardened_malloc.adoc @@ -1,12 +1,14 @@ = GrapheneOS hardened_malloc -Version: 0.1.0.8 +Version: 0.1.0.9 This documentation contains instructions to use https://github.com/GrapheneOS/hardened_malloc[GrapheneOS hardened_malloc] memory allocator as the system's default memory allocator. These instructions apply to both musl and glibc C libraries on -Unix-based and Unix-like systems. +Unix-based and Unix-like systems. hardened_malloc can also be used per-application and/or per-user, +in which case root permissions are not required, but this documentation focuses on system-wide usage +of hardened_malloc. == Increase Permitted Amount of Memory Pages @@ -16,15 +18,15 @@ of guard pages. == Clone hardened_malloc Source Code -`git clone https://github.com/GrapheneOS/hardened_malloc.git` +`$ git clone https://github.com/GrapheneOS/hardened_malloc.git` == Enter hardened_malloc Local Git Repository -`cd hardened_malloc/` +`$ cd hardened_malloc/` == Compile hardened_malloc -`make ` +`$ make ` `CONFIG_N_ARENA=n` can be adjusted to increase parallel performance at the expense of memory usage, or decrease memory usage at the expense of parallel performance, where `n` is an integer; higher @@ -34,7 +36,7 @@ security for much less memory usage. == Copy Compiled hardened_malloc Library -`cp out/libhardened_malloc.so ` +`# cp out/libhardened_malloc.so ` == Set System to Preload hardened_malloc on Boot