All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Petr Mladek <pmladek@suse.com>, Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	live-patching@vger.kernel.org
Subject: Re: [GIT PULL] livepatching for 5.9-rc5
Date: Tue, 8 Sep 2020 11:13:58 -0700	[thread overview]
Message-ID: <CAHk-=wiZUYjmPLiEaN5uHM4mGyYq8RBFvk=iZKkm9=8NxvcoZQ@mail.gmail.com> (raw)
In-Reply-To: <20200907082036.GC8084@alley>

Josh,

On Mon, Sep 7, 2020 at 1:20 AM Petr Mladek <pmladek@suse.com> wrote:
>
> - Workaround "unreachable instruction" objtool warnings that happen
>   with some compiler versions.

I know I said this fixes things for me, but I just realized it doesn't entirely.

I wonder how I missed the remaining one:

   arch/x86/kvm/vmx/vmx.o: warning: objtool:
vmx_handle_exit_irqoff()+0x142: unreachable instruction

so apparently gcc and objtool can still disagree even without that
'-flive-patching'.

The unreachable code in question is after the call to
handle_external_interrupt_irqoff(), and while that function is a bit
odd, in this case I think it's objtool that is wrong.

I think that what happens is that the function doesn't have a 'ret'
instruction, and instead returns by doing a tail-call to
__sanitizer_cov_trace_pc with my config. And maybe that is what
confuses objtool.

This is current tip-of-git of my tree, with a allmodconfig build (but
the actual config will then depend on things like the gcc plugins
being there too, so you may not get exactly the same thing as I do)

Josh? Am I missing something, and the objtool warning is valid? But
yes, that code is doing some very very special stuff with that thunk
call asm, so it's hard to read the asm.

                  Linus

  reply	other threads:[~2020-09-08 18:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07  8:20 [GIT PULL] livepatching for 5.9-rc5 Petr Mladek
2020-09-08 18:13 ` Linus Torvalds [this message]
2020-09-08 18:32   ` Josh Poimboeuf
2020-09-08 18:42     ` Linus Torvalds
2020-09-08 20:59       ` Josh Poimboeuf
2020-09-08 18:16 ` pr-tracker-bot

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='CAHk-=wiZUYjmPLiEaN5uHM4mGyYq8RBFvk=iZKkm9=8NxvcoZQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=pmladek@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.