linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS
@ 2017-05-26 12:45 Miroslav Benes
  2017-05-26 17:41 ` Josh Poimboeuf
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Miroslav Benes @ 2017-05-26 12:45 UTC (permalink / raw)
  To: jpoimboe, jeyu, jikos
  Cc: mmarek, pmladek, jmoreira, live-patching, linux-kernel, Miroslav Benes

If TRIM_UNUSED_KSYMS is enabled, all unneeded exported symbols are made
unexported. Two-pass build of the kernel is done to find out which
symbols are needed based on a configuration. This effectively
complicates things for out-of-tree modules.

Livepatch exports functions to (un)register and enable/disable a live
patch. The only in-tree module which uses these functions is a sample in
samples/livepatch/. If the sample is disabled, the functions are
trimmed and out-of-tree live patches cannot be built.

Note that live patches are intended to be built out-of-tree.

Suggested-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Miroslav Benes <mbenes@suse.cz>
---
 kernel/livepatch/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/livepatch/Kconfig b/kernel/livepatch/Kconfig
index 045022557936..ec4565122e65 100644
--- a/kernel/livepatch/Kconfig
+++ b/kernel/livepatch/Kconfig
@@ -10,6 +10,7 @@ config LIVEPATCH
 	depends on SYSFS
 	depends on KALLSYMS_ALL
 	depends on HAVE_LIVEPATCH
+	depends on !TRIM_UNUSED_KSYMS
 	help
 	  Say Y here if you want to support kernel live patching.
 	  This option has no runtime impact until a kernel "patch"
-- 
2.12.2

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

* Re: [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS
  2017-05-26 12:45 [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS Miroslav Benes
@ 2017-05-26 17:41 ` Josh Poimboeuf
  2017-05-26 21:53 ` Jessica Yu
  2017-05-26 22:28 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Josh Poimboeuf @ 2017-05-26 17:41 UTC (permalink / raw)
  To: Miroslav Benes
  Cc: jeyu, jikos, mmarek, pmladek, jmoreira, live-patching, linux-kernel

On Fri, May 26, 2017 at 02:45:21PM +0200, Miroslav Benes wrote:
> If TRIM_UNUSED_KSYMS is enabled, all unneeded exported symbols are made
> unexported. Two-pass build of the kernel is done to find out which
> symbols are needed based on a configuration. This effectively
> complicates things for out-of-tree modules.
> 
> Livepatch exports functions to (un)register and enable/disable a live
> patch. The only in-tree module which uses these functions is a sample in
> samples/livepatch/. If the sample is disabled, the functions are
> trimmed and out-of-tree live patches cannot be built.
> 
> Note that live patches are intended to be built out-of-tree.
> 
> Suggested-by: Michal Marek <mmarek@suse.com>
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>

-- 
Josh

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

* Re: [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS
  2017-05-26 12:45 [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS Miroslav Benes
  2017-05-26 17:41 ` Josh Poimboeuf
@ 2017-05-26 21:53 ` Jessica Yu
  2017-05-26 22:28 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Jessica Yu @ 2017-05-26 21:53 UTC (permalink / raw)
  To: Miroslav Benes
  Cc: jpoimboe, jikos, mmarek, pmladek, jmoreira, live-patching, linux-kernel

+++ Miroslav Benes [26/05/17 14:45 +0200]:
>If TRIM_UNUSED_KSYMS is enabled, all unneeded exported symbols are made
>unexported. Two-pass build of the kernel is done to find out which
>symbols are needed based on a configuration. This effectively
>complicates things for out-of-tree modules.
>
>Livepatch exports functions to (un)register and enable/disable a live
>patch. The only in-tree module which uses these functions is a sample in
>samples/livepatch/. If the sample is disabled, the functions are
>trimmed and out-of-tree live patches cannot be built.
>
>Note that live patches are intended to be built out-of-tree.
>
>Suggested-by: Michal Marek <mmarek@suse.com>
>Signed-off-by: Miroslav Benes <mbenes@suse.cz>

Makes sense to me:

Acked-by: Jessica Yu <jeyu@redhat.com>

>---
> kernel/livepatch/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/kernel/livepatch/Kconfig b/kernel/livepatch/Kconfig
>index 045022557936..ec4565122e65 100644
>--- a/kernel/livepatch/Kconfig
>+++ b/kernel/livepatch/Kconfig
>@@ -10,6 +10,7 @@ config LIVEPATCH
> 	depends on SYSFS
> 	depends on KALLSYMS_ALL
> 	depends on HAVE_LIVEPATCH
>+	depends on !TRIM_UNUSED_KSYMS
> 	help
> 	  Say Y here if you want to support kernel live patching.
> 	  This option has no runtime impact until a kernel "patch"
>-- 
>2.12.2
>

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

* Re: [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS
  2017-05-26 12:45 [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS Miroslav Benes
  2017-05-26 17:41 ` Josh Poimboeuf
  2017-05-26 21:53 ` Jessica Yu
@ 2017-05-26 22:28 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2017-05-26 22:28 UTC (permalink / raw)
  To: Miroslav Benes
  Cc: jpoimboe, jeyu, mmarek, pmladek, jmoreira, live-patching, linux-kernel

On Fri, 26 May 2017, Miroslav Benes wrote:

> If TRIM_UNUSED_KSYMS is enabled, all unneeded exported symbols are made
> unexported. Two-pass build of the kernel is done to find out which
> symbols are needed based on a configuration. This effectively
> complicates things for out-of-tree modules.
> 
> Livepatch exports functions to (un)register and enable/disable a live
> patch. The only in-tree module which uses these functions is a sample in
> samples/livepatch/. If the sample is disabled, the functions are
> trimmed and out-of-tree live patches cannot be built.
> 
> Note that live patches are intended to be built out-of-tree.
> 
> Suggested-by: Michal Marek <mmarek@suse.com>
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2017-05-27  1:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26 12:45 [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS Miroslav Benes
2017-05-26 17:41 ` Josh Poimboeuf
2017-05-26 21:53 ` Jessica Yu
2017-05-26 22:28 ` Jiri Kosina

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).