Re: [PATCH v2 2/2] certs: Add support for using elliptic curve keys for signing modules

2021-04-20 Thread Jessica Yu
+++ Stefan Berger [08/04/21 11:24 -0400]: Add support for using elliptic curve keys for signing modules. It uses a NIST P384 (secp384r1) key if the user chooses an elliptic curve key and will have ECDSA support built into the kernel. Note: A developer choosing an ECDSA key for signing modules

Re: [PATCH v4 05/13] module: Add printk formats to add module build ID to stacktraces

2021-04-19 Thread Jessica Yu
+++ Stephen Boyd [17/04/21 18:52 -0700]: [snip] Sounds good. It means that some more ifdefs are probably required vs. making the array size be 0 when the config is disabled but that isn't a big problem for me. I'm reworking the code now and will test and then send v5 shortly. Thanks! Great,

Re: [PATCH v4 05/13] module: Add printk formats to add module build ID to stacktraces

2021-04-15 Thread Jessica Yu
/0x1c0 do_el0_svc_compat+0x28/0x3c el0_svc_compat+0x10/0x1c el0_sync_compat_handler+0xa8/0xcc el0_sync_compat+0x178/0x180 ---[ end trace f89bc7f5417cbcc6 ]--- Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Petr Mladek Cc: Steven Rostedt Cc

Re: Re: [PATCH] kernel/module: Use BUG_ON instead of if condition followed by BUG.

2021-04-13 Thread Jessica Yu
+++ 周传高 [13/04/21 15:21 +0800]: +++ zhouchuangao [30/03/21 05:07 -0700]: It can be optimized at compile time. Signed-off-by: zhouchuangao Hi, Could you please provide a more descriptive changelog? I.e., Is this a fix for a cocinelle warning? What are the optimization(s)? Thanks,

Re: [PATCH] kernel/module: Use BUG_ON instead of if condition followed by BUG.

2021-04-12 Thread Jessica Yu
+++ zhouchuangao [30/03/21 05:07 -0700]: It can be optimized at compile time. Signed-off-by: zhouchuangao Hi, Could you please provide a more descriptive changelog? I.e., Is this a fix for a cocinelle warning? What are the optimization(s)? Thanks, Jessica --- kernel/module.c | 4 ++-- 1

Re: [PATCH v3 04/12] module: Add printk format to add module build ID to stacktraces

2021-04-08 Thread Jessica Yu
+++ Stephen Boyd [30/03/21 20:05 -0700]: [snipped] diff --git a/kernel/module.c b/kernel/module.c index 30479355ab85..6f5bc1b046a5 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -2770,6 +2771,20 @@

Re: [PATCH v3 02/12] buildid: Stash away kernels build ID on init

2021-04-08 Thread Jessica Yu
+++ Stephen Boyd [30/03/21 20:05 -0700]: [snipped] diff --git a/lib/buildid.c b/lib/buildid.c index 010ab0674cb9..b939bbc59233 100644 --- a/lib/buildid.c +++ b/lib/buildid.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include #include #include #include @@ -171,3 +172,19

Re: [PATCH v3 04/17] module: ensure __cfi_check alignment

2021-03-29 Thread Jessica Yu
the correct __cfi_check() location and alignment. It also discards the .eh_frame section, which Clang can generate with certain sanitizers, such as CFI. Link: https://bugs.llvm.org/show_bug.cgi?id=46293 Signed-off-by: Sami Tolvanen Acked-by: Jessica Yu Thanks!

[PATCH] module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD

2021-03-23 Thread Jessica Yu
.gnu.linkonce.this_module Init section allocation order: .init.text .exit.text .symtab .strtab [jeyu: thanks to Peter Zijlstra for most of the changelog] Link: https://lore.kernel.org/lkml/YFiuphGw0RKehWsQ@gunter/ Signed-off-by: Jessica Yu --- Do you want to take

Re: [PATCH 3/3] static_call: Fix static_call_update() sanity check

