From: Mark Rutland <mark.rutland@arm.com>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: 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>,
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: Live Patching Microconference at Linux Plumbers
Date: Mon, 17 Apr 2023 09:58:01 +0100 [thread overview]
Message-ID: <ZD0KGUZbIU2JOrMo@FVFF77S0Q05N> (raw)
In-Reply-To: <20230414171255.oylmsdizl4waao4t@treble>
On Fri, Apr 14, 2023 at 10:12:55AM -0700, Josh Poimboeuf wrote:
> On Fri, Apr 14, 2023 at 10:53:03AM +0100, Mark Rutland wrote:
> > > Currently proposed topics follow. The list is open though and more will
> > > be added during the regular Call for Topics.
> > >
> > > - klp-convert (as means to fix CET IBT limitations) and its
> > > upstreamability
> > > - shadow variables, global state transition
> > > - kselftests and the future direction of development
> > > - arm64 live patching
> >
> > I'm happy to talk about the kernel-side of arm64 live patching; it'd be good to
> > get in contact with anyone looking at the arm64 userspace side (e.g.
> > klp-convert).
>
> klp-convert is still considered experimental. FYI here's a pull request
> which adds arm64 support to kpatch-build:
>
> https://github.com/dynup/kpatch/pull/1302
Ah; I'm clearly not familiar with the userspace side at all!
> > I have some topics which overlap between live-patching and general toolchain
> > bits and pieces, and I'm not sure if they'd be best suited here or in a
> > toolchain track, e.g.
> >
> > * How to avoid/minimize the need to reverse-engineer control flow for things
> > like ORC generation.
> >
> > On the arm64 side we're pretty averse to doing this to generate metadata for
> > unwinding (and we might not need to), but there are things objtool does today
> > that requires awareness of control-flow (e.g. forward-edge checks for noinstr
> > safety).
> >
> > Hopefully without a flamewar about DWARF...
>
> If objtool is going to be doing control-flow anyway then it could just
> validate DWARF/SFrame. Then everybody's happy?
>
> > * Better compiler support for noinstr and similar properties.
> >
> > For example, noinstr functions are currently all noinline, and we can't
> > inline a noinstr function into a noinstr function, leading to a painful mix
> > of noinstr and __always_inline. Having a mechanism to allow noinstr code to
> > be inlined into other noinstr code would be nice.
>
> Can you elaborate? Why can't noinstr inline noinstr? (that's a
> mouthful)
>
> Is it because of potential cloning caused by IPA optimizations?
Today, noinstr is marks as noinline:
| /* Section for code which can't be instrumented at all */
| #define __noinstr_section(section) \
| noinline notrace __attribute((__section__(section))) \
| __no_kcsan __no_sanitize_address __no_profile __no_sanitize_coverage \
| __no_sanitize_memory
|
| #define noinstr __noinstr_section(".noinstr.text")
My understnading is that without that, a noinstr function *could* get inlined
into an instrumentable function and get instrumented (e.g. in the case of a
static noinstr function with a single caller).
> > Likewise, whether we could somehow get compile-time warnings about unintended
> > calls from instrumentable code from noinstr code.
> >
> > * How is this going to work with rust?
> >
> > It's not clear to me whether/how things like ftrace, RELIABLE_STACKTRACE, and
> > live-patching are going to work with rust.
>
> Not to mention how objtool will react to compiled rust code (has it
> already been tried?)
I have no idea :)
Thanks,
Mark
next prev parent reply other threads:[~2023-04-17 8:58 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
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 [this message]
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=ZD0KGUZbIU2JOrMo@FVFF77S0Q05N \
--to=mark.rutland@arm.com \
--cc=broonie@kernel.org \
--cc=jikos@kernel.org \
--cc=joe.lawrence@redhat.com \
--cc=jose.marchesi@oracle.com \
--cc=jpoimboe@kernel.org \
--cc=live-patching@vger.kernel.org \
--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 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.