From: Kees Cook <keescook@chromium.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Andrey Ryabinin <aryabinin@virtuozzo.com>
Subject: Re: linux-next: Tree for Apr 22 (objtool warnings)
Date: Thu, 23 Apr 2020 12:32:32 -0700
Message-ID: <202004231224.D6B3B650@keescook> (raw)
In-Reply-To: <20200423182845.u7rthm67mqdqtuq5@treble>
On Thu, Apr 23, 2020 at 01:28:45PM -0500, Josh Poimboeuf wrote:
> On Thu, Apr 23, 2020 at 11:06:14AM -0700, Kees Cook wrote:
> > Regardless, the type_mismatch it triggered for misalignment and
> > object-size checks, and the alignment check is likely going to always
> > misfire on x86. The randconfig includes that config:
> >
> > CONFIG_UBSAN_ALIGNMENT=y
> >
> > So perhaps the config should be strengthened to disallow it under
> > COMPILE_TEST?
> >
> > config UBSAN_ALIGNMENT
> > def_bool !UBSAN_NO_ALIGNMENT
> > depends on !COMPILE_TEST
>
> But this issue basically makes UBSAN_TRAP unusable, right? Should
> UBSAN_ALIGNMENT and UBSAN_TRAP be made mutually exclusive?
Well, no, not UBSAN_TRAP alone. It seems that -fsanitize=alignment (and
possibly -fsanitize=object-size) is likely to produce false positives. And
that was already well understood. With UBSAN_TRAP, though, those functions
become unusable. Part of the goal of adding UBSAN_TRAP was to be able to
extract the non-false-positive sanitizer options out of UBSAN_MISC so
they could be used in production without the large debug text overhead.
(And the "alignment" checker had long since already been separate and
set to false by default on x86, since it's going to trip over everything
since it shouldn't get run on such hardware for any sane reason that
I know of.) So, while UBSAN_TRAP with UBSAN_ALIGNMENT is going to be
especially bad, UBSAN_ALIGNMENT at all is likely bad enough on x86, so
I think it'd be best to make it a negative depends on COMPILE_TEST (but
leave it available if someone is doing some really unusual UBSAN work).
-Kees
--
Kees Cook
next prev parent reply index
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 7:10 linux-next: Tree for Apr 22 Stephen Rothwell
2020-04-22 15:34 ` linux-next: Tree for Apr 22 (media/tuners/e4000.c) Randy Dunlap
2020-04-22 15:35 ` linux-next: Tree for Apr 22 (objtool warnings) Randy Dunlap
2020-04-22 16:44 ` Josh Poimboeuf
2020-04-23 18:06 ` Kees Cook
2020-04-23 18:28 ` Josh Poimboeuf
2020-04-23 19:32 ` Kees Cook [this message]
2020-04-23 19:51 ` Josh Poimboeuf
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=202004231224.D6B3B650@keescook \
--to=keescook@chromium.org \
--cc=aryabinin@virtuozzo.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=sfr@canb.auug.org.au \
/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
Linux-Next Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
linux-next@vger.kernel.org
public-inbox-index linux-next
Example config snippet for mirrors
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git