Re: [PATCH v3 0/4] kmod: help make deterministic

2017-06-27 Thread Jessica Yu
+++ Luis R. Rodriguez [27/06/17 00:44 +0200]: On Mon, Jun 26, 2017 at 11:37:36PM +0200, Jessica Yu wrote: +++ Kees Cook [20/06/17 17:23 -0700]: > On Tue, Jun 20, 2017 at 1:56 PM, Luis R. Rodriguez <mcg...@kernel.org> wrote: > > On Fri, May 26, 2017 at 02:12:24PM -0700, Luis R.

Re: [PATCH v3 0/4] kmod: help make deterministic

2017-06-27 Thread Jessica Yu
+++ Petr Mladek [27/06/17 10:13 +0200]: On Tue 2017-06-27 02:27:44, Luis R. Rodriguez wrote: On Tue, Jun 27, 2017 at 12:44:42AM +0200, Luis R. Rodriguez wrote: > On Mon, Jun 26, 2017 at 11:37:36PM +0200, Jessica Yu wrote: > > +++ Kees Cook [20/06/17 17:23 -0700]: > > > On Tue,

Re: [PATCH v3 0/4] kmod: help make deterministic

2017-06-26 Thread Jessica Yu
+++ Kees Cook [20/06/17 17:23 -0700]: On Tue, Jun 20, 2017 at 1:56 PM, Luis R. Rodriguez wrote: On Fri, May 26, 2017 at 02:12:24PM -0700, Luis R. Rodriguez wrote: This v3 nukes the proc sysctl interface in favor for just letting userspace just check kernel revision. Prior

Re: [PATCH 5/6] kmod: preempt on kmod_umh_threads_get()

2017-05-25 Thread Jessica Yu
+++ Dmitry Torokhov [24/05/17 19:27 -0700]: On Thu, May 25, 2017 at 03:00:17AM +0200, Luis R. Rodriguez wrote: On Wed, May 24, 2017 at 05:45:37PM -0700, Dmitry Torokhov wrote: > On Thu, May 25, 2017 at 02:14:52AM +0200, Luis R. Rodriguez wrote: > > On Fri, May 19, 2017 at 03:27:12PM -0700,

Re: arch: Rename CONFIG_DEBUG_RODATA and CONFIG_DEBUG_MODULE_RONX

2017-02-07 Thread Jessica Yu
kernel/module.c| 6 +++--- kernel/power/hibernate.c | 2 +- kernel/power/power.h | 4 ++-- kernel/power/snapshot.c| 4 ++-- 24 files changed, 41 insertions(+), 43 deletions(-) For the module.{c,h} bits: Acked-by: Jess

Re: kmod: add a sanity check on module loading

2017-01-06 Thread Jessica Yu
+++ Luis R. Rodriguez [06/01/17 21:36 +0100]: On Tue, Jan 03, 2017 at 10:34:53AM +1030, Rusty Russell wrote: "Luis R. Rodriguez" writes: > Right, out of ~350 request_module() calls (not included try requests) > only ~46 check the return value. Hence a validation check, and

Re: kmod: add a sanity check on module loading

2017-01-06 Thread Jessica Yu
+++ Rusty Russell [03/01/17 10:34 +1030]: "Luis R. Rodriguez" writes: Maybe a similar hack for try_then_request_module(), but many places seem to open-code request_module() so it's not as trivial... Hi Luis, Jessica (who is the main module maintainer now), Back

Re: kmod: provide wrappers for kmod_concurrent inc/dec

2016-12-21 Thread Jessica Yu
+++ Luis R. Rodriguez [08/12/16 11:48 -0800]: kmod_concurrent is used as an atomic counter for enabling the allowed limit of modprobe calls, provide wrappers for it to enable this to be expanded on more easily. This will be done later. Signed-off-by: Luis R. Rodriguez ---

Re: kmod: provide wrappers for kmod_concurrent inc/dec

2016-12-21 Thread Jessica Yu
+++ Luis R. Rodriguez [16/12/16 09:05 +0100]: On Thu, Dec 15, 2016 at 01:46:25PM +0100, Petr Mladek wrote: On Thu 2016-12-08 22:08:59, Luis R. Rodriguez wrote: > On Thu, Dec 08, 2016 at 12:29:42PM -0800, Kees Cook wrote: > > On Thu, Dec 8, 2016 at 11:48 AM, Luis R. Rodriguez

Re: Documentation: livepatch: add section about arch-specific code

2016-08-18 Thread Jessica Yu
+++ Petr Mladek [18/08/16 11:57 +0200]: On Wed 2016-08-17 20:58:30, Jessica Yu wrote: Document usage of arch-specific elf sections in livepatch as well as implementation of arch-specific code. Signed-off-by: Jessica Yu <j...@redhat.com> --- Documentation/livepatch/module-elf-format.tx