2021-03-22 Thread Jessica Yu
+++ Peter Zijlstra [22/03/21 17:54 +0100]: On Mon, Mar 22, 2021 at 03:50:14PM +0100, Jessica Yu wrote: It should be doable. If you want the exit sections to be treated the same as module init, the following patch should stuff any exit sections into the module init "region" (completel

Re: [PATCH 3/3] static_call: Fix static_call_update() sanity check

2021-03-22 Thread Jessica Yu
+++ Steven Rostedt [19/03/21 16:57 -0400]: On Fri, 19 Mar 2021 20:34:24 +0100 Peter Zijlstra wrote: On Fri, Mar 19, 2021 at 02:00:05PM -0400, Steven Rostedt wrote: > Would making __exit code the same as init code work? That is, load it just > like module init code is loaded, and free it when

Re: [PATCH 3/3] static_call: Fix static_call_update() sanity check

2021-03-22 Thread Jessica Yu
+++ Steven Rostedt [19/03/21 14:00 -0400]: On Fri, 19 Mar 2021 13:57:38 +0100 Peter Zijlstra wrote: Jessica, can you explain how !MODULE_UNLOAD is supposed to work? Alternatives, jump_labels and static_call all can have relocations into __exit code. Not loading it at all would be BAD.

Re: [PATCH v2 2/2] modules: add CONFIG_MODPROBE_PATH

2021-03-11 Thread Jessica Yu
Acked-by: Jessica Yu Thanks!

Re: [GIT PULL] Modules updates for v5.12

2021-02-24 Thread Jessica Yu
ing like this maybe? (untested) --- From 08bc08229fc3801b1a580a07ce7ff3e806b3fe90 Mon Sep 17 00:00:00 2001 From: Jessica Yu Date: Wed, 24 Feb 2021 14:54:09 +0100 Subject: [PATCH] Kconfig: invert TRIM_UNUSED_SYMBOLS option and rename it to KEEP_UNUSED_SYMBOLS Removing CONFIG_UNUSED_SYMBOLS (commit 3

Re: [GIT PULL] Modules updates for v5.12

2021-02-24 Thread Jessica Yu
+++ Linus Torvalds [23/02/21 12:03 -0800]: On Tue, Feb 23, 2021 at 12:01 PM Christoph Hellwig wrote: Does your build now enable TRIM_UNUSED_KSYMS but previously didn't by chance? Crossed emails. This is plain "make allmodconfig", so yes, now it will enable TRIM_UNUSED_KSYMS. This is

[GIT PULL] Modules updates for v5.12

2021-02-23 Thread Jessica Yu
loader. (Christoph Hellwig) - Harden ELF checks on module load and validate ELF structures before checking the module signature (Frank van der Linden) - Fix undefined symbol warning for clang (Fangrui Song) - Fix smatch warning (Dan Carpenter) Signed-off-by: Jessica Yu

Re: [PATCH] kbuild: fix CONFIG_TRIM_UNUSED_KSYMS build for ppc64

2021-02-11 Thread Jessica Yu
+++ Masahiro Yamada [11/02/21 15:14 +0900]: Stephen Rothwell reported a build error on ppc64 when CONFIG_TRIM_UNUSED_KSYMS is enabled. Jessica Yu pointed out the cause of the error with the reference to the ppc64 elf ABI: "Symbol names with a dot (.) prefix are reserved for holding

Re: [PATCH] module: potential uninitialized return in module_kallsyms_on_each_symbol()

2021-02-10 Thread Jessica Yu
+++ Dan Carpenter [10/02/21 13:57 +0300]: Smatch complains that: kernel/module.c:4472 module_kallsyms_on_each_symbol() error: uninitialized symbol 'ret'. This warning looks like it could be correct if the list is empty. Fixes: 013c1667cf78 ("kallsyms: refactor

Re: linux-next: build failure after merge of the modules tree

2021-02-10 Thread Jessica Yu
+++ Stephen Rothwell [10/02/21 23:21 +1100]: Hi Jessica, On Wed, 10 Feb 2021 09:06:48 +0100 Jessica Yu wrote: Sorry, by "feature" I meant CONFIG_TRIM_UNUSED_KSYMS. This config option was introduced around v4.7. If simply enabling it produces these compilation errors I was

Re: linux-next: build failure after merge of the modules tree

2021-02-10 Thread Jessica Yu
+++ Stephen Rothwell [10/02/21 08:50 +1100]: Hi Jessica, On Tue, 9 Feb 2021 16:16:20 +0100 Jessica Yu wrote: Hmm, these errors don't look like it's related to that particular commit. I was I found this commit by bisection and then tested by reverting it. Before this commit

Re: linux-next: build failure after merge of the modules tree

2021-02-09 Thread Jessica Yu
+++ Stephen Rothwell [09/02/21 21:08 +1100]: Hi all, After merging the modules tree, today's linux-next build (powerpc allyesconfig) failed like this: In file included from include/linux/export.h:123, from include/linux/linkage.h:7, from

Re: module loader dead code removal and cleanups v3

2021-02-08 Thread Jessica Yu
+++ Christoph Hellwig [02/02/21 13:13 +0100]: Hi all, this series removes support for long term unused export types and cleans up various loose ends in the module loader. Changes since v2: - clean up klp_find_object_symbol a bit - remove the now unused module_assert_mutex helper Changes since

Re: [PATCH v6] modules: introduce the MODULE_SCMVERSION config

2021-02-03 Thread Jessica Yu
+++ Will McVicker [21/01/21 21:36 +]: Config MODULE_SCMVERSION introduces a new module attribute -- `scmversion` -- which can be used to identify a given module's SCM version. This is very useful for developers that update their kernel independently from their kernel modules or vice-versa

Re: module loader dead code removal and cleanups v3

2021-02-02 Thread Jessica Yu
+++ Christoph Hellwig [02/02/21 13:13 +0100]: Hi all, this series removes support for long term unused export types and cleans up various loose ends in the module loader. Changes since v2: - clean up klp_find_object_symbol a bit - remove the now unused module_assert_mutex helper Changes since

Re: [PATCH 04/13] module: use RCU to synchronize find_module

2021-02-01 Thread Jessica Yu
+++ Miroslav Benes [29/01/21 16:29 +0100]: On Thu, 28 Jan 2021, Christoph Hellwig wrote: Allow for a RCU-sched critical section around find_module, following the lower level find_module_all helper, and switch the two callers outside of module.c to use such a RCU-sched critical section instead

Re: [PATCH 13/13] module: remove EXPORY_UNUSED_SYMBOL*

2021-01-27 Thread Jessica Yu
+++ Christoph Hellwig [21/01/21 08:49 +0100]: EXPORT_UNUSED_SYMBOL* is not actually used anywhere. Remove the unused functionality as we generally just remove unused code anyway. Signed-off-by: Christoph Hellwig --- arch/arm/configs/bcm2835_defconfig | 1 -

Re: [PATCH 04/13] livepatch: move klp_find_object_module to module.c

2021-01-26 Thread Jessica Yu
+++ Christoph Hellwig [21/01/21 08:49 +0100]: To uncouple the livepatch code from module loader internals move a slightly refactored version of klp_find_object_module to module.c This allows to mark find_module static and removes one of the last users of module_mutex outside of module.c.

Re: [PATCH v3] module: harden ELF info handling

2021-01-18 Thread Jessica Yu
+++ Frank van der Linden [14/01/21 22:21 +]: 5fdc7db644 ("module: setup load info before module_sig_check()") moved the ELF setup, so that it was done before the signature check. This made the module name available to signature error messages. However, the checks for ELF correctness in

Re: [PATCH v3] module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols

2021-01-18 Thread Jessica Yu
+++ Fangrui Song [15/01/21 11:52 -0800]: clang-12 -fno-pic (since https://github.com/llvm/llvm-project/commit/a084c0388e2a59b9556f2de008232da3f1d6) can emit `call __stack_chk_fail@PLT` instead of `call __stack_chk_fail` on x86. The two forms should have identical behaviors on x86-64 but the

Re: [PATCH v2] module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols

2021-01-15 Thread Jessica Yu
+++ Marco Elver [15/01/21 08:03 +0100]: On Thu, 14 Jan 2021 at 22:54, Fangrui Song wrote: clang-12 -fno-pic (since https://github.com/llvm/llvm-project/commit/a084c0388e2a59b9556f2de008232da3f1d6) can emit `call __stack_chk_fail@PLT` instead of `call __stack_chk_fail` on x86. The two

Re: [PATCH v2] module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols

2021-01-15 Thread Jessica Yu
+++ Nick Desaulniers [14/01/21 14:01 -0800]: On Thu, Jan 14, 2021 at 1:54 PM 'Fangrui Song' via Clang Built Linux wrote: clang-12 -fno-pic (since https://github.com/llvm/llvm-project/commit/a084c0388e2a59b9556f2de008232da3f1d6) can emit `call __stack_chk_fail@PLT` instead of `call

Re: [PATCH] module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols

2021-01-14 Thread Jessica Yu
+++ Fāng-ruì Sòng [14/01/21 08:57 -0800]: On Thu, Jan 14, 2021 at 6:06 AM Jessica Yu wrote: +++ Fangrui Song [13/01/21 21:48 -0800]: >clang-12 -fno-pic (since >https://github.com/llvm/llvm-project/commit/a084c0388e2a59b9556f2de008232da3f1d6) >can emit `call __stack_chk_fail@PLT

Re: [PATCH] module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols

2021-01-14 Thread Jessica Yu
+++ Fangrui Song [13/01/21 21:48 -0800]: clang-12 -fno-pic (since https://github.com/llvm/llvm-project/commit/a084c0388e2a59b9556f2de008232da3f1d6) can emit `call __stack_chk_fail@PLT` instead of `call __stack_chk_fail` on x86. The two forms should have identical behaviors on x86-64 but the

Re: [PATCH v2] module: harden ELF info handling

2021-01-13 Thread Jessica Yu
+++ Frank van der Linden [07/01/21 19:30 +]: 5fdc7db644 ("module: setup load info before module_sig_check()") moved the ELF setup, so that it was done before the signature check. This made the module name available to signature error messages. However, the checks for ELF correctness in

Re: [PATCH v5] modules: introduce the MODULE_SCMVERSION config

2021-01-12 Thread Jessica Yu
+++ Will McVicker [08/01/21 00:30 +]: Config MODULE_SCMVERSION introduces a new module attribute -- `scmversion` -- which can be used to identify a given module's SCM version. This is very useful for developers that update their kernel independently from their kernel modules or vice-versa

Re: Linux Kernel module notification bug

2021-01-12 Thread Jessica Yu
+++ Adam Zabrocki [12/01/21 01:15 +0100]: Hello, On Mon, Jan 11, 2021 at 03:20:48PM +0100, Jessica Yu wrote: +++ Adam Zabrocki [10/01/21 18:54 +0100]: > Hello, > > I believe that the following commit does introduce a gentle "functionality > bug": > > "module:

Re: Linux Kernel module notification bug

2021-01-11 Thread Jessica Yu
+++ Adam Zabrocki [10/01/21 18:54 +0100]: Hello, I believe that the following commit does introduce a gentle "functionality bug": "module: delay kobject uevent until after module init call":

Re: [PATCH v4] modules: introduce the MODULE_SCMVERSION config

2021-01-07 Thread Jessica Yu
, 2020 at 4:01 AM Jessica Yu wrote: +++ Will McVicker [16/12/20 22:08 +]: >Config MODULE_SCMVERSION introduces a new module attribute -- >`scmversion` -- which can be used to identify a given module's SCM >version. This is very useful for developers that update their kernel >indepe

Re: [PATCH] module: harden ELF info handling

2021-01-05 Thread Jessica Yu
Hi Frank, Sorry for the delay. I've just gotten back from vacation :-) +++ Frank van der Linden [21/12/20 23:49 +]: 5fdc7db644 ("module: setup load info before module_sig_check()") moved the ELF setup, so that it was done before the signature check. This made the module name available to

Re: [PATCH v4] modules: introduce the MODULE_SCMVERSION config

2020-12-18 Thread Jessica Yu
+++ Will McVicker [16/12/20 22:08 +]: Config MODULE_SCMVERSION introduces a new module attribute -- `scmversion` -- which can be used to identify a given module's SCM version. This is very useful for developers that update their kernel independently from their kernel modules or vice-versa

[GIT PULL] Modules updates for v5.11

2020-12-17 Thread Jessica Yu
inconsistency by setting it back to GOING when a module fails to load and is on its way out (from Miroslav Benes) - Some comment and code cleanups (from Sergey Shtylyov) Signed-off-by: Jessica Yu Jessica Yu (1): module: delay kobject

Re: static_branch_enable() does not work from a __init function?

2020-12-16 Thread Jessica Yu
+++ Peter Zijlstra [16/12/20 14:23 +0100]: On Wed, Dec 16, 2020 at 02:10:16PM +0100, Jessica Yu wrote: +++ Peter Zijlstra [16/12/20 13:47 +0100]: > Only because we're having .init=false, incorrectly. See the other email. Ah yeah, you're right. I also misread the intent

Re: static_branch_enable() does not work from a __init function?

2020-12-16 Thread Jessica Yu
+++ Peter Zijlstra [16/12/20 13:47 +0100]: On Wed, Dec 16, 2020 at 12:55:25PM +0100, Jessica Yu wrote: +++ Peter Zijlstra [16/12/20 10:26 +0100]: [snip] > > PS, I originally found: in arch/x86/kvm/vmx/vmx.c: vmx_init(), it looks > > like the line "static_branch_enable(_evmcs

Re: static_branch_enable() does not work from a __init function?

2020-12-16 Thread Jessica Yu
+++ Peter Zijlstra [16/12/20 10:26 +0100]: On Wed, Dec 16, 2020 at 03:54:29AM +, Dexuan Cui wrote: PS, I originally found: in arch/x86/kvm/vmx/vmx.c: vmx_init(), it looks like the line "static_branch_enable(_evmcs);" does not take effect in a v5.4-based kernel, but does take effect in the

Re: static_branch_enable() does not work from a __init function?

2020-12-16 Thread Jessica Yu
+++ Peter Zijlstra [16/12/20 10:26 +0100]: [snip] PS, I originally found: in arch/x86/kvm/vmx/vmx.c: vmx_init(), it looks like the line "static_branch_enable(_evmcs);" does not take effect in a v5.4-based kernel, but does take effect in the v5.10 kernel in the same x86-64 virtual machine on

Re: [PATCH v3 1/2] scripts/setlocalversion: allow running in a subdir

2020-12-11 Thread Jessica Yu
Hi Will, +++ Will McVicker [08/12/20 20:05 +]: Getting the scmversion using scripts/setlocalversion currently only works when run at the root of a git or mecurial project. This was introduced in commit 8558f59edf93 ("setlocalversion: Ignote SCMs above the linux source tree") so that if one

Re: [PATCH RFC 1/1] module: delay kobject uevent until after module init call

2020-12-10 Thread Jessica Yu
+++ Jessica Yu [03/12/20 14:51 +0100]: Apparently there has been a longstanding race between udev/systemd and the module loader. Currently, the module loader sends a uevent right after sysfs initialization, but before the module calls its init function. However, some udev rules expect

Re: [PATCH v2 2/2] modules: add scmversion field

2020-12-07 Thread Jessica Yu
+++ Will McVicker [25/11/20 01:05 +]: Add the modinfo field `scmversion` to include the SCM version of kernel modules, e.g. git sha1. This allows one to identify the exact source code version of a given kernel module. You can retrieve it in two ways, 1) By using modinfo > modinfo -F

Re: [PATCH] module: drop semicolon from version macro

2020-12-07 Thread Jessica Yu
+++ Johan Hovold [07/12/20 10:13 +0100]: Drop the trailing semicolon from the MODULE_VERSION() macro definition which was left when removing the array-of-pointer indirection. Signed-off-by: Johan Hovold Applied, thanks! Jessica --- include/linux/module.h | 2 +- 1 file changed, 1

[PATCH RFC 1/1] module: delay kobject uevent until after module init call

2020-12-03 Thread Jessica Yu
://github.com/systemd/systemd/issues/17586 Signed-off-by: Jessica Yu --- kernel/module.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index a40ec708f8f2..e1dd0df57244 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1897,7 +1897,6

[PATCH RFC 0/1] Delay module uevent until after initialization

2020-12-03 Thread Jessica Yu
testing would be greatly appreciated. Thanks, Jessica Jessica Yu (1): module: delay kobject uevent until after module init call kernel/module.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

Re: [PATCH 0/8] linker-section array fix and clean ups

2020-12-01 Thread Jessica Yu
+++ Johan Hovold [27/11/20 10:59 +0100]: On Wed, Nov 25, 2020 at 03:51:20PM +0100, Jessica Yu wrote: I've queued up patches 3, 4, 6, 7, 8 for testing before pushing them out to modules-next. Thanks, Jessica. Perhaps you can consider taking also the one for setup parameters (patch 5/8

Re: [PATCH 0/8] linker-section array fix and clean ups

2020-11-25 Thread Jessica Yu
+++ Johan Hovold [23/11/20 11:39 +0100]: On Fri, Nov 13, 2020 at 03:18:36PM +0100, Johan Hovold wrote: On Wed, Nov 11, 2020 at 04:47:16PM +0100, Jessica Yu wrote: > Thanks for providing the links and references. Your explanation and > this reply from Jakub [1] clarified things for

Re: Ubuntu mainline kernel builds now failing not able to find module.lds file

2020-11-25 Thread Jessica Yu
+++ Salvatore Bonaccorso [25/11/20 07:01 +0100]: Hi Steve, On Fri, Oct 30, 2020 at 12:43:24AM -0500, Steve French wrote: I typically build cifs.ko for testing using the latest Ubuntu mainline build - but building a module in the 5.10-rc1 kernel - while booted to the 5.10-rc1 ubuntu

Re: [PATCH v1 0/2] Add support to capture external module's SCM version

2020-11-24 Thread Jessica Yu
+++ William Mcvicker [23/11/20 14:13 -0800]: On Mon, Nov 23, 2020 at 09:02:57AM +, Christoph Hellwig wrote: On Sat, Nov 21, 2020 at 01:16:49AM +, Will McVicker wrote: > These two patches add module support to capture an external module's SCM > version as a MODULE_INFO() attribute. This

Re: [PATCH v4 bpf-next 4/5] bpf: load and verify kernel module BTFs

2020-11-13 Thread Jessica Yu
+++ Andrii Nakryiko [11/11/20 12:11 -0800]: On Wed, Nov 11, 2020 at 2:13 AM Jessica Yu wrote: +++ Andrii Nakryiko [09/11/20 17:19 -0800]: [snipped] >diff --git a/kernel/module.c b/kernel/module.c >index a4fa44a652a7..f2996b02ab2e 100644 >--- a/kernel/module.c >+++ b/kernel/module.

Re: [PATCH 0/8] linker-section array fix and clean ups

2020-11-11 Thread Jessica Yu
+++ Johan Hovold [06/11/20 17:45 +0100]: On Fri, Nov 06, 2020 at 05:03:45PM +0100, Jessica Yu wrote: +++ Johan Hovold [03/11/20 18:57 +0100]: >We rely on the linker to create arrays for a number of things including >kernel parameters and device-tree-match entries. > >The stride of

Re: [PATCH v4 bpf-next 4/5] bpf: load and verify kernel module BTFs

2020-11-11 Thread Jessica Yu
+++ Andrii Nakryiko [09/11/20 17:19 -0800]: [snipped] diff --git a/kernel/module.c b/kernel/module.c index a4fa44a652a7..f2996b02ab2e 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -380,6 +380,35 @@ static void *section_objs(const struct load_info *info, return (void

Re: [PATCH 0/2] module: add/fix 'kernel-doc' comments

2020-11-09 Thread Jessica Yu
+++ Sergey Shtylyov [04/11/20 23:33 +0300]: Here are 2 patches against the 'modules-next' branch of Jessica Yu's 'linux.git' repo. I'm cleaning up the 'kernel-doc' function comments... [1/2] module: fix up 'kernel-doc' comments [2/2] module: add more 'kernel-doc' comments Applied, thanks!

Re: [PATCH v2] module: fix comment style

2020-11-09 Thread Jessica Yu
+++ Sergey Shtylyov [07/11/20 23:20 +0300]: Many comments in this module do not comply with the preferred multi-line comment style as reported by 'scripts/checkpatch.pl': WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Fix those

Re: [PATCH 0/8] linker-section array fix and clean ups

2020-11-06 Thread Jessica Yu
+++ Johan Hovold [03/11/20 18:57 +0100]: We rely on the linker to create arrays for a number of things including kernel parameters and device-tree-match entries. The stride of these linker-section arrays obviously needs to match the expectations of the code accessing them or bad things will

Re: [PATCH v2 0/3] module: refactor module_sig_check()

2020-11-04 Thread Jessica Yu
+++ Sergey Shtylyov [31/10/20 23:05 +0300]: Here are 3 patches against the 'modules-next' branch of Jessica Yu's 'linux.git' repo. I'm doing some refactoring in module_sig_check()... [1/3] module: merge repetitive strings in module_sig_check() [2/3] module: avoid *goto*s in module_sig_check()

Re: [PATCH] module: set MODULE_STATE_GOING state when a module fails to load

2020-10-29 Thread Jessica Yu
+++ Miroslav Benes [29/10/20 13:31 +0100]: On Wed, 28 Oct 2020, Jessica Yu wrote: +++ Miroslav Benes [27/10/20 15:03 +0100]: >If a module fails to load due to an error in prepare_coming_module(), >the following error handling in load_module() runs with >MODULE_STATE_COMING in modul

Re: [PATCH] module: set MODULE_STATE_GOING state when a module fails to load

2020-10-28 Thread Jessica Yu
+++ Miroslav Benes [27/10/20 15:03 +0100]: If a module fails to load due to an error in prepare_coming_module(), the following error handling in load_module() runs with MODULE_STATE_COMING in module's state. Fix it by correctly setting MODULE_STATE_GOING under "bug_cleanup" label.

Re: [PATCH] module: use hidden visibility for weak symbol references

2020-10-28 Thread Jessica Yu
rget address from the associated > > GOT entry. > > > > Given that such GOT and PLT entries are unnecessary for fully linked > > binaries such as the kernel, let's give these weak symbol references > > hidden visibility, so that the linker knows that the weak reference

Re: [PATCH 0/2] module: some refactoring in module_sig_check()

2020-10-22 Thread Jessica Yu
+++ Sergey Shtylyov [13/10/20 23:32 +0300]: Here are 2 patches against the 'modules-next' branch of Jessica Yu's 'linux.git' repo. I'm doing some little refactoring in module_sig_check()... [1/2] module: merge repetitive strings in module_sig_check() [2/2] module: unindent comments in

[GIT PULL] Modules updates for v5.10

2020-10-22 Thread Jessica Yu
) Modules updates for v5.10 Summary of modules changes for the 5.10 merge window: - Code cleanups. More informative error messages and statically initialize init_free_wq to avoid a workqueue warning. Signed-off-by: Jessica Yu

Re: [PATCH] module: statically initialize init section freeing data

2020-10-12 Thread Jessica Yu
+++ Daniel Jordan [08/10/20 13:32 -0400]: Corentin hit the following workqueue warning when running with CRYPTO_MANAGER_EXTRA_TESTS: WARNING: CPU: 2 PID: 147 at kernel/workqueue.c:1473 __queue_work+0x3b8/0x3d0 Modules linked in: ghash_generic CPU: 2 PID: 147 Comm: modprobe Not tainted

Re: [PATCH v2] kbuild: preprocess module linker script

2020-09-19 Thread Jessica Yu
scripts/module.lds.S. scripts/module.lds is fine because 'make clean' keeps all the build artifacts under scripts/. You can add arch-specific sections in . Signed-off-by: Masahiro Yamada Tested-by: Jessica Yu Acked-by: Will Deacon Acked-by: Jessica Yu Thanks for working on this!

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-09-03 Thread Jessica Yu
) } } And with CONFIG_DYNAMIC_FTRACE=n as well: SECTIONS { .plt (NOLOAD) : { BYTE(0) } .init.plt (NOLOAD) : { BYTE(0) } } I will test on more arches in the next days but in the meantime you could add my Tested-by: Jessica Yu Thank you for working on this!

Re: [PATCH] module: Add more error message for failed kernel module loading

2020-09-02 Thread Jessica Yu
+++ Qu Wenruo [02/09/20 14:46 +0800]: When kernel module loading failed, user space only get one of the following error messages: - ENOEXEC This is the most confusing one. From corrupted ELF header to bad WRITE|EXEC flags check introduced by in module_enforce_rwx_sections() all returns this

[PATCH] arm64/module: set trampoline section flags regardless of CONFIG_DYNAMIC_FTRACE

2020-09-01 Thread Jessica Yu
Link: http://lore.kernel.org/r/20200831094651.GA16385@linux-8ccs Acked-by: Will Deacon Signed-off-by: Jessica Yu --- arch/arm64/kernel/module-plts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c index 0ce3a28e3347..2e

Re: [PATCH] module: Add more error message for failed kernel module loading

2020-09-01 Thread Jessica Yu
+++ Qu Wenruo [31/08/20 16:37 +0800]: When kernel module loading failed, user space only get one of the following error messages: - -ENOEXEC This is the most confusing one. From corrupted ELF header to bad WRITE|EXEC flags check introduced by in module_enforce_rwx_sections() all returns this

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-31 Thread Jessica Yu
+++ Ard Biesheuvel [31/08/20 16:25 +0300]: On Mon, 31 Aug 2020 at 13:43, Masahiro Yamada wrote: On Mon, Aug 31, 2020 at 6:47 PM Jessica Yu wrote: > > +++ Will Deacon [21/08/20 13:30 +0100]: > [snipped] > >> > > > So module_enforce_rwx_section

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-31 Thread Jessica Yu
+++ Will Deacon [21/08/20 13:30 +0100]: [snipped] > > > So module_enforce_rwx_sections() is already called after > > > module_frob_arch_sections() - which really baffled me at first, since > > > sh_type and sh_flags should have been set already in > > > module_frob_arch_sections(). > > > > > > I

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-24 Thread Jessica Yu
iesheuvel wrote: > > > On Thu, 13 Aug 2020 at 15:04, Jessica Yu wrote: > > > > > > > > +++ Ard Biesheuvel [13/08/20 10:36 +0200]: > > > > >On Wed, 12 Aug 2020 at 22:00, Peter Zijlstra wrote: > > > > >> > > > > >>

[GIT PULL] Modules updates for v5.9

2020-08-14 Thread Jessica Yu
rt symbols that are unused outside of module.c or otherwise used in only built-in code. Signed-off-by: Jessica Yu Christoph Hellwig (8): modules: mark ref_module static modules: mark find_symbol static modules: mark each_symb

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-13 Thread Jessica Yu
+++ Ard Biesheuvel [13/08/20 10:36 +0200]: On Wed, 12 Aug 2020 at 22:00, Peter Zijlstra wrote: On Wed, Aug 12, 2020 at 06:37:57PM +0200, Ard Biesheuvel wrote: > I know there is little we can do at this point, apart from ignoring > the permissions - perhaps we should just defer the w^x check

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-12 Thread Jessica Yu
+++ Szabolcs Nagy [12/08/20 15:15 +0100]: The 08/12/2020 13:56, Will Deacon wrote: On Wed, Aug 12, 2020 at 12:40:05PM +0200, pet...@infradead.org wrote: > On Wed, Aug 12, 2020 at 10:56:56AM +0200, Ard Biesheuvel wrote: > > The module .lds has BYTE(0) in the section contents to prevent the > >

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-12 Thread Jessica Yu
+++ pet...@infradead.org [12/08/20 12:40 +0200]: On Wed, Aug 12, 2020 at 10:56:56AM +0200, Ard Biesheuvel wrote: The module .lds has BYTE(0) in the section contents to prevent the linker from pruning them entirely. The (NOLOAD) is there to ensure that this byte does not end up in the .ko, which

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-11 Thread Jessica Yu
+++ Mauro Carvalho Chehab [11/08/20 17:27 +0200]: Em Tue, 11 Aug 2020 16:55:24 +0200 pet...@infradead.org escreveu: On Tue, Aug 11, 2020 at 04:34:27PM +0200, Mauro Carvalho Chehab wrote: > [33] .plt PROGBITS 0340 00035c80 >0001

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-10 Thread Jessica Yu
+++ Jessica Yu [10/08/20 11:25 +0200]: +++ Mauro Carvalho Chehab [08/08/20 10:12 +0200]: [snip] Right now, what happens is: # modprobe wlcore modprobe: ERROR: could not insert 'wlcore': Exec format error This seems to be failing for all modules, as doesn't show anything probed

Re: [PATCH v2] module: Harden STRICT_MODULE_RWX

2020-08-10 Thread Jessica Yu
+++ Mauro Carvalho Chehab [08/08/20 10:12 +0200]: [snip] Right now, what happens is: # modprobe wlcore modprobe: ERROR: could not insert 'wlcore': Exec format error This seems to be failing for all modules, as doesn't show anything probed. Btw, IMO, it would be useful to have

Re: [PATCH 1/2] module: Correctly truncate sysfs sections output

2020-08-07 Thread Jessica Yu
n attr into bin attribute") Cc: sta...@vger.kernel.org Cc: Jessica Yu Signed-off-by: Kees Cook Oof, thanks for fixing this! Acked-by: Jessica Yu --- kernel/module.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/kernel/module.c b/kernel/module.

Re: [PATCH v4 11/17] module: Call security_kernel_post_load_data()

2020-08-05 Thread Jessica Yu
+++ Kees Cook [29/07/20 10:58 -0700]: Now that there is an API for checking loaded contents for modules loaded without a file, call into the LSM hooks. Cc: Jessica Yu Signed-off-by: Kees Cook Acked-by: Jessica Yu

Re: [PATCH v4 00/10] Function Granular KASLR

2020-08-04 Thread Jessica Yu
+++ Joe Lawrence [03/08/20 14:17 -0400]: On 8/3/20 1:45 PM, Kees Cook wrote: On Mon, Aug 03, 2020 at 02:39:32PM +0300, Evgenii Shatokhin wrote: There are at least 2 places where high-order memory allocations might happen during module loading. Such allocations may fail if memory is fragmented,

Re: [PATCH 8/8] modules: inherit TAINT_PROPRIETARY_MODULE

2020-07-31 Thread Jessica Yu
+++ Christoph Hellwig [31/07/20 11:00 +0200]: On Fri, Jul 31, 2020 at 10:51:30AM +0200, Jessica Yu wrote: + if (mod->using_gplonly_symbols) { + pr_info("%s: module using GPL-only symbols uses symbols from proprietary module %s.\n", + mod

Re: [PATCH 8/8] modules: inherit TAINT_PROPRIETARY_MODULE

2020-07-31 Thread Jessica Yu
+++ Christoph Hellwig [30/07/20 18:29 +0200]: On Thu, Jul 30, 2020 at 04:12:32PM +0200, Jessica Yu wrote: + if (owner && test_bit(TAINT_PROPRIETARY_MODULE, >taints)) { + if (mod->using_gplonly_symbols) { + sym = NULL; +

Re: [PATCH 8/8] modules: inherit TAINT_PROPRIETARY_MODULE

2020-07-30 Thread Jessica Yu
+++ Christoph Hellwig [30/07/20 08:10 +0200]: If a TAINT_PROPRIETARY_MODULE exports symbol, inherit the taint flag for all modules importing these symbols, and don't allow loading symbols from TAINT_PROPRIETARY_MODULE modules if the module previously imported gplonly symbols. Add a

Re: [PATCH 6/7] modules: return licensing information from find_symbol

2020-07-29 Thread Jessica Yu
+++ Christoph Hellwig [29/07/20 08:27 +0200]: Report the GPLONLY status through a new argument. Signed-off-by: Christoph Hellwig --- include/linux/module.h | 2 +- kernel/module.c| 16 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 2/7] modules: mark find_symbol static

2020-07-29 Thread Jessica Yu
+++ Christoph Hellwig [29/07/20 08:27 +0200]: find_symbol is only used in module.c. Signed-off-by: Christoph Hellwig CCing the livepatching ML, as this may or may not impact its users. AFAIK, the out-of-tree kpatch module had used find_symbol() in the past, I am not sure what its current

Re: [PATCH v4 10/10] module: Reorder functions

2020-07-28 Thread Jessica Yu
-by: Jessica Yu Tested-by: Jessica Yu Thank you! Jessica

Re: [PATCH] modules: linux/moduleparam.h: drop duplicated word in a comment

2020-07-20 Thread Jessica Yu
+++ Randy Dunlap [17/07/20 16:36 -0700]: From: Randy Dunlap Drop the doubled word "the" in a comment. Signed-off-by: Randy Dunlap Cc: Jessica Yu --- include/linux/moduleparam.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20200714.orig/include/linux/mod

Re: [PATCH 3/5] module: Do not expose section addresses to non-CAP_SYSLOG

2020-07-08 Thread Jessica Yu
r consistency. Cc: sta...@vger.kernel.org Reported-by: Dominik Czarnota Fixes: be71eda5383f ("module: Fix display of wrong module .text address") Signed-off-by: Kees Cook Tested-by: Jessica Yu Acked-by: Jessica Yu

Re: [PATCH 2/5] module: Refactor section attr into bin attribute

2020-07-08 Thread Jessica Yu
. Cc: sta...@vger.kernel.org Signed-off-by: Kees Cook Hi Kees, This looks good to me: Tested-by: Jessica Yu Acked-by: Jessica Yu Thanks!

Re: [PATCH] kernel/module: add name size info to pr_debug() calls

2020-06-30 Thread Jessica Yu
+++ Jim Cromie [11/06/20 08:20 -0600]: when booted with arg: module.dyndbg=+p dmesg gets volumes of info about loaded modules. This adds module & symbol names, and sizes where pertinent. Now I can know which module's info Im looking at. Hi, Could you please fix the changelog formatting

Re: [GIT PULL] Modules updates for v5.8

2020-06-06 Thread Jessica Yu
+++ Linus Torvalds [05/06/20 13:38 -0700]: On Fri, Jun 5, 2020 at 2:34 AM Jessica Yu wrote: Please pull below to receive modules updates for the v5.8 merge window. Done. Considering the confusion this merge window with the dependencies of trees with each other, can you verify that what I

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

2020-06-05 Thread Jessica Yu
+++ Guenter Roeck [05/06/20 06:24 -0700]: On Wed, Apr 29, 2020 at 10:24:53AM -0500, Josh Poimboeuf wrote: Now that module_enable_ro() has no more external users, make it static again. Suggested-by: Jessica Yu Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Apparently this patch

Re: unable to compile after "module: Make module_enable_ro() static again"

2020-06-05 Thread Jessica Yu
+++ Anatoly Pugachev [05/06/20 13:21 +0300]: Hello! i'm unable to compile kernel on debian sid/unstable (tested on sparc64 and ppc64) after commit e6eff4376e2897c2e14b70d87bf7284cdb093830 There are some module changes that still need to be merged that should fix this issue. Please wait until

Re: [PATCH] kernel/modules: fix build without ARCH_HAS_STRICT_MODULE_RWX

2020-06-05 Thread Jessica Yu
+++ Miroslav Benes [05/06/20 09:50 +0200]: Hi, On Thu, 4 Jun 2020, Max Filippov wrote: On configurations with CONFIG_ARCH_HAS_STRICT_MODULE_RWX disabled kernel build fails with the following message: kernel/module.c:3593:2: error: implicit declaration of function ‘module_enable_ro’; Add

  1   2   3   4   5   6   7   8   9   10   >