All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled
@ 2018-12-19 14:17 Miroslav Benes
  2018-12-19 16:54 ` Josh Poimboeuf
  0 siblings, 1 reply; 10+ messages in thread
From: Miroslav Benes @ 2018-12-19 14:17 UTC (permalink / raw)
  To: yamada.masahiro, michal.lkml, jpoimboe, jeyu, jikos
  Cc: pmladek, linux-kbuild, live-patching, linux-kernel, Miroslav Benes

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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-12-21  9:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 14:17 [PATCH] kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled Miroslav Benes
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

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.