Re: livepatch/x86: apply alternatives and paravirt patches after relocations

2016-08-18 Thread Jessica Yu
+++ Petr Mladek [18/08/16 11:51 +0200]: On Wed 2016-08-17 20:58:29, Jessica Yu wrote: Implement arch_klp_init_object_loaded() for x86, which applies alternatives/paravirt patches. This fixes the order in which relocations and alternatives/paravirt patches are applied. Previously, if a patch

[PATCH v3 3/3] Documentation: livepatch: add section about arch-specific code

2016-08-17 Thread Jessica Yu
Document usage of arch-specific elf sections in livepatch as well as implementation of arch-specific code. Signed-off-by: Jessica Yu <j...@redhat.com> --- Documentation/livepatch/module-elf-format.txt | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff

[PATCH v3 0/3] Fix issue with alternatives/paravirt patches

2016-08-17 Thread Jessica Yu
ble_ro() when returning on error v2: - add BUILD_BUG_ON() check in arch_klp_init_object_loaded (x86) [1] http://thread.gmane.org/gmane.linux.kernel/2185604/ [2] https://github.com/dynup/kpatch/issues/580 Jessica Yu (3): livepatch: use arch_klp_init_object_loaded() to finish arch-specific task

[PATCH v3 2/3] livepatch/x86: apply alternatives and paravirt patches after relocations

2016-08-17 Thread Jessica Yu
nd applied in arch_klp_init_object_loaded(). Signed-off-by: Jessica Yu <j...@redhat.com> --- arch/x86/kernel/Makefile| 1 + arch/x86/kernel/livepatch.c | 65 + 2 files changed, 66 insertions(+) create mode 100644 arch/x86/kernel/livepatch.c diff --git a

[PATCH v3 1/3] livepatch: use arch_klp_init_object_loaded() to finish arch-specific tasks

2016-08-17 Thread Jessica Yu
Introduce arch_klp_init_object_loaded() to complete any additional arch-specific tasks during patching. Architecture code may override this function. Signed-off-by: Jessica Yu <j...@redhat.com> --- include/linux/livepatch.h | 3 +++ kernel/livepatch/core.c | 16 +--- 2

Re: (mostly) Arch-independent livepatch

2016-03-29 Thread Jessica Yu
+++ Jessica Yu [22/03/16 20:03 -0400]: Patches based on linux-next. Previous patchset (v5) found here: http://lkml.kernel.org/g/1458157628-8264-1-git-send-email-j...@redhat.com v6: - Since we hard-code the field widths for the objname and symbol name for the sscanf() calls, which

[PATCH v6 2/5] module: preserve Elf information for livepatch modules

2016-03-22 Thread Jessica Yu
. Signed-off-by: Jessica Yu <j...@redhat.com> Reviewed-by: Miroslav Benes <mbe...@suse.cz> --- include/linux/module.h | 25 ++ kernel/module.c| 125 +++-- 2 files changed, 147 insertions(+), 3 deletions(-) diff --git a/include/linux

[PATCH v6 5/5] Documentation: livepatch: outline Elf format and requirements for patch modules

2016-03-22 Thread Jessica Yu
Document livepatch module requirements and the special Elf constants patch modules use. Signed-off-by: Jessica Yu <j...@redhat.com> Acked-by: Miroslav Benes <mbe...@suse.cz> --- Documentation/livepatch/module-elf-format.txt | 311 ++ 1 file changed, 31

Re: livepatch: reuse module loader code to write relocations

