Live Patching
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Miroslav Benes <mbenes@suse.cz>,
	jikos@kernel.org, pmladek@suse.com, joe.lawrence@redhat.com,
	nstange@suse.de, mpdesouza@suse.de, broonie@kernel.org,
	live-patching@vger.kernel.org,
	Nick Desaulniers <ndesaulniers@google.com>,
	"Jose E. Marchesi" <jose.marchesi@oracle.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: Live Patching Microconference at Linux Plumbers
Date: Fri, 14 Apr 2023 14:10:36 -0700	[thread overview]
Message-ID: <20230414211036.n7bqag3n5s7szz3i@treble> (raw)
In-Reply-To: <CANiq72mWVwNfbCiKWdyyX=LXMrXsndO6gnwz_0tgVRt9Nk1KzA@mail.gmail.com>

On Fri, Apr 14, 2023 at 09:04:36PM +0200, Miguel Ojeda wrote:
> On Fri, Apr 14, 2023 at 7:12 PM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
> >
> > Not to mention how objtool will react to compiled rust code (has it
> > already been tried?)
> 
> Rust uses LLVM, so it should be generally fine -- at least some of the
> checks appear to work. For instance, I can trigger:
> 
>       RUSTC L rust/kernel.o
>     rust/kernel.o: warning: objtool: .text+0x0: unreachable instruction
> 
>       RUSTC [M] samples/rust/rust_minimal.o
>     samples/rust/rust_minimal.o: warning: objtool:
> _R..._6kernel6Module4init+0x172: unreachable instruction
> 
> via a random instruction in the middle of nowhere in the former (with
> `global_asm!`) and a jumped-over instruction in the latter (with
> `asm!`).
> 
> Moreover, we were already getting warnings when rethunk / x86 IBT is
> enabled (since we got `objtool` called for `vmlinux.o`), e.g.
> 
>     vmlinux.o: warning: objtool: .rodata+0x18c58: data relocation to
> !ENDBR: _R...IsWhitespaceEEB4_+0x0
> 
>     vmlinux.o: warning: objtool: _R...into_foreign+0x5: 'naked' return
> found in RETHUNK build
> 
> I can send the patch to run it for all Rust object files via
> `$(cmd_objtool)`, unless you think it is a bad idea.

That's good to hear that it seems to just work.  Feel free to send a
patch to enable it for Rust objects, though I may need your help if we
see any odd warnings ;-)

-- 
Josh

  parent reply	other threads:[~2023-04-14 21:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 12:05 Live Patching Microconference at Linux Plumbers Miroslav Benes
2023-03-29 16:28 ` Joe Lawrence
2023-04-14  9:11 ` Miroslav Benes
2023-04-14  9:53 ` Mark Rutland
2023-04-14 12:54   ` Jose E. Marchesi
2023-04-14 13:51     ` Miguel Ojeda
2023-04-14 14:34       ` Jose E. Marchesi
2023-04-14 14:14     ` Miroslav Benes
2023-04-14 17:12   ` Josh Poimboeuf
2023-04-14 19:04     ` Miguel Ojeda
2023-04-14 20:22       ` Arnaldo Carvalho de Melo
2023-04-14 20:29         ` Miguel Ojeda
2023-04-14 21:10       ` Josh Poimboeuf [this message]
2023-04-14 19:30     ` Peter Zijlstra
2023-04-15  4:39       ` Josh Poimboeuf
2023-04-17  7:48         ` Peter Zijlstra
2023-04-17  8:58     ` Mark Rutland
2023-04-18  3:53   ` James Morris
2023-05-03 20:05   ` Joe Lawrence
2023-05-03 20:33     ` Steven Rostedt
2023-05-22 18:41 ` Joe Lawrence

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=20230414211036.n7bqag3n5s7szz3i@treble \
    --to=jpoimboe@kernel.org \
    --cc=acme@kernel.org \
    --cc=broonie@kernel.org \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jose.marchesi@oracle.com \
    --cc=live-patching@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mbenes@suse.cz \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mpdesouza@suse.de \
    --cc=ndesaulniers@google.com \
    --cc=nstange@suse.de \
    --cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox