Re: [PATCH] module: Remove leftover '#undef' from export header

2019-09-12 Thread Jessica Yu
'#undef'. Cc: Ard Biesheuvel Cc: Jessica Yu Signed-off-by: Will Deacon --- I spotted this trivial issue when debugging the namespace issue earlier today, so here's the patch. Applied, thanks for the cleanup! Jessica

Re: [GIT PULL] Kbuild updates for v5.4-rc1

2019-09-17 Thread Jessica Yu
+++ Masahiro Yamada [15/09/19 22:27 +0900]: Hi Linus, This is a Kbuild pull request for v5.4-rc1. I am sending this a bit earlier. Please pull it in when you open the merge window. Thanks. Hi Masahiro, Linus, There is a merge conflict between the kbuild and modules-next tree. Specifically,

Re: linux-next: manual merge of the modules tree with the compiler-attributes tree

2019-09-17 Thread Jessica Yu
+++ Mark Brown [16/09/19 16:59 +0100]: On Sun, Sep 15, 2019 at 11:27:20PM +0100, Mark Brown wrote: Since this conflcit is non-trivial, it's late and there's a good chance I'm not going to actually finish building -next today I've just used the commit from the last time -next was built, 3b5be16c

Re: [GIT PULL] Kbuild updates for v5.4-rc1

2019-09-17 Thread Jessica Yu
+++ Masahiro Yamada [18/09/19 02:26 +0900]: Hi Jessica, Linus, On Wed, Sep 18, 2019 at 12:09 AM Jessica Yu wrote: +++ Masahiro Yamada [15/09/19 22:27 +0900]: >Hi Linus, > >This is a Kbuild pull request for v5.4-rc1. >I am sending this a bit earlier. >Please pull it in when you

Re: [GIT PULL] Kbuild updates for v5.4-rc1

2019-09-17 Thread Jessica Yu
+++ Will Deacon [17/09/19 19:16 +0100]: Hi Jessica, On Tue, Sep 17, 2019 at 08:01:36PM +0200, Jessica Yu wrote: Yikes, I did not catch Stephen Rothwell's email about pausing the linux-next releases from Sept 5 until Sept 30 (https://lore.kernel.org/linux-next/20190904233443.

Re: [PATCH 0/7] module: various bug-fixes and clean-ups for module namespace

2019-10-02 Thread Jessica Yu
+++ Matthias Maennich [27/09/19 14:41 +0100]: On Fri, Sep 27, 2019 at 06:35:56PM +0900, Masahiro Yamada wrote: I was hit by some problems caused by the module namespace feature that was merged recently. At least, the breakage of external module builds is a fatal one. I just took a look at the c

Re: [PATCH v2 2/6] modpost: fix broken sym->namespace for external module builds

2019-10-04 Thread Jessica Yu
+++ Masahiro Yamada [03/10/19 23:42 +0900]: Hi Shaun, On Thu, Oct 3, 2019 at 10:29 PM Shaun Ruffell wrote: On Thu, Oct 03, 2019 at 04:58:22PM +0900, Masahiro Yamada wrote: > Currently, external module builds produce tons of false-positives: > > WARNING: module uses symbol from namespace ,

Re: [PATCH] depmod: create and use System.map.no_namespaces

2019-10-07 Thread Jessica Yu
bol namespaces.") Cc: Masahiro Yamada Cc: Lucas De Marchi Cc: Jessica Yu Cc: Martijn Coenen Cc: Greg Kroah-Hartman Cc: linux-modu...@vger.kernel.org Signed-off-by: Matthias Maennich --- Please note this depends on the new ksymtab entry format proposed in https://lore.kernel.org/l

Re: [PATCH v2 0/6] module: various bug-fixes and clean-ups for module namespace

2019-10-07 Thread Jessica Yu
+++ Masahiro Yamada [03/10/19 16:58 +0900]: I was hit by some problems caused by the module namespace feature that was merged recently. At least, the breakage of external module builds is a fatal one. I just took a look at the code closer, and I noticed some more issues (some are nit-picking).

[GIT PULL] Modules updates for v5.4

