From: Miroslav Benes <mbenes@suse.cz>
To: yamada.masahiro@socionext.com, michal.lkml@markovi.net,
jpoimboe@redhat.com, jeyu@kernel.org, jikos@kernel.org
Cc: pmladek@suse.com, linux-kbuild@vger.kernel.org,
live-patching@vger.kernel.org, linux-kernel@vger.kernel.org,
Miroslav Benes <mbenes@suse.cz>
Subject: [PATCH] kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled
Date: Wed, 19 Dec 2018 15:17:44 +0100 [thread overview]
Message-ID: <20181219141744.32392-1-mbenes@suse.cz> (raw)
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)
--
2.19.2
next reply other threads:[~2018-12-19 14:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 14:17 Miroslav Benes [this message]
2018-12-19 16:54 ` Josh Poimboeuf
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=20181219141744.32392-1-mbenes@suse.cz \
--to=mbenes@suse.cz \
--cc=jeyu@kernel.org \
--cc=jikos@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--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®