summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-07-06 08:28:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-07-14 20:28:09 +0200
commit94fb245bd6946b24639e5c374b36bc41d8833fdb (patch)
tree31b49fc693f5e61c19fca3d7d050fe7110f86dc7 /common
parent4c0809a21073af2d482683ec5327f59b31c355ff (diff)
downloadbarebox-94fb245bd6946b24639e5c374b36bc41d8833fdb.tar.gz
barebox-94fb245bd6946b24639e5c374b36bc41d8833fdb.tar.xz
sandbox: add libc memory allocator
While we typically want to reuse as much barebox functionality as possible in sandbox, using system malloc(3) instead can be very useful when using external memory integrity tools. This is even useful for AddressSanitizer, because the reports resulting from the memory poisoning API are less detailed than the built-in support for the libc malloc(3). Note that a barebox "heap" is still allocated upfront. It's only used for request_sdram_region now though. Whatever is allocated by means of malloc and memalign will be ina disjunct heap. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig
index ac282d8955..4bd4a09738 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -313,6 +313,13 @@ config MALLOC_DUMMY
memory is never freed. This is suitable for well tested noninteractive
environments only.
+config MALLOC_LIBC
+ bool "libc malloc"
+ depends on SANDBOX
+ help
+ select this option to use the libc malloc implementation in the sandbox.
+ This is benefecial for testing with external memory integrity tools.
+
endchoice
config MODULES