Re: [PATCH] doc: move namespaces.rst from kbuild/ to core-api/

2019-10-08 Thread Jessica Yu
+++ Masahiro Yamada [08/10/19 12:10 +0900]: We discussed a better location for this file, and agreed that core-api/ is a good fit. Rename it to symbol-namespaces.rst for disambiguation, and also add it to index.rst and MAINTAINERS. Signed-off-by: Masahiro Yamada Applied, thanks! Jessica

Re: [PATCH] doc: move namespaces.rst out of kbuild directory

2019-10-07 Thread Jessica Yu
+++ Matthias Maennich [07/10/19 07:06 +0100]: Hi! On Mon, Oct 07, 2019 at 01:36:11PM +0900, Masahiro Yamada wrote: I did not notice this document was added to Documentation/kbuild/, and I do not understand how it is related to the build system. Kick it out of the kbuild directory. I am not su

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 wrote: > > On Fri, May 26, 2017 at 02:12:24PM -0700, Luis R. Rodriguez wrote: > >

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 to whenever this is m

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, Dmitr

Re: arch: Rename CONFIG_DEBUG_RODATA and CONFIG_DEBUG_MODULE_RONX

2017-02-07 Thread Jessica Yu
| 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: Jessica Yu -- To unsubscribe

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 come to > think of it

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 from break, sorry about

Re: kmod: add a sanity check on module loading

2017-01-03 Thread Jessica Yu
+++ Luis R. Rodriguez [08/12/16 11:49 -0800]: kmod has an optimization in place whereby if a some kernel code uses request_module() on a module already loaded we never bother userspace as the module already is loaded. This is not true for get_fs_type() though as it uses aliases. Additionally kmo

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 --- kernel/kmod.c | 27 +++

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 wrote: > > > kmod_

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 --- Documentation/livepatch/module-elf-format.txt | 20

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 --- Documentation/livepatch/module-elf-format.txt | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Documentation

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

2016-08-17 Thread Jessica Yu
call module_enable_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 arc

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

2016-08-17 Thread Jessica Yu
applied in arch_klp_init_object_loaded(). Signed-off-by: Jessica Yu --- 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/arch/x86/kernel/Makefile

