Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1651365 > unrolled thread

[PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS

Started byMiroslav Benes <mbenes@suse.cz>
First post2017-05-26 14:50 +0200
Last post2017-05-27 03:30 +0200
Articles 4 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS Miroslav Benes <mbenes@suse.cz> - 2017-05-26 14:50 +0200
    Re: [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-26 19:50 +0200
    Re: [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS Jessica Yu <jeyu@redhat.com> - 2017-05-27 03:30 +0200
    Re: [PATCH] livepatch: Make livepatch dependent on  !TRIM_UNUSED_KSYMS Jiri Kosina <jikos@kernel.org> - 2017-05-27 03:30 +0200

#1651365 — [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS

FromMiroslav Benes <mbenes@suse.cz>
Date2017-05-26 14:50 +0200
Subject[PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS
Message-ID<tLmQO-5XE-7@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1651539

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2017-05-26 19:50 +0200
Message-ID<tLrx8-r5-5@gated-at.bofh.it>
In reply to#1651365
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

[toc] | [prev] | [next] | [standalone]


#1651668

FromJessica Yu <jeyu@redhat.com>
Date2017-05-27 03:30 +0200
Message-ID<tLyIm-4Vw-131@gated-at.bofh.it>
In reply to#1651365
+++ 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
>

[toc] | [prev] | [next] | [standalone]


#1651669 — Re: [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS

FromJiri Kosina <jikos@kernel.org>
Date2017-05-27 03:30 +0200
SubjectRe: [PATCH] livepatch: Make livepatch dependent on !TRIM_UNUSED_KSYMS
Message-ID<tLyIm-4Vw-133@gated-at.bofh.it>
In reply to#1651365
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web