From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/8] UBSAN: run-time undefined behavior sanity checker
Date: Mon, 20 Aug 2018 13:50:36 -0400 [thread overview]
Message-ID: <20180820175036.GI11769@bill-the-cat> (raw)
In-Reply-To: <20180820125409.GA7882@vmlxhi-102.adit-jv.com>
On Mon, Aug 20, 2018 at 02:54:09PM +0200, Eugeniu Rosca wrote:
> Hi Tom,
>
> On Sun, Aug 19, 2018 at 09:51:32PM -0400, Tom Rini wrote:
> > On Mon, Aug 20, 2018 at 02:00:25AM +0200, Eugeniu Rosca wrote:
> [..]
> > > To enable UBSAN, two prerequisites must be met from Kconfig perspective:
> > > - ARCH has to select CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL
> > > - defconfig has to enable CONFIG_UBSAN
> > >
> > > This commit selects CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL for SANDBOX and
> > > ARM64 (r8a7795_salvator-x_defconfig is the only tested ARM64 platform).
> > > No defconfig changes are expected, since UBSAN is a development (not
> > > production) option. With CONFIG_UBSAN disabled, no functional change
> > > is expected from this commit.
> > >
> > > The size increase of sanbox 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
> > >
> > > The size increase of H3 Salvator-X U-Boot (aarch64-linux-gnu-gcc 7.2.1):
> > > $ size u-boot.r8a7795-salvator-x.*
> > > text data bss dec hex filename
> > > 589954 23504 263984 877442 d6382 u-boot.r8a7795-salvator-x.default
> > > 810968 103304 263984 1178256 11fa90 u-boot.r8a7795-salvator-x.ubsan
> > > +221014 +79800 0 +300814
> >
> > Can we re-work this so that there isn't a size increase unless UBSAN is
> > enabled? I ask since I think for a v2 we should be able to say more
> > broadly that just about everyone can enable this, but only out of the
> > box sandbox should.
>
> Sorry for the confusion. This commit alone does not contribute with any
> U-Boot binary size increase. The numbers provided above assume enabling
> and disabling CONFIG_UBSAN by hand via menuconfig/defconfig. I could
> relocate the numbers to a separate patch updating the sandbox_defconfig,
> if UBSAN is wanted there by default. That said, I think the contents of
> this commit already complies with your particular request stated above.
Ah, ok. I think it should be a bit split up into introducing framework
and then enabling on sandbox, and that's where we show the size
increase. But I do also think we should be able to enable the framework
on most targets.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180820/f52224a6/attachment.sig>
next prev parent reply other threads:[~2018-08-20 17:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-20 0:00 [U-Boot] [PATCH 0/8] Import Undefined Behavior Sanitizer Eugeniu Rosca
2018-08-20 0:00 ` [U-Boot] [PATCH 1/8] UBSAN: run-time undefined behavior sanity checker Eugeniu Rosca
2018-08-20 1:51 ` Tom Rini
2018-08-20 12:54 ` Eugeniu Rosca
2018-08-20 17:50 ` Tom Rini [this message]
2018-08-20 15:00 ` York Sun
2018-08-20 21:00 ` Eugeniu Rosca
2018-08-20 0:00 ` [U-Boot] [PATCH 2/8] mmc: Fix "left shift in type int" undefined behavior Eugeniu Rosca
2018-08-20 0:00 ` [U-Boot] [PATCH 3/8] armv8: mmu: " Eugeniu Rosca
2018-08-20 1:51 ` Tom Rini
2018-08-20 13:24 ` Eugeniu Rosca
2018-08-20 0:00 ` [U-Boot] [PATCH 4/8] pinctrl: renesas: " Eugeniu Rosca
2018-08-20 8:07 ` Marek Vasut
2018-08-20 13:42 ` Eugeniu Rosca
2018-08-20 0:00 ` [U-Boot] [PATCH 5/8] net: phy: " Eugeniu Rosca
2018-08-20 0:00 ` [U-Boot] [PATCH 6/8] net: ravb: " Eugeniu Rosca
2018-08-20 8:05 ` Marek Vasut
2018-08-20 0:00 ` [U-Boot] [PATCH 7/8] mmc: Fix read-past-end-of-array " Eugeniu Rosca
2018-08-20 0:00 ` [U-Boot] [PATCH 8/8] hashtable: Fix zero-sized array " Eugeniu Rosca
2018-08-20 1:51 ` Tom Rini
2018-08-20 1:51 ` [U-Boot] [PATCH 0/8] Import Undefined Behavior Sanitizer Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180820175036.GI11769@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox