summaryrefslogtreecommitdiffstats
path: root/src/lib/HBconfig
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2018-10-25 16:59:50 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-11-15 10:37:14 -0600
commit9b7da2e3c3a7127d39e6ba94be9dadc9ac3f273e (patch)
treef5be48ba5726506e93866b7a27038d98b87a4eb4 /src/lib/HBconfig
parent41e818515bd88e911a521b8b28d763bb61c24582 (diff)
downloadtalos-hostboot-9b7da2e3c3a7127d39e6ba94be9dadc9ac3f273e.tar.gz
talos-hostboot-9b7da2e3c3a7127d39e6ba94be9dadc9ac3f273e.zip
Support for putting fences around mallocs
This commit implements a compile time feature (set MALLOC_FENCING to y in the src/lib/HBconfig file) which puts check bytes around each malloc. Whenever an allocation is freed, if the check bytes have changed, the memory manager immediate crashes Hostboot. It also fixes a heap corruption in the SBE get capabilities command. Change-Id: I3df96d5fce43c34d3574c47f3c674076842d90e1 CQ: SW442980 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68214 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/lib/HBconfig')
-rw-r--r--src/lib/HBconfig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/HBconfig b/src/lib/HBconfig
new file mode 100644
index 000000000..05added71
--- /dev/null
+++ b/src/lib/HBconfig
@@ -0,0 +1,5 @@
+config MALLOC_FENCING
+ default n
+ help
+ Enable generating check bytes around each malloc and
+ enforcing that those bytes are undisturbed on every matching free
OpenPOWER on IntegriCloud