From: Miroslav Benes <mbenes@suse.cz>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: live-patching@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Joerg Roedel <jroedel@suse.de>,
jkosina@suse.cz, jeyu@redhat.com, pmladek@suse.cz
Subject: Re: [PATCH RFC 0/2] livepatch: patch creation tooling proposal
Date: Thu, 10 Nov 2016 16:48:33 +0100 (CET) [thread overview]
Message-ID: <alpine.LNX.2.00.1611101640540.12314@pobox.suse.cz> (raw)
In-Reply-To: <20161110153608.jsxlygej4r3ux42g@treble>
On Thu, 10 Nov 2016, Josh Poimboeuf wrote:
> On Thu, Oct 27, 2016 at 09:35:48AM -0500, Josh Poimboeuf wrote:
> > So here's my proposal: use the existing kernel build infrastructure. If
> > klp relocations are needed, manually specify them with a new
> > klp_module_reloc struct and corresponding KLP_MODULE_RELOC macro. Then
> > run a post-processing tool called klp-convert which converts those
> > klp_module_reloc structs into the sections, relocations, and symbols
> > needed by the klp runtime code.
>
> I think the biggest blocker for this approach is detecting gcc
> optimizations which break function ABI, i.e. Miroslav's presentation:
>
> http://www.linuxplumbersconf.org/2016/ocw//system/presentations/3573/original/pres_gcc.pdf
>
> Right now we have no way of finding all such cases.
>
> I think our options are:
>
> 1) Find a way for gcc to report when function ABI has been broken;
This is the one I'd like to pursue in parallel to 3). But it is
going to be long way I imagine.
> 2) Disable all gcc optimizations which can break function ABI. Not sure
> if this is even possible, but if so, we'd need to quantify the
> performance impact. (Note we might be able to leave some options
> enabled if they result in a function name change (e.g.,
> -fpartial-inlining, -fipa-sra, -fipa-cp)); or
I don't think this is possible. I mean technically possible, because
I'm almost sure some optimizations cannot be disabled easily. And also
performance-wise. It could have a serious impact on the kernel with
CONFIG_LIVEPATCH enabled.
I consider this option a last resort.
> 3) Stay with the status quo (kpatch-build?), since it has detection of
> such optimizations "built in".
Also possible. We could explore the usability of Joerg's asmtool for the
purpose.
https://github.com/joergroedel/asmtool
It could be useful even if for the detection of changed functions.
> Does anybody want to take ownership of this patch set and/or try to
> explore the options further? I don't have any more bandwidth right now
> (mainly due to the consistency model and porting objtool to DWARF).
Sure. I can take it. I tried to write a similar tool, I saw kpatch-build
sources and have a clue how it all works. On the other hand, no promises
about a timeline.
Miroslav
next prev parent reply other threads:[~2016-11-10 15:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 14:35 [PATCH RFC 0/2] livepatch: patch creation tooling proposal Josh Poimboeuf
2016-10-27 14:35 ` [PATCH RFC 1/2] livepatch: add klp-convert tool and integrate with module build Josh Poimboeuf
2016-12-17 13:08 ` [PATCH] livepatch: fixup klp-convert tool integration Konstantin Khlebnikov
2016-12-19 14:29 ` Miroslav Benes
2016-10-27 14:35 ` [PATCH RFC 2/2] livepatch: update sample module to use klp relocations Josh Poimboeuf
2016-11-10 15:36 ` [PATCH RFC 0/2] livepatch: patch creation tooling proposal Josh Poimboeuf
2016-11-10 15:48 ` Miroslav Benes [this message]
2016-11-10 15:54 ` Miroslav Benes
2016-11-10 16:10 ` Josh Poimboeuf
2017-03-01 10:53 ` Miroslav Benes
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=alpine.LNX.2.00.1611101640540.12314@pobox.suse.cz \
--to=mbenes@suse.cz \
--cc=jeyu@redhat.com \
--cc=jkosina@suse.cz \
--cc=jpoimboe@redhat.com \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=pmladek@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).