2019-09-22 Thread Jessica Yu
Hi Linus, The main bulk of this pull request introduces a new exported symbol namespaces feature. The number of exported symbols is increasingly growing with each release (we're at about 31k exports as of 5.3-rc7) and we currently have no way of visualizing how these symbols are "clustered" or ma

Re: [PATCH] module: Fix load failure when CONFIG_STRICT_MODULE_RWX is diabled

2019-08-20 Thread Jessica Yu
+++ He Zhe [14/08/19 09:56 +0800]: On 8/14/19 1:59 AM, Jessica Yu wrote: +++ zhe...@windriver.com [10/08/19 15:22 +0800]: From: He Zhe When loading modules with CONFIG_ARCH_HAS_STRICT_MODULE_RWX enabled and CONFIG_STRICT_MODULE_RWX disabled, the memory allocated for modules would not be

Re: [PATCH V40 19/29] lockdown: Lock down module params that specify hardware parameters (eg. ioport)

2019-08-20 Thread Jessica Yu
Signed-off-by: Matthew Garrett Reviewed-by: Kees Cook Cc: Jessica Yu Signed-off-by: James Morris Acked-by: Jessica Yu Thanks! --- include/linux/security.h | 1 + kernel/params.c | 21 - security/lockdown/lockdown.c | 1 + 3 files changed, 18 insertions(+), 5

[GIT PULL] Modules updates for v5.3

2019-07-18 Thread Jessica Yu
o override module_exit_section() Signed-off-by: Jessica Yu Gustavo A. R. Silva (1): kernel: module: Use struct_size() helper Matthias Schiffer (2): module: allow arch overrides for .exit section names ARM: module: recognize u

Re: [PATCH v4 11/11] module: Make module_enable_ro() static again

2020-04-30 Thread Jessica Yu
+++ Josh Poimboeuf [29/04/20 10:24 -0500]: Now that module_enable_ro() has no more external users, make it static again. Suggested-by: Jessica Yu Signed-off-by: Josh Poimboeuf Thanks! Since this patch is separate from the rest and it's based on modules-next, I can just take this last

Re: [PATCH v4 00/11] livepatch,module: Remove .klp.arch and module_disable_ro()

2020-04-30 Thread Jessica Yu
the .klp.arch sections are going away. For kernel/module.c and include/linux/module.h parts: Acked-by: Jessica Yu

Re: [PATCH v4 11/11] module: Make module_enable_ro() static again

2020-04-30 Thread Jessica Yu
+++ Miroslav Benes [30/04/20 13:35 +0200]: On Thu, 30 Apr 2020, Jessica Yu wrote: +++ Josh Poimboeuf [29/04/20 10:24 -0500]: >Now that module_enable_ro() has no more external users, make it static >again. > >Suggested-by: Jessica Yu >Signed-off-by: Josh Poimboeuf Thanks! Sinc

Re: [PATCH v4 11/11] module: Make module_enable_ro() static again

2020-04-30 Thread Jessica Yu
+++ Jessica Yu [30/04/20 13:40 +0200]: +++ Miroslav Benes [30/04/20 13:35 +0200]: On Thu, 30 Apr 2020, Jessica Yu wrote: +++ Josh Poimboeuf [29/04/20 10:24 -0500]: Now that module_enable_ro() has no more external users, make it static again. Suggested-by: Jessica Yu Signed-off-by: Josh

Re: [PATCH v2] scripts/nsdeps: use alternative sed delimiter

2019-10-22 Thread Jessica Yu
+++ Masahiro Yamada [22/10/19 13:37 +0900]: On Tue, Oct 22, 2019 at 1:05 AM Jessica Yu wrote: When doing an out of tree build with O=, the nsdeps script constructs the absolute pathname of the module source file so that it can insert MODULE_IMPORT_NS statements in the right place. However

[PATCH v3] scripts/nsdeps: use alternative sed delimiter

2019-10-22 Thread Jessica Yu
;, which is an invalid sed substitution option. To avoid escaping forward slashes ${srctree}, we can use '|' as an alternative delimiter for sed instead to avoid this error. Signed-off-by: Jessica Yu --- v3: don't need to escape '/' since we're using a different delimiter

Re: [PATCH] scripts/nsdeps: escape '/' for module source files

2019-10-22 Thread Jessica Yu
+++ David Laight [21/10/19 16:14 +]: From Jessica Yu Sent: 21 October 2019 15:52 When doing an out of tree build with O=, the nsdeps script constructs the absolute pathname of the module source file so that it can insert MODULE_IMPORT_NS statements in the right place. However, ${srctree

Re: [PATCH v3] scripts/nsdeps: use alternative sed delimiter

2019-10-23 Thread Jessica Yu
+++ Matthias Maennich [23/10/19 11:13 +0100]: On Wed, Oct 23, 2019 at 10:23:39AM +0900, Masahiro Yamada wrote: On Tue, Oct 22, 2019 at 8:04 PM Jessica Yu wrote: When doing an out of tree build with O=, the nsdeps script constructs the absolute pathname of the module source file so that it

Re: [PATCH v3] module: Allow to disable modsign in kernel cmdline

2020-04-28 Thread Jessica Yu
+++ Greg KH [28/04/20 09:29 +0200]: On Tue, Apr 28, 2020 at 03:07:10PM +0800, Tianjia Zhang wrote: On 2020/4/28 14:35, Greg KH wrote: > On Tue, Apr 28, 2020 at 02:00:08PM +0800, Tianjia Zhang wrote: > > This option allows to disable modsign completely at the beginning, > > and turn off by set

Re: [PATCH v3 09/10] module: Remove module_disable_ro()

2020-04-28 Thread Jessica Yu
+++ Josh Poimboeuf [25/04/20 06:07 -0500]: module_disable_ro() has no more users. Remove it. Signed-off-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Hm, I guess this means we can also remove the module_enable_ro() stubs in module.h and make it a static function again (like the other

Re: [PATCH v3 09/10] module: Remove module_disable_ro()

2020-04-28 Thread Jessica Yu
+++ Josh Poimboeuf [28/04/20 11:36 -0500]: On Tue, Apr 28, 2020 at 06:25:05PM +0200, Jessica Yu wrote: +++ Josh Poimboeuf [25/04/20 06:07 -0500]: > module_disable_ro() has no more users. Remove it. > > Signed-off-by: Josh Poimboeuf > Acked-by: Peter Zijlstra (Intel) Hm, I gues

[GIT PULL] Modules fixes for v5.4-rc3

2019-10-11 Thread Jessica Yu
not being strdup'd and sym->namespace would be set to bogus data. - Various namespace-related kbuild fixes and cleanups thanks to Masahiro Yamada. Signed-off-by: Jessica Yu Masahiro Yamada (7): module: swap the

Re: [PATCH v3 09/10] module: Remove module_disable_ro()

2020-04-28 Thread Jessica Yu
+++ Josh Poimboeuf [28/04/20 12:03 -0500]: On Tue, Apr 28, 2020 at 06:41:55PM +0200, Jessica Yu wrote: +++ Josh Poimboeuf [28/04/20 11:36 -0500]: > On Tue, Apr 28, 2020 at 06:25:05PM +0200, Jessica Yu wrote: > > +++ Josh Poimboeuf [25/04/20 06:07 -0500]: > > > module_disabl

Re: Module loading problem since 5.3

2019-10-14 Thread Jessica Yu
+++ Heiner Kallweit [11/10/19 21:26 +0200]: On 10.10.2019 19:15, Luis Chamberlain wrote: On Thu, Oct 10, 2019, 6:50 PM Heiner Kallweit mailto:hkallwe...@gmail.com>> wrote:    MODULE_SOFTDEP("pre: realtek") Are you aware of any current issues with module loading that could cause t

Re: [PATCH] ftrace/module: Allow ftrace to make only loaded module text read-write

2019-10-14 Thread Jessica Yu
feel free to include my Ack in case you want to include it with the rest of the ftrace text_poke stuff. Acked-by: Jessica Yu Thanks, Jessica + goto out; + + frob_text(&mod->core_layout, set_memory_rw); + frob_text(&mod->init_layout, set_memory_r

Re: [PATCH v3 5/6] x86/ftrace: Use text_poke()

2019-10-15 Thread Jessica Yu
+++ Peter Zijlstra [11/10/19 14:59 +0200]: On Thu, Oct 10, 2019 at 07:28:19PM +0200, Peter Zijlstra wrote: Really the best solution is to move all the poking into ftrace_module_init(), before we mark it RO+X. That's what I'm going to do for jump_label and static_call as well, I just need to add

Re: [PATCH v3 5/6] x86/ftrace: Use text_poke()

2019-10-15 Thread Jessica Yu
+++ Joe Lawrence [15/10/19 11:06 -0400]: On 10/15/19 10:13 AM, Miroslav Benes wrote: Yes, it does. klp_module_coming() calls module_disable_ro() on all patching modules which patch the coming module in order to call apply_relocate_add(). New (patching) code for a module can be relocated only whe

Re: [PATCH v3 5/6] x86/ftrace: Use text_poke()

2019-10-15 Thread Jessica Yu
+++ Peter Zijlstra [15/10/19 15:56 +0200]: On Tue, Oct 15, 2019 at 03:07:40PM +0200, Jessica Yu wrote: I'm having trouble visualizing what changes you're planning on making. I want all the text poking (jump_label, ftrace, klp whatever) to happen _before_ we do the protection change

Re: [PATCH v3 5/6] x86/ftrace: Use text_poke()

2019-10-15 Thread Jessica Yu
+++ Steven Rostedt [15/10/19 09:28 -0400]: On Fri, 11 Oct 2019 14:59:03 +0200 Peter Zijlstra wrote: On Thu, Oct 10, 2019 at 07:28:19PM +0200, Peter Zijlstra wrote: > Really the best solution is to move all the poking into > ftrace_module_init(), before we mark it RO+X. That's what I'm going t

Re: [PATCH v3 5/6] x86/ftrace: Use text_poke()

2019-10-16 Thread Jessica Yu
+++ Peter Zijlstra [16/10/19 11:23 +0200]: On Wed, Oct 16, 2019 at 08:51:27AM +0200, Miroslav Benes wrote: On Tue, 15 Oct 2019, Joe Lawrence wrote: > On 10/15/19 10:13 AM, Miroslav Benes wrote: > > Yes, it does. klp_module_coming() calls module_disable_ro() on all > > patching modules which pat

Re: [PATCH] drivers: mcb: use symbol namespaces

2019-10-16 Thread Jessica Yu
+++ Johannes Thumshirn [16/10/19 12:01 +0200]: Now that we have symbol namespaces, use them in MCB to not pollute the default namespace with MCB internals. Signed-off-by: Johannes Thumshirn Hurray, more namespace users! :) Reviewed-by: Jessica Yu Thanks! --- drivers/gpio/gpio-menz127

Re: [PATCH v3 5/6] x86/ftrace: Use text_poke()

2019-10-18 Thread Jessica Yu
+++ Miroslav Benes [16/10/19 15:29 +0200]: On Wed, 16 Oct 2019, Miroslav Benes wrote: On Wed, 16 Oct 2019, Peter Zijlstra wrote: > On Tue, Oct 15, 2019 at 06:27:05PM -0400, Steven Rostedt wrote: > > > (7) Seventh session, titled "klp-convert and livepatch relocations", was led > > by Joe Lawre

Re: [PATCH v2 0/4] export/modpost: avoid renaming __ksymtab entries for symbol namespaces

2019-10-21 Thread Jessica Yu
t.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git/log/?h=modules-linus Cc: Jessica Yu Cc: Masahiro Yamada Cc: Martijn Coenen Cc: Lucas De Marchi Cc: Shaun Ruffell Cc: Greg Kroah-Hartman Cc: Will Deacon Cc: linux-kbu...@vger.kernel.org Cc: linux-modu...@vger.kernel.org Masahiro Yamada

Re: [PATCH v3 5/6] x86/ftrace: Use text_poke()

2019-10-21 Thread Jessica Yu
+++ Petr Mladek [18/10/19 15:40 +0200]: On Fri 2019-10-18 15:03:42, Jessica Yu wrote: +++ Miroslav Benes [16/10/19 15:29 +0200]: > On Wed, 16 Oct 2019, Miroslav Benes wrote: > Thinking about it more... crazy idea. I think we could leverage these new > ELF .text per vmlinux/module sec

[PATCH] scripts/nsdeps: escape '/' for module source files

2019-10-21 Thread Jessica Yu
;, which is an invalid sed substitution option. So use bash in-variable substitution to escape all forward slashes for sed. Signed-off-by: Jessica Yu --- scripts/nsdeps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/nsdeps b/scripts/nsdeps index 3754dac13b31..79f96e5

[PATCH v2] scripts/nsdeps: use alternative sed delimiter

2019-10-21 Thread Jessica Yu
;, which is an invalid sed substitution option. To avoid escaping forward slashes in ${srctree}, we can use '|' as an alternative delimiter for sed to avoid this error. Signed-off-by: Jessica Yu --- This is an alternative to my first patch here: http://lore.kernel.org/r/20191021145137.316

Re: [PATCH v2] include/linux/module.h: mark init/cleanup_module aliases as __init/exit

2019-02-07 Thread Jessica Yu
+++ Miguel Ojeda [06/02/19 22:19 +0100]: On Wed, Feb 6, 2019 at 6:56 PM Miguel Ojeda wrote: diff --git a/include/linux/module.h b/include/linux/module.h index 8fa38d3e7538..1b5e370f1bc0 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -129,13 +129,13 @@ extern void cleanup_m

Re: [PATCH][RFC] module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity

2019-01-29 Thread Jessica Yu
+++ Thomas Gleixner [28/01/19 23:38 +0100]: The original MODULE_LICENSE string for kernel modules licensed under the GPL v2 (only / or later) was simply "GPL", which was - and still is - completely sufficient for the purpose of module loading and checking whether the module is free software or pr

Re: [PATCH] include/linux/module.h: mark init/cleanup_module aliases as __cold

2019-02-04 Thread Jessica Yu
+++ Miguel Ojeda [31/01/19 17:48 +0100]: Hi Jessica, On Thu, Jan 31, 2019 at 3:22 PM Jessica Yu wrote: Hi Miguel, sorry for the delay! No worries! :) The module init functions are only called once from do_init_module(). Does the __cold attribute just assume it is unlikely to be executed

Re: [PATCH v2] modules: Only return -EEXIST for modules that have finished loading

2019-05-09 Thread Jessica Yu
by: Prarit Bhargava Cc: Jessica Yu Cc: Heiko Carstens Cc: David Arcari Hi Prarit, Thanks a lot for the revised patch. I'll queue this up right after the merge window is over. Thanks! Jessica --- kernel/module.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ke

[GIT PULL] Modules updates for v5.2

2019-05-14 Thread Jessica Yu
nstead of hijacking fields in struct Elf_Sym - Trivial code cleanups Signed-off-by: Jessica Yu Eugene Loh (1): kallsyms: store type information in its own array Mathias Krause (1): vmlinux.lds.h: drop unused _

Re: [-next] system hangs likely due to "modules: Only return -EEXIST for modules that have finished loading"

2019-04-26 Thread Jessica Yu
+++ Heiko Carstens [26/04/19 17:07 +0200]: On Fri, Apr 26, 2019 at 09:22:34AM -0400, Prarit Bhargava wrote: On 4/26/19 9:07 AM, Heiko Carstens wrote: > Hello Prarit, > > it looks like your commit f9a75c1d717f ("modules: Only return -EEXIST > for modules that have finished loading") _sometimes_ c

Re: [PATCH v3] moduleparam: Save information about built-in modules in separate file

2019-04-29 Thread Jessica Yu
ltin s/kernel.builtin/modules.builtin.modinfo/ Otherwise, for module.h and moduleparam.h: Acked-by: Jessica Yu And it would be great if Lucas can confirm if the file format and name would be OK for kmod. Thanks! Jessica

Re: [PATCH] kernel/module: Reschedule while waiting for modules to finish loading

2019-04-30 Thread Jessica Yu
d a reschedule point to the loop that waits for modules to complete loading. Reported-by: Heiko Carstens Fixes: linux-next commit f9a75c1d717f ("modules: Only return -EEXIST for modules that have finished loading") Signed-off-by: Prarit Bhargava Cc: Jessica Yu --- kernel/module.c | 1 + 1 fi

Re: [PATCH] kernel/module: Reschedule while waiting for modules to finish loading

2019-04-30 Thread Jessica Yu
for modules to complete loading. Reported-by: Heiko Carstens Fixes: linux-next commit f9a75c1d717f ("modules: Only return -EEXIST for modules that have finished loading") Signed-off-by: Prarit Bhargava Cc: Jessica Yu Thanks for the fix! Applied to modules-next. Jessica

Re: [PATCH v3] kernel/module: Reschedule while waiting for modules to finish loading

2019-05-01 Thread Jessica Yu
modules-next. Jessica Reported-by: Heiko Carstens Fixes: f9a75c1d717f ("modules: Only return -EEXIST for modules that have finished loading") Signed-off-by: Prarit Bhargava Cc: Jessica Yu Cc: Heiko Carstens --- kernel/module.c | 1 + 1 file changed, 1 insertion(+) diff --gi

Re: linux-next: Fixes tag needs some work in the modules tree

2019-05-01 Thread Jessica Yu
+++ Stephen Rothwell [01/05/19 08:10 +1000]: Hi all, In commit 7e470ea99bcd ("kernel/module: Reschedule while waiting for modules to finish loading") Fixes tag Fixes: linux-next commit f9a75c1d717f ("modules: Only return -EEXIST for modules that have finished loading") has these problem(

Re: [PATCH v3] kernel/module: Reschedule while waiting for modules to finish loading

2019-05-02 Thread Jessica Yu
+++ Prarit Bhargava [01/05/19 17:26 -0400]: On 4/30/19 6:22 PM, Prarit Bhargava wrote: On a s390 z14 LAR with 2 cpus about stalls about 3% of the time while loading the s390_trng.ko module. Add a reschedule point to the loop that waits for modules to complete loading. v3: cleanup Fixes line.

Re: [PATCH] module: Fix load failure when CONFIG_STRICT_MODULE_RWX is diabled

2019-08-13 Thread Jessica Yu
+++ zhe...@windriver.com [10/08/19 15:22 +0800]: From: He Zhe When loading modules with CONFIG_ARCH_HAS_STRICT_MODULE_RWX enabled and CONFIG_STRICT_MODULE_RWX disabled, the memory allocated for modules would not be page-aligned and cause the following BUG during frob_text. [ cut he

Re: [PATCH V37 04/29] Enforce module signatures if the kernel is locked down

2019-08-01 Thread Jessica Yu
Modified by Matthew Garrett to remove the IMA integration. This will be replaced with integration with the IMA architecture policy patchset.] Signed-off-by: David Howells Signed-off-by: Matthew Garrett Reviewed-by: Kees Cook Cc: Jessica Yu --- include/linux/security.h | 1 + ker

Re: [PATCH V37 19/29] Lock down module params that specify hardware parameters (eg. ioport)

2019-08-01 Thread Jessica Yu
Signed-off-by: Matthew Garrett Reviewed-by: Kees Cook Cc: Jessica Yu --- include/linux/security.h | 1 + kernel/params.c | 28 +++- security/lockdown/lockdown.c | 1 + 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/include/linux/security.h b

Re: [PATCH] modules: always page-align module section allocations

2019-07-30 Thread Jessica Yu
+++ Jessica Yu [24/07/19 17:01 +0200]: Some arches (e.g., arm64, x86) have moved towards non-executable module_alloc() allocations for security hardening reasons. That means that the module loader will need to set the text section of a module to executable, regardless of whether or not

Re: [PATCH V37 04/29] Enforce module signatures if the kernel is locked down

2019-08-08 Thread Jessica Yu
+++ Matthew Garrett [01/08/19 13:42 -0700]: On Thu, Aug 1, 2019 at 7:22 AM Jessica Yu wrote: Apologies if this was addressed in another patch in your series (I've only skimmed the first few), but what should happen if the kernel is locked down, but CONFIG_MODULE_SIG=n? Or shou

Re: [PATCH V38 19/29] Lock down module params that specify hardware parameters (eg. ioport)

2019-08-08 Thread Jessica Yu
Signed-off-by: Matthew Garrett Reviewed-by: Kees Cook Cc: Jessica Yu --- include/linux/security.h | 1 + kernel/params.c | 27 ++- security/lockdown/lockdown.c | 1 + 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/include/linux/security.h b

Re: [v5.3-rc1 regression] Hitting a kernel BUG() when trying to load a module on DaVinci SoC

2019-07-22 Thread Jessica Yu
+++ Bartosz Golaszewski [22/07/19 14:12 +0200]: Hi, with v5.3-rc1 I'm hitting the following BUG() when trying to load the gpio-backlight module: kernel BUG at kernel/module.c:1919! Internal error: Oops - BUG: 0 [#1] PREEMPT ARM Modules linked in: CPU: 0 PID: 1 Comm: systemd Tainted: GW

Re: next-20190722, imx25: Oops when loading a module

2019-07-22 Thread Jessica Yu
+++ Martin Kaiser [22/07/19 12:13 +0200]: Dear all, I run next-20190722 on an arm imx25 system and came across an issue that might be worth reporting. I am no sure to whom, though. Please let me know if I got that wrong. Loading a module, no matter which one, causes a segfault and a dump such a

[PATCH] modules: always page-align module section allocations

2019-07-24 Thread Jessica Yu
, rodata, etc). Fixes: 2eef1399a866 ("modules: fix BUG when load module with rodata=n") Reported-by: Martin Kaiser Reported-by: Bartosz Golaszewski Tested-by: David Lechner Tested-by: Martin Kaiser Signed-off-by: Jessica Yu --- kernel/module.c | 7 +-- 1 file changed, 1 insertion(+), 6

Re: [PATCH v2] modules: fix BUG when load module with rodata=n

2019-06-24 Thread Jessica Yu
+++ Yang Yingliang [20/06/19 10:18 +0800]: When loading a module with rodata=n, it causes an executing NX-protected page BUG. [ 32.379191] kernel tried to execute NX-protected page - exploit attempt? (uid: 0) [ 32.382917] BUG: unable to handle page fault for address: c0005000 [ 32

Re: [PATCH modules v2 0/2] Fix handling of exit unwinding sections (on ARM)

2019-06-24 Thread Jessica Yu
+++ Matthias Schiffer [21/06/19 14:35 +0200]: On Fri, 2019-06-07 at 12:49 +0200, Matthias Schiffer wrote: For some time (050d18d1c651 "ARM: 8650/1: module: handle negative R_ARM_PREL31 addends correctly", v4.11+), building a kernel without CONFIG_MODULE_UNLOAD would lead to module loads failing

Re: [PATCH] modules: fix BUG when load module with rodata=n

2019-06-18 Thread Jessica Yu
+++ Yang Yingliang [17/06/19 14:59 +0800]: When loading a module with rodata=n, it causes an executing NX-protected page BUG. [ 32.379191] kernel tried to execute NX-protected page - exploit attempt? (uid: 0) [ 32.382917] BUG: unable to handle page fault for address: c0005000 [ 32

Re: [PATCH] modules: fix BUG when load module with rodata=n

2019-06-18 Thread Jessica Yu
+++ Nadav Amit [18/06/19 05:59 +]: On Jun 16, 2019, at 11:59 PM, Yang Yingliang wrote: When loading a module with rodata=n, it causes an executing NX-protected page BUG. [ 32.379191] kernel tried to execute NX-protected page - exploit attempt? (uid: 0) [ 32.382917] BUG: unable to hand

Re: [PATCH] modules: fix BUG when load module with rodata=n

2019-06-19 Thread Jessica Yu
+++ Yang Yingliang [19/06/19 10:28 +0800]: On 2019/6/18 21:48, Jessica Yu wrote: +++ Yang Yingliang [17/06/19 14:59 +0800]: When loading a module with rodata=n, it causes an executing NX-protected page BUG. [ 32.379191] kernel tried to execute NX-protected page - exploit attempt? (uid: 0

Re: [PATCH] modules: fix compile error if don't have strict module rwx

2019-06-25 Thread Jessica Yu
+++ Yang Yingliang [25/06/19 17:40 +0800]: If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not defined, we need stub for module_enable_nx() and module_enable_x(). If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is defined, but CONFIG_STRICT_MODULE_RWX is disabled, we need stub for module_enable_nx. Move frob_text

Re: [PATCH] modules: fix compile error if don't have strict module rwx

2019-06-26 Thread Jessica Yu
+++ Yang Yingliang [26/06/19 11:36 +0800]: On 2019/6/26 3:21, Jessica Yu wrote: +++ Yang Yingliang [25/06/19 17:40 +0800]: If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not defined, we need stub for module_enable_nx() and module_enable_x(). If CONFIG_ARCH_HAS_STRICT_MODULE_RWX is defined, but

Re: [PATCH v3] kernel/module: Fix mem leak in module_add_modinfo_attrs

2019-06-11 Thread Jessica Yu
+++ YueHaibing [03/06/19 22:45 +0800]: In module_add_modinfo_attrs if sysfs_create_file fails, we forget to free allocated modinfo_attrs and roll back the sysfs files. Fixes: 03e88ae1b13d ("[PATCH] fix module sysfs files reference counting") Signed-off-by: YueHaibing --- v3: reuse module_remove

Re: [PATCH modules 1/2] module: allow arch overrides for .exit section names

2019-06-06 Thread Jessica Yu
+++ Matthias Schiffer [03/06/19 12:57 +0200]: Some archs like ARM store unwind information for .exit.text in sections with unusual names. As this unwind information refers to .exit.text, it must not be loaded when .exit.text is not loaded (when CONFIG_MODULE_UNLOAD is unset); otherwise, loading a

Re: [PATCH modules 0/2] Fix handling of exit unwinding sections (on ARM)

2019-06-06 Thread Jessica Yu
+++ Matthias Schiffer [06/06/19 10:14 +0200]: On Mon, 2019-06-03 at 12:57 +0200, Matthias Schiffer wrote: For some time (050d18d1c651 "ARM: 8650/1: module: handle negative R_ARM_PREL31 addends correctly", v4.11+), building a kernel without CONFIG_MODULE_UNLOAD would lead to module loads failing

Re: [PATCH] kernel: module: Use struct_size() helper

2019-06-06 Thread Jessica Yu
+++ Gustavo A. R. Silva [04/06/19 18:23 -0500]: Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(*sect_attrs) + nloaded * siz

Re: [PATCH v2] kernel: module: Use struct_size() helper

2019-06-07 Thread Jessica Yu
+++ Gustavo A. R. Silva [06/06/19 13:18 -0500]: One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct module_sect_attrs { ..

Re: [PATCH v3] kernel/module: Fix mem leak in module_add_modinfo_attrs

2019-06-07 Thread Jessica Yu
+++ Miroslav Benes [04/06/19 12:46 +0200]: On Mon, 3 Jun 2019, YueHaibing wrote: In module_add_modinfo_attrs if sysfs_create_file fails, we forget to free allocated modinfo_attrs and roll back the sysfs files. Fixes: 03e88ae1b13d ("[PATCH] fix module sysfs files reference counting") Signed-off

Re: [PATCH] module: add usage links when calling ref_module func

2019-07-01 Thread Jessica Yu
+++ Zhiqiang Liu [28/06/19 20:32 +0800]: From: Zhiqiang Liu Problem: Users can call ref_module func in their modules to construct relationships with other modules. However, the holders '/sys/module//holders' of the target module donot include the users` module. So lsmod command misses detailed

Re: [PATCH v2] module: add usage links when calling ref_module func

2019-07-09 Thread Jessica Yu
ng to this module. If ref_module is called in mod->init() func, the usage links cannot be added. Here, we will add usage link of a to b's holder_dir. V1->V2: - remove incorrect Fixes tag - fix error handling of sysfs_create_link as suggested by Jessica Yu Signed-off-by: Zhiqiang Liu Su

Re: [PATCH v2] module: add usage links when calling ref_module func

2019-07-11 Thread Jessica Yu
+++ Zhiqiang Liu [11/07/19 14:03 +0800]: On 2019/7/10 0:10, Jessica Yu wrote: +++ Zhiqiang Liu [03/07/19 10:09 +0800]: From: Zhiqiang Liu V2: - remove incorrect Fixes tag - fix error handling of sysfs_create_link as suggested by Jessica Yu Signed-off-by: Zhiqiang Liu Suggested-by: Jessica

Re: [PATCH] vmlinux.lds.h: drop unused __vermagic

2019-03-11 Thread Jessica Yu
+++ Mathias Krause [10/03/19 20:26 +0100]: Hi Jessica, On Mon, 21 Jan 2019 at 12:39, Mathias Krause wrote: On Wed, 2 Jan 2019 at 21:29, Jessica Yu wrote: > > +++ Mathias Krause [30/12/18 13:40 +0100]: > >The reference to '__vermagic' is a relict from v2.5 times. And

Re: [PATCH v3] x86/ima: require signed kernel modules

2019-02-18 Thread Jessica Yu
enabled. A custom IMA policy may still define and require an IMA signature. Signed-off-by: Mimi Zohar Acked-by: Jessica Yu Thanks! --- arch/x86/kernel/ima_arch.c | 9 - include/linux/module.h | 5 + kernel/module.c| 5 + 3 files changed, 18 insertions(+), 1 deletion

Re: [PATCH] kallsyms: store type information in its own array

2019-03-08 Thread Jessica Yu
+++ Eugene Loh [07/03/19 15:37 -0800]: It's been 1.5 weeks. Could I get some feedback on this patch? Thanks. Apologies, I was on vacation the past week. Added some CC's from the last time we talked about overwriting the st_size/st_info Elf_Sym fields, in case anyone else has comments. On 02

Re: [PATCH 3/3] module: Remove superfluous call to klp_module_going()

2018-06-11 Thread Jessica Yu
klp_module_going(). Remove the call from delete_module syscall though, because that one is really superfluous. Signed-off-by: Miroslav Benes Acked-by: Jessica Yu --- kernel/module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index a6e43a5806a1

Re: Wrong module .text address in 4.16.0

2018-04-16 Thread Jessica Yu
+++ Christian Borntraeger [16/04/18 12:53 +0200]: Can this be related to commit ef0010a30935de4e0211cbc7bdffc30446cdee9b vsprintf: don't use 'restricted_pointer()' when not restricting and related commits? To me it looks like %pk is always printing the hash, but never the real pointer - no m

Re: [PATCH 2/2] module: Allow to always show the status of modsign

2018-04-16 Thread Jessica Yu
+++ Jia Zhang [11/04/18 11:53 +0800]: The sig_enforce parameter could be always shown to reflect the current status of modsign. For the case of CONFIG_MODULE_SIG_FORCE=y, this modification does nothing harmless. Signed-off-by: Jia Zhang Both patches look fine to me. Queued on modules-next. T

Re: [PATCH] kernel/module: silence a gcc warning

2018-04-16 Thread Jessica Yu
+++ Mathieu Malaterre [11/04/18 21:05 +0200]: In commit 8c8ef42aee8f ("module: include other structures in module version check"), the function `struct_module` was renamed to `module_layout` but no prototype was added to `include/linux/module.h`. Remove warning triggered at W=1: kernel/module.c

Re: [PATCH v3] module: Fix display of wrong module .text address

2018-04-18 Thread Jessica Yu
le/qeth_l2/sections/.text 0x18ea8363 displays a random address. This breaks the perf tool which uses this address on s390 to calculate start of .text section in memory. Fix this by printing the correct (unhashed) address. Thanks to Jessica Yu for helping on this. Fixes: ef0010a30935 ("vspr

Adding modules-linus branch to linux-next

2018-04-18 Thread Jessica Yu
Hi Stephen, Could you please add the modules-linus branch at: git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-linus to linux-next? The branch will contain rc fixes intended for the current release. A good name for it might be modules-current. Thanks! Jessica

Re: module: When modifying a module's text ignore modules which are going away too

2016-11-23 Thread Jessica Yu
+++ Steven Rostedt [23/11/16 11:00 -0500]: On Wed, 9 Nov 2016 05:40:58 -0500 Jessica Yu wrote: +++ Aaron Tomlin [07/11/16 11:46 +]: >Hi Jessica, > >Any thoughts? Hi Aaron, Thanks for your patience as I slowly work through a large swath of emails :-) Anyway, this looks fine

Re: module: Ensure a module's state is set accordingly during module coming cleanup code

2016-11-23 Thread Jessica Yu
+++ Miroslav Benes [16/11/16 16:49 +0100]: On Wed, 9 Nov 2016, Jessica Yu wrote: +++ Rusty Russell [26/10/16 11:24 +1030]: > Aaron Tomlin writes: > > In load_module() in the event of an error, for e.g. unknown module > > parameter(s) specified we go to perform some module

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-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: taint/module: Fix problems when out-of-kernel driver defines true or false

2017-01-17 Thread Jessica Yu
+++ Larry Finger [17/01/17 10:08 -0600]: Jessica, What is the status of the patch? VirtualBox has converted to the hotplug state manager, thus their drivers now build, but only if this patch has been applied. Thanks, Larry This fix has already been sitting on modules-next for some time, queu

[GIT PULL] modules fixes for 4.10-rc5

2017-01-17 Thread Jessica Yu
) Modules fixes for v4.10-rc5 - Fix out-of-tree module breakage when it supplies its own definitions of true and false Signed-off-by: Jessica Yu Larry Finger (1): taint/module: Fix problems when

Re: module: fix failed to rmmod kernel module when it's name is too long

2017-01-18 Thread Jessica Yu
+++ Xie XiuQi [13/01/17 17:19 +0800]: When the name of kernel module is more than 56 chars (include 56), the module could be insmod successfully, but failed to rmmod. $ strace rmmod tst_112233445566 ... open("/sys/module/tst_1122334

Re: livepatch/module: print notice of TAINT_LIVEPATCH

2017-01-13 Thread Jessica Yu
+++ Joe Lawrence [12/01/17 11:57 -0500]: Add back the "tainting kernel with TAINT_LIVEPATCH" kernel log message that commit 2992ef29ae01 ("livepatch/module: make TAINT_LIVEPATCH module-specific") dropped. Now that it's a module-specific taint flag, include the module name. Signed-off-by: Joe La

Re: arm: Add livepatch arch specific code

2017-01-16 Thread Jessica Yu
+7466,15 @@ M: Josh Poimboeuf M: Jessica Yu M: Jiri Kosina M: Miroslav Benes +M: Abel Vesa R: Petr Mladek S: Maintained F: kernel/livepatch/ F: include/linux/livepatch.h F: arch/x86/include/asm/livepatch.h F: arch/x86/kernel/livepatch.c +F

Re: arm: Add livepatch arch specific code

2017-01-16 Thread Jessica Yu
+++ Jessica Yu [16/01/17 19:22 -0500]: +++ Miroslav Benes [16/01/17 17:47 +0100]: On Tue, 6 Dec 2016, Abel Vesa wrote: klp_get_ftrace_location is used by ftrace to get the entry for a specific function from the mcount list. klp_arch_set_pc is used to set the pc from the regs passed as an

Re: arm: module: Add apply_relocate_add

2017-01-16 Thread Jessica Yu
+++ Abel Vesa [06/12/16 17:06 +]: It was only added to fix compiler error. It is not implemented yet. Signed-off-by: Abel Vesa --- arch/arm/kernel/module.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 4f14b5c..bf94922

Re: livepatch: add missing printk newlines

2017-01-25 Thread Jessica Yu
+++ Josh Poimboeuf [24/01/17 14:32 -0600]: Add missing newlines to some pr_err() strings. Signed-off-by: Josh Poimboeuf Acked-by: Jessica Yu Jessica

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

2016-07-05 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 | 12 ++-- 2 files changed, 13 insertions

[PATCH 0/2] Fix issue with alternatives/paravirt patches

2016-07-05 Thread Jessica Yu
(for now). I did some light testing with some patches to kvm and verified that the original issue reported in [2] was fixed. Based on linux-next. [1] http://thread.gmane.org/gmane.linux.kernel/2185604/ [2] https://github.com/dynup/kpatch/issues/580 Jessica Yu (2): livepatch: use arch_klp_in

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

2016-07-05 Thread Jessica Yu
jname}" and applied in arch_klp_init_object_loaded(). Signed-off-by: Jessica Yu --- arch/x86/kernel/Makefile| 1 + arch/x86/kernel/livepatch.c | 66 + 2 files changed, 67 insertions(+) create mode 100644 arch/x86/kernel/livepatch.c diff --git

<    1   2   3   4   5   6   7   >