[U-Boot] [PATCH v2 13/13] configs: sandbox*: Enable UBSAN

Eugeniu Rosca roscaeugeniu at gmail.com
Sun Aug 26 23:13:31 UTC 2018


On Sun, Aug 19, 2018 at 09:51:32PM -0400, Tom Rini wrote:
> [..] we should be able to say more broadly that just about everyone
> can enable this, but only out of the box sandbox should.

Hence, turn UBSAN on for every available sandbox flavor.
Make sure the inserted line complies with `make savedefconfig`.

The size increase of sandbox_defconfig U-Boot (gcc 8.1.0):
$ size u-boot.sandbox.*
    text    data     bss     dec     hex filename
 1234958   80048  291472 1606478  18834e u-boot.sandbox.default
 1422710  272240  291472 1986422  1e4f76 u-boot.sandbox.ubsan
 +187752 +192192       0 +379944

Signed-off-by: Eugeniu Rosca <erosca at de.adit-jv.com>
---

Changes in v2:
 - None. Newly pushed.
---
 configs/sandbox64_defconfig        | 1 +
 configs/sandbox_defconfig          | 1 +
 configs/sandbox_flattree_defconfig | 1 +
 configs/sandbox_noblk_defconfig    | 1 +
 configs/sandbox_spl_defconfig      | 1 +
 5 files changed, 5 insertions(+)

diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
index ebb3716e487a..006b0505edbf 100644
--- a/configs/sandbox64_defconfig
+++ b/configs/sandbox64_defconfig
@@ -195,6 +195,7 @@ CONFIG_TPM=y
 CONFIG_LZ4=y
 CONFIG_ERRNO_STR=y
 CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_UBSAN=y
 CONFIG_UNIT_TEST=y
 CONFIG_UT_TIME=y
 CONFIG_UT_DM=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 96e951493698..1a8434f403cb 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -200,6 +200,7 @@ CONFIG_TPM=y
 CONFIG_LZ4=y
 CONFIG_ERRNO_STR=y
 CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_UBSAN=y
 CONFIG_UNIT_TEST=y
 CONFIG_UT_TIME=y
 CONFIG_UT_DM=y
diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig
index ca70f0437e40..0bcee60c4d77 100644
--- a/configs/sandbox_flattree_defconfig
+++ b/configs/sandbox_flattree_defconfig
@@ -171,6 +171,7 @@ CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
 CONFIG_ERRNO_STR=y
+CONFIG_UBSAN=y
 CONFIG_UNIT_TEST=y
 CONFIG_UT_TIME=y
 CONFIG_UT_DM=y
diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig
index f70088ad7e9b..5da95a8a1726 100644
--- a/configs/sandbox_noblk_defconfig
+++ b/configs/sandbox_noblk_defconfig
@@ -172,6 +172,7 @@ CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
 CONFIG_ERRNO_STR=y
+CONFIG_UBSAN=y
 CONFIG_UNIT_TEST=y
 CONFIG_UT_TIME=y
 CONFIG_UT_DM=y
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index 315f721266e9..ab331cb5ae2a 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -191,6 +191,7 @@ CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
 CONFIG_ERRNO_STR=y
+CONFIG_UBSAN=y
 CONFIG_UNIT_TEST=y
 CONFIG_UT_TIME=y
 CONFIG_UT_DM=y
-- 
2.18.0



More information about the U-Boot mailing list