From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Miroslav Benes <mbenes@suse.cz>
Cc: yamada.masahiro@socionext.com, michal.lkml@markovi.net,
jeyu@kernel.org, jikos@kernel.org, pmladek@suse.com,
linux-kbuild@vger.kernel.org, live-patching@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled
Date: Wed, 19 Dec 2018 10:54:28 -0600 [thread overview]
Message-ID: <20181219165428.5udrppedpdvf2u7k@treble> (raw)
In-Reply-To: <20181219141744.32392-1-mbenes@suse.cz>
On Wed, Dec 19, 2018 at 03:17:44PM +0100, Miroslav Benes wrote:
> GCC 9 introduces a new option, -flive-patching. It disables certain
> optimizations which could make a compilation unsafe for later live
> patching of the running kernel.
>
> The option is used only if CONFIG_LIVEPATCH is enabled and $(CC)
> supports it.
>
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>
> ---
> Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index a0650bf79606..53f5ab810efe 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -778,6 +778,10 @@ KBUILD_CFLAGS_KERNEL += $(call cc-option,-ffunction-sections,)
> KBUILD_CFLAGS_KERNEL += $(call cc-option,-fdata-sections,)
> endif
>
> +ifdef CONFIG_LIVEPATCH
> +KBUILD_CFLAGS += $(call cc-option, -flive-patching=inline-clone)
> +endif
> +
> # arch Makefile may override CC so keep this after arch Makefile is included
> NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
This option only makes sense for source-based patch generation, so isn't
it a bit premature to make this change without proper source-based patch
tooling?
Also the commit message needs an analysis of the performance impacts.
--
Josh
next prev parent reply other threads:[~2018-12-19 16:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 14:17 Miroslav Benes
2018-12-19 16:54 ` Josh Poimboeuf [this message]
2018-12-19 16:58 ` Jiri Kosina
2018-12-19 17:21 ` Josh Poimboeuf
2018-12-19 18:10 ` Jiri Kosina
2018-12-20 8:33 ` Miroslav Benes
2018-12-20 14:46 ` Josh Poimboeuf
2018-12-21 9:45 ` Miroslav Benes
2018-12-20 21:47 ` Joao Moreira
2018-12-21 9:48 ` 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=20181219165428.5udrppedpdvf2u7k@treble \
--to=jpoimboe@redhat.com \
--cc=jeyu@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=michal.lkml@markovi.net \
--cc=pmladek@suse.com \
--cc=yamada.masahiro@socionext.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
all inboxes | Powered by JetHome®