[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 --- include/linux/livepatch.h | 3 +++ kernel/livepatch/core.c | 16 +--- 2 files changed, 16 insertions

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 are

[PATCH v6 3/5] module: s390: keep mod_arch_specific for livepatch modules

2016-03-22 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 Reviewed-by: Miroslav Benes --- arch/s390/kernel/module.

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

2016-03-22 Thread Jessica Yu
symbol. Signed-off-by: Jessica Yu Reviewed-by: Miroslav Benes --- include/linux/module.h | 25 ++ kernel/module.c| 125 +++-- 2 files changed, 147 insertions(+), 3 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h

[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 Acked-by: Miroslav Benes --- Documentation/livepatch/module-elf-format.txt | 311 ++ 1 file changed, 311 insertions(+) create mode 100644 Documentation

[PATCH v6 4/5] livepatch: reuse module loader code to write relocations

2016-03-22 Thread Jessica Yu
oader. Lastly, mark the module as a livepatch module so that the module loader canappropriately identify and initialize it. Signed-off-by: Jessica Yu Reviewed-by: Miroslav Benes --- arch/s390/include/asm/livepatch.h| 7 -- arch/x86/include/asm/livepatch.h | 2 - arch/x86/kernel/Mak

[PATCH v6 1/5] Elf: add livepatch-specific Elf constants

2016-03-22 Thread Jessica Yu
elected from OS-specific ranges according to the definitions from glibc. Signed-off-by: Jessica Yu Reviewed-by: Miroslav Benes --- 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 v6 0/5] (mostly) Arch-independent livepatch

2016-03-22 Thread Jessica Yu
ant copy of the module in memory - Add module->klp flag for simple identification of livepatch modules - s390: remove redundant vfree() and preserve mod_arch_specific if livepatch module - Use array format instead of a linked list for klp_reloc_secs - Add new documentation describing the forma

Re: livepatch: reuse module loader code to write relocations

2016-03-22 Thread Jessica Yu
+++ Jiri Kosina [21/03/16 23:02 +0100]: On Mon, 21 Mar 2016, Josh Poimboeuf wrote: According to my test that still results in the literal value of "(64 - 8)". Alright. But we should be able to special-case it with a two #if checks on the __SIZEOF_LONG__ value and BUILD_BUG_ON() when __SIZEOF_

Re: module: preserve Elf information for livepatch modules

2016-03-22 Thread Jessica Yu
+++ Josh Poimboeuf [21/03/16 09:06 -0500]: On Wed, Mar 16, 2016 at 03:47:04PM -0400, Jessica Yu wrote: For livepatch modules, copy Elf section, symbol, and string information from the load_info struct in the module loader. Persist copies of the original symbol table and string table. Livepatch

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 > > --- a/kernel/livepatch/

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

2016-03-19 Thread Jessica Yu
symbol. Signed-off-by: Jessica Yu --- 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 2bb0c30..3daf2b3 100

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

2016-03-19 Thread Jessica Yu
elected from OS-specific ranges according to the definitions from glibc. Signed-off-by: Jessica Yu --- 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..cb4a72f 100644 --- a/inc

[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 --- Documentation/livepatch/module-elf-format.txt | 311 ++ 1 file changed, 311 insertions(+) create mode 100644 Documentation/livepatch/module-elf

[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 --- samples/livepatch/livepatch-sample.c | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/livepatch/livepatch-sample.c b/samples/livepatch

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

2016-03-19 Thread Jessica Yu
oader. Signed-off-by: Jessica Yu --- 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 -- kernel/livepatch/c

Re: module: preserve Elf information for livepatch modules

2016-03-19 Thread Jessica Yu
+++ Jessica Yu [16/03/16 15:47 -0400]: For livepatch modules, copy Elf section, symbol, and string information from the load_info struct in the module loader. Persist copies of the original symbol table and string table. Livepatch manages its own relocation sections in order to reuse module

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

2016-03-19 Thread Jessica Yu
livepatch module - Use array format instead of 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 modul

[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 --- arch/s390/kernel/module.c | 6 -- 1 file changed, 4 inser

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 to

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 in the

Re: module: preserve Elf information for livepatch modules

2016-02-08 Thread Jessica Yu
+++ Josh Poimboeuf [08/02/16 14:10 -0600]: On Wed, Feb 03, 2016 at 08:11:07PM -0500, Jessica Yu wrote: For livepatch modules, copy Elf section, symbol, and string information from the load_info struct in the module loader. Persist copies of the original symbol table and string table. Livepatch

Re: module: s390: keep mod_arch_specific for livepatch modules

2016-02-03 Thread Jessica Yu
+++ Jessica Yu [03/02/16 20:11 -0500]: Livepatch needs to utilize the symbol information contained in the mod_arch_specific struct in order to be able to call the s390 apply_relocate_add() function to apply relocations. Keep a reference to syminfo if the module is a livepatch module. Remove the

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

2016-02-03 Thread Jessica Yu
symbol. Signed-off-by: Jessica Yu --- include/linux/module.h | 25 ++ kernel/module.c| 133 ++--- 2 files changed, 151 insertions(+), 7 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index 4560d8f..58e6200 100

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

2016-02-03 Thread Jessica Yu
elected from OS-specific ranges according to the definitions from glibc. Signed-off-by: Jessica Yu --- 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..cb4a72f 100644 --- a/inc

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

2016-02-03 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 --- samples/livepatch/livepatch-sample.c | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/livepatch/livepatch-sample.c b/samples/livepatch

[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 --- arch/s390/kernel/module.c | 7 +-- 1 file chang

[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 --- Documentation/livepatch/module-elf-format.txt | 311 ++ 1 file changed, 311 insertions(+) create mode 100644 Documentation/livepatch/module-elf

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

2016-02-03 Thread Jessica Yu
oader. Signed-off-by: Jessica Yu --- 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/core.c

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

2016-02-03 Thread Jessica Yu
ree() and preserve mod_arch_specific if livepatch module - Use array format instead of 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: p