2016-03-21 Thread Jessica Yu
+++ Miroslav Benes [21/03/16 14:55 +0100]: On Wed, 16 Mar 2016, Jessica Yu wrote: [...] +struct klp_buf { + char symname[KSYM_SYMBOL_LEN]; I think it is better to make this KSYM_NAME_LEN. KSYM_SYMBOL_LEN looks like something different and KSYM_NAME_LEN is 128 which you reference below

Re: livepatch: reuse module loader code to write relocations

2016-03-21 Thread Jessica Yu
+++ Josh Poimboeuf [21/03/16 12:36 -0500]: On Mon, Mar 21, 2016 at 11:46:51AM -0500, Josh Poimboeuf wrote: On Mon, Mar 21, 2016 at 05:31:57PM +0100, Petr Mladek wrote: > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > > index 780f00c..2aa20fa 100644 > > ---

[PATCH v5 2/6] module: preserve Elf information for livepatch modules

2016-03-19 Thread Jessica Yu
. Signed-off-by: Jessica Yu <j...@redhat.com> --- include/linux/module.h | 25 ++ kernel/module.c| 123 - 2 files changed, 146 insertions(+), 2 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index 2bb0

[PATCH v5 1/6] Elf: add livepatch-specific Elf constants

2016-03-19 Thread Jessica Yu
ed from OS-specific ranges according to the definitions from glibc. Signed-off-by: Jessica Yu <j...@redhat.com> --- include/uapi/linux/elf.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index 71e1d0e

[PATCH v5 6/6] Documentation: livepatch: outline Elf format and requirements for patch modules

2016-03-19 Thread Jessica Yu
Document livepatch module requirements and the special Elf constants patch modules use. Signed-off-by: Jessica Yu <j...@redhat.com> --- Documentation/livepatch/module-elf-format.txt | 311 ++ 1 file changed, 311 insertions(+) create mode 100644 Documentation/liv

[PATCH v5 5/6] samples: livepatch: mark as livepatch module

2016-03-19 Thread Jessica Yu
Mark the module as a livepatch module so that the module loader can appropriately identify and initialize it. Signed-off-by: Jessica Yu <j...@redhat.com> --- samples/livepatch/livepatch-sample.c | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/livepatch/livepatch-sample.c b/s

[PATCH v5 4/6] livepatch: reuse module loader code to write relocations

2016-03-19 Thread Jessica Yu
. Signed-off-by: Jessica Yu <j...@redhat.com> --- arch/s390/include/asm/livepatch.h | 7 -- arch/x86/include/asm/livepatch.h | 2 - arch/x86/kernel/Makefile | 1 - arch/x86/kernel/livepatch.c | 70 --- include/linux/livepatch.h | 20 --

[PATCH v5 0/6] (mostly) Arch-independent livepatch

2016-03-19 Thread Jessica Yu
a linked list for klp_reloc_secs - Add new documentation describing the format of a livepatch module in Documentation/livepatch Jessica Yu (6): Elf: add livepatch-specific Elf constants module: preserve Elf information for livepatch modules module: s390: keep mod_arch_specific for livepatch m

[PATCH v5 3/6] module: s390: keep mod_arch_specific for livepatch modules

2016-03-18 Thread Jessica Yu
() since module_arch_freeing_init() (which also frees those structures) is called in do_init_module(). If the module isn't a livepatch module, we free the structures in module_arch_freeing_init() as usual. Signed-off-by: Jessica Yu <j...@redhat.com> --- arch/s390/kernel/module.c | 6 --

Re: livepatch: reuse module loader code to write relocations

2016-02-09 Thread Jessica Yu
+++ Josh Poimboeuf [08/02/16 14:26 -0600]: On Wed, Feb 03, 2016 at 08:11:09PM -0500, Jessica Yu wrote: Reuse module loader code to write relocations, thereby eliminating the need for architecture specific relocation code in livepatch. Specifically, reuse the apply_relocate_add() function

Re: livepatch: reuse module loader code to write relocations

2016-02-09 Thread Jessica Yu
+++ Petr Mladek [09/02/16 15:01 +0100]: On Wed 2016-02-03 20:11:09, Jessica Yu wrote: Reuse module loader code to write relocations, thereby eliminating the need for architecture specific relocation code in livepatch. Specifically, reuse the apply_relocate_add() function in the module loader

[RFC PATCH v4 3/6] module: s390: keep mod_arch_specific for livepatch modules

2016-02-03 Thread Jessica Yu
() since module_arch_freeing_init() (which also frees those structures) is called in do_init_module(). If the module isn't a livepatch module, we free the structures in module_arch_freeing_init() as usual. Signed-off-by: Jessica Yu <j...@redhat.com> --- arch/s390/kernel/module.c | 7 +--

[RFC PATCH v4 6/6] Documentation: livepatch: outline Elf format and requirements for patch modules

2016-02-03 Thread Jessica Yu
Document livepatch module requirements and the special Elf constants patch modules use. Signed-off-by: Jessica Yu <j...@redhat.com> --- Documentation/livepatch/module-elf-format.txt | 311 ++ 1 file changed, 311 insertions(+) create mode 100644 Documentation/liv

[RFC PATCH v4 1/6] Elf: add livepatch-specific Elf constants

2016-02-03 Thread Jessica Yu
ed from OS-specific ranges according to the definitions from glibc. Signed-off-by: Jessica Yu <j...@redhat.com> --- include/uapi/linux/elf.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index 71e1d0e

[RFC PATCH v4 4/6] livepatch: reuse module loader code to write relocations

2016-02-03 Thread Jessica Yu
. Signed-off-by: Jessica Yu <j...@redhat.com> --- arch/s390/include/asm/livepatch.h | 7 - arch/x86/include/asm/livepatch.h | 2 - arch/x86/kernel/Makefile | 1 - arch/x86/kernel/livepatch.c | 70 -- include/linux/livepatch.h | 30 ++-- kernel/livepatch/