public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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>
Subject: Re: linux-next: Tree for Apr 22 (objtool warnings)
Date: Thu, 23 Apr 2020 11:06:14 -0700	[thread overview]
Message-ID: <202004231053.5E4F16C3E8@keescook> (raw)
In-Reply-To: <20200422164406.qhvd2my35wnjlzyg@treble>

On Wed, Apr 22, 2020 at 11:44:06AM -0500, Josh Poimboeuf wrote:
> On Wed, Apr 22, 2020 at 08:35:29AM -0700, Randy Dunlap wrote:
> > On 4/22/20 12:10 AM, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > Changes since 20200421:
> > > 
> > 
> > on x86_64:
> 
> In both cases the unreachable instruction happens immediately after a
> call to a function which is truncated with a UD2 (because of
> UBSAN_TRAP).
> 
> When I remove UBSAN_TRAP, the UD2s are replaced with calls to
> __ubsan_handle_type_mismatch_v1().

Hrm, these are coming out of CONFIG_UBSAN_MISC, yes? It seems that the
UBSAN checks that are non-recoverable all inject unreachable checks
afterwards, from what I can see.

> Kees, any idea?

Isn't this another version of the earlier unreachable-ud2 issue?

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


-- 
Kees Cook

  reply	other threads:[~2020-04-23 18:06 UTC|newest]

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 [this message]
2020-04-23 18:28       ` Josh Poimboeuf
2020-04-23 19:32         ` Kees Cook
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=202004231053.5E4F16C3E8@keescook \
    --to=keescook@chromium.org \
    --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
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