Re: [PATCH v5 2/2] ARM: module: Fix function kallsyms on Thumb-2

2018-12-06 Thread Jessica Yu
+++ Vincent Whitchurch [04/12/18 15:14 +0100]: Thumb-2 functions have the lowest bit set in the symbol value in the symtab. When kallsyms are generated for the vmlinux, the kallsyms are generated from the output of nm, and nm clears the lowest bit. $ arm-linux-gnueabihf-readelf -a vmlinux |

Re: [PATCH v2] module: make it clearer when we're handling kallsyms symbols vs exported symbols

2018-11-29 Thread Jessica Yu
+++ Miroslav Benes [29/11/18 09:18 +0100]: On Fri, 23 Nov 2018, Jessica Yu wrote: The module loader internally works with both exported symbols represented as struct kernel_symbol, as well as Elf symbols from a module's symbol table. It's hard to distinguish sometimes which type of symbol

Re: [PATCH] module: remove some duplicated includes

2018-11-27 Thread Jessica Yu
+++ Yangtao Li [26/11/18 09:21 -0500]: We include elf.h twice in module.c. It's unnecessary. hence just remove them. Signed-off-by: Yangtao Li --- kernel/module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index 49a405891587..438641fc4096 100644 ---

Re: [PATCH v9 RESEND 0/4] KASLR feature to randomize each loadable module

2018-11-26 Thread Jessica Yu
+++ Rick Edgecombe [20/11/18 15:23 -0800]: Resending this because I missed Jessica in the "to" list. Also removing the part of this coverletter that talked about KPTI helping with some local kernel text de-randomizing methods, because I'm not sure I fully understand this.

[PATCH v2] module: make it clearer when we're handling kallsyms symbols vs exported symbols

2018-11-23 Thread Jessica Yu
handling. This change only affects static functions internal to the module loader. Signed-off-by: Jessica Yu --- v2: renamed kallsyms_find_* funcs to find_kallsyms_* to follow the already existing _ naming convention in module.c kernel/module.c | 78

Re: [PATCH 1/2] module: Overwrite st_size instead of st_info

2018-11-22 Thread Jessica Yu
+++ Vincent Whitchurch [22/11/18 13:24 +0100]: On Thu, Nov 22, 2018 at 12:01:54PM +, Dave Martin wrote: On Mon, Nov 19, 2018 at 05:25:12PM +0100, Vincent Whitchurch wrote: > st_info is currently overwritten after relocation and used to store the > elf_type(). However, we're going to need

Re: [PATCH] module: make it clearer when we're handling kallsyms symbols vs exported symbols

2018-11-22 Thread Jessica Yu
+++ Miroslav Benes [22/11/18 11:19 +0100]: On Wed, 21 Nov 2018, Jessica Yu wrote: The module loader internally works with both exported symbols represented as struct kernel_symbol, as well as Elf symbols from a module's symbol table. It's hard to distinguish sometimes which type of symbol

[PATCH] module: make it clearer when we're handling kallsyms symbols vs exported symbols

2018-11-21 Thread Jessica Yu
handling. This change only affects static functions internal to the module loader. Signed-off-by: Jessica Yu --- kernel/module.c | 78 - 1 file changed, 44 insertions(+), 34 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index

Re: [PATCH v2] ARM: module: Fix function kallsyms on Thumb-2

2018-11-14 Thread Jessica Yu
+++ Vincent Whitchurch [09/11/18 14:53 +0100]: On Fri, Nov 02, 2018 at 02:53:22PM +0100, Jessica Yu wrote: +++ Vincent Whitchurch [01/11/18 16:29 +0100]: > On Wed, Oct 31, 2018 at 04:53:41PM +0100, Jessica Yu wrote: > > Could this be done in modpost? I'm guessing the answer is n

Re: [PATCH v3] ARM: module: Fix function kallsyms on Thumb-2

2018-11-14 Thread Jessica Yu
+++ Dave Martin [13/11/18 13:57 +]: On Tue, Nov 13, 2018 at 12:27:45PM +0100, Vincent Whitchurch wrote: Thumb-2 functions have the lowest bit set in the symbol value in the symtab. When kallsyms are generated for the vmlinux, the kallsyms are generated from the output of nm, and nm clears

Re: [PATCH tip/core/rcu 24/41] modules: Replace synchronize_sched() and call_rcu_sched()

2018-11-12 Thread Jessica Yu
therefore makes these changes. Signed-off-by: Paul E. McKenney Cc: Jessica Yu Acked-by: Jessica Yu Thanks! --- kernel/module.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 49a405891587..99b46c32d579 100644 --- a/kernel

Re: [PATCH v2] modsign: use all trusted keys to verify module signature

2018-11-07 Thread Jessica Yu
+++ Ke Wu [06/11/18 15:23 -0800]: Thanks for the comment! I switched to use VERIFY_USE_SECONDARY_KEYRING, please take a look. Patch has been queued on modules-next. Thanks! Jessica On Tue, Nov 6, 2018 at 3:21 PM Ke Wu wrote: Make mod_verify_sig to use all trusted keys. This allows keys

Re: [PATCH] modsign: use all trusted keys to verify module signature

2018-11-06 Thread Jessica Yu
+++ Ke Wu [22/10/18 15:26 -0700]: Make mod_verify_sig to use all trusted keys. This allows keys in secondary_trusted_keys to be used to verify PKCS#7 signature on a kernel module. Signed-off-by: Ke Wu --- kernel/module_signing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2] arm64/module: use plt section indices for relocations

2018-11-05 Thread Jessica Yu
+++ Will Deacon [05/11/18 19:26 +]: On Mon, Nov 05, 2018 at 07:53:23PM +0100, Jessica Yu wrote: Instead of saving a pointer to the .plt and .init.plt sections to apply plt-based relocations, save and use their section indices instead. The mod->arch.{core,init}.plt pointers were problema

[PATCH v2] arm64/module: use plt section indices for relocations

2018-11-05 Thread Jessica Yu
allows livepatch modules on arm64 to pass in their own copy of the section headers to apply_relocate_add() to apply delayed relocations. Signed-off-by: Jessica Yu --- v2: - Do sechdrs[pltsec->plt_shndx].sh_addr instead of pointer math Note: Addressed Will's comment about the pltsec -> plt

[PATCH] arm64/module: use plt section indices for relocations

2018-11-05 Thread Jessica Yu
allows livepatch modules on arm64 to pass in their own copy of the section headers to apply_relocate_add() to apply delayed relocations. Signed-off-by: Jessica Yu --- Note: Addressed Will's comment about the pltsec -> plt_info rename and removed that change to reduce unnecessary c

Re: [PATCH v2] ARM: module: Fix function kallsyms on Thumb-2

2018-11-02 Thread Jessica Yu
+++ Vincent Whitchurch [01/11/18 16:29 +0100]: On Wed, Oct 31, 2018 at 04:53:41PM +0100, Jessica Yu wrote: Could this be done in modpost? I'm guessing the answer is no as some relocations may rely on that bit being set in st_value, right? Therefore we can only clear the bit _after_ relocations

Re: [PATCH v2] ARM: module: Fix function kallsyms on Thumb-2

2018-10-31 Thread Jessica Yu
+++ Vincent Whitchurch [31/10/18 09:42 +0100]: Thumb-2 functions have the lowest bit set in the symbol value in the symtab. When kallsyms are generated for the vmlinux, the kallsyms are generated from the output of nm, and nm clears the lowest bit. $ arm-linux-gnueabihf-readelf -a vmlinux |

Re: [PATCH] modsign: use all trusted keys to verify module signature

2018-10-31 Thread Jessica Yu
+++ Ke Wu [22/10/18 15:26 -0700]: Make mod_verify_sig to use all trusted keys. This allows keys in secondary_trusted_keys to be used to verify PKCS#7 signature on a kernel module. Signed-off-by: Ke Wu Thanks for the ping, I had missed this patch. David, could I get an ACK please? Thanks!

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-30 Thread Jessica Yu
+++ Will Deacon [29/10/18 15:28 +]: Hi Jessica, On Fri, Oct 26, 2018 at 07:25:01PM +0200, Jessica Yu wrote: The arm64 module loader keeps a pointer into info->sechdrs to keep track of section header information for .plt section(s). A pointer to the relevent section header (str

Re: [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-29 Thread Jessica Yu
+++ Miroslav Benes [29/10/18 14:24 +0100]: diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c index dd23655fda3a..490e56070a7e 100644 --- a/arch/arm64/kernel/module.c +++ b/arch/arm64/kernel/module.c @@ -461,5 +461,15 @@ int module_finalize(const Elf_Ehdr *hdr, #endif

[PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules

2018-10-26 Thread Jessica Yu
r in mod->klp_info so that they can call apply_relocate_add() even after module load. Signed-off-by: Jessica Yu --- v2: - fix missing free_module_elf() in error path - move copy_module_elf() and module_finalize() out of post_relocation() to make error handling more clear - add braces t

Re: [PATCH] arm64/module: use mod->klp_info section header information

2018-10-25 Thread Jessica Yu
+++ Miroslav Benes [25/10/18 11:00 +0200]: On Thu, 25 Oct 2018, Petr Mladek wrote: On Tue 2018-10-23 19:55:54, Jessica Yu wrote: > The arm64 module loader keeps a pointer into info->sechdrs to keep track > of section header information for .plt section(s). A pointer to the > rele

Re: [PATCH RFC v3 0/3] Rlimit for module space

2018-10-24 Thread Jessica Yu
+++ Ard Biesheuvel [23/10/18 08:54 -0300]: On 22 October 2018 at 20:06, Edgecombe, Rick P wrote: On Sat, 2018-10-20 at 19:20 +0200, Ard Biesheuvel wrote: Hi Rick, On 19 October 2018 at 22:47, Rick Edgecombe wrote: > If BPF JIT is on, there is no effective limit to prevent filling the entire

[PATCH] arm64/module: use mod->klp_info section header information

2018-10-23 Thread Jessica Yu
r in mod->klp_info so that they can call apply_relocate_add() even after module load. Signed-off-by: Jessica Yu --- Hi! This patch may be applied on top or merged with the 3rd patch. I incoporated Miroslav's suggestions from the discussion. It's needed in order for livepatch modules on

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-19 Thread Jessica Yu
+++ Miroslav Benes [19/10/18 13:59 +0200]: On Thu, 18 Oct 2018, Jessica Yu wrote: +++ Miroslav Benes [17/10/18 15:39 +0200]: >On Mon, 1 Oct 2018, Torsten Duwe wrote: > >Ad relocations. I checked that everything in struct mod_arch_specific >stays after the module is load. Both core

Re: [PATCH v3 3/4] arm64: implement live patching

2018-10-18 Thread Jessica Yu
+++ Miroslav Benes [17/10/18 15:39 +0200]: On Mon, 1 Oct 2018, Torsten Duwe wrote: Based on ftrace with regs, do the usual thing. Also allocate a task flag for whatever consistency handling will be used. Watch out for interactions with the graph tracer. Similar to what Mark wrote about 2/4,

Re: [PATCH for 4.19] tracepoint: Fix: tracepoint array element size mismatch

2018-10-15 Thread Jessica Yu
Rostedt (VMware) Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Bjorn Helgaas Cc: Catalin Marinas Cc: James Morris Cc: James Morris Cc: Jessica Yu Cc: Josh Poimboeuf Cc: Kees Cook Cc: Nicolas Pitre Cc: Paul Mackerras Cc: Petr Mladek Cc: Russell King Cc: "Serge

Re: [PATCH for 4.19] tracepoint: Fix: out-of-bound tracepoint array iteration

2018-10-15 Thread Jessica Yu
hael Ellerman Cc: Ingo Molnar Cc: Steven Rostedt (VMware) Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Bjorn Helgaas Cc: Catalin Marinas Cc: James Morris Cc: James Morris Cc: Jessica Yu Cc: Josh Poimboeuf Cc: Kees Cook Cc: Nicolas Pitre Cc: Paul Mackerras Cc: P

Re: [PATCH v2 4/7] arm64/modules: Add rlimit checking for arm64 modules

2018-10-12 Thread Jessica Yu
+++ Dave Hansen [11/10/18 16:47 -0700]: On 10/11/2018 04:31 PM, Rick Edgecombe wrote: + if (check_inc_mod_rlimit(size)) + return NULL; + p = __vmalloc_node_range(size, MODULE_ALIGN, module_alloc_base, module_alloc_base + MODULES_VSIZE,

[GIT PULL] Modules updates for v4.19

2018-08-17 Thread Jessica Yu
these symbols - Some code cleanups and minor reshuffling in load_module() were done to log the module name when module signature verification fails Signed-off-by: Jessica Yu Arnd Bergmann (1): ARM: module: fix modsign build error

Re: [PATCH] kernel/module: Use kmemdup to replace kmalloc+memcpy

2018-08-02 Thread Jessica Yu
+++ zhong jiang [01/08/18 00:56 +0800]: we prefer to the kmemdup rather than kmalloc+memcpy. so just replace them. Signed-off-by: zhong jiang Applied, thanks. Jessica --- kernel/module.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/module.c

Re: [PATCH 2/6] module: add support for symbol namespaces.

2018-07-25 Thread Jessica Yu
+++ Martijn Coenen [24/07/18 09:56 +0200]: I did find an issue with my approach: On Mon, Jul 16, 2018 at 2:21 PM, Martijn Coenen wrote: The ELF symbols are renamed to include the namespace with an asm label; for example, symbol 'usb_stor_suspend' in namespace USB_STORAGE becomes

Re: [PATCH] ARM: module: fix modsign build error

2018-07-09 Thread Jessica Yu
+++ Russell King - ARM Linux [06/07/18 14:00 +0100]: On Fri, Jul 06, 2018 at 02:48:47PM +0200, Arnd Bergmann wrote: The asm/module.h header file can not be included standalone, which breaks the module signing code after a recent change: In file included from kernel/module-internal.h:13,

Re: [PATCH v2 8/8] jump_table: move entries into ro_after_init region

2018-07-03 Thread Jessica Yu
, these data structures are never modified. So let's move them into the ro_after_init section, to prevent them from being corrupted inadvertently by buggy code, or deliberately by an attacker. Signed-off-by: Ard Biesheuvel For module parts: Acked-by: Jessica Yu --- arch/arm/kernel/vmlinux

[PATCH v2] modsign: log module name in the event of an error

2018-07-02 Thread Jessica Yu
off-by: Jessica Yu --- v2: - remove _modlen argument and just use the passed info struct kernel/module-internal.h | 25 - kernel/module.c | 22 +- kernel/module_signing.c | 12 +++- 3 files changed, 32 insertions(+), 27 deletions(-) d

Re: [PATCH] modsign: log module name in the event of an error

2018-07-01 Thread Jessica Yu
+++ Joe Perches [29/06/18 21:04 -0700]: On Fri, 2018-06-29 at 17:53 +0200, Jessica Yu wrote: Now that we have the load_info struct all initialized (including info->name, which contains the name of the module) before module_sig_check(), make the load_info struct and hence module name availa

[PATCH] modsign: log module name in the event of an error

2018-06-29 Thread Jessica Yu
off-by: Jessica Yu --- kernel/module-internal.h | 26 +- kernel/module.c | 22 +- kernel/module_signing.c | 9 ++--- 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/kernel/module-internal.h b/kernel/module-internal.h in

Re: [PATCH] module: replace VMLINUX_SYMBOL_STR() with __stringify() or string literal

2018-06-25 Thread Jessica Yu
+++ Masahiro Yamada [24/06/18 00:37 +0900]: With the special case handling for Blackfin and Metag was removed by commit 94e58e0ac312 ("export.h: remove code for prefixing symbols with underscore"), VMLINUX_SYMBOL_STR() is now equivalent to __stringify(). Replace the remaining usages to prepare

Re: [PATCH] module: print sensible error code

2018-06-25 Thread Jessica Yu
+++ Jason A. Donenfeld [22/06/18 17:38 +0200]: Printing "err 0" to the user in the warning message is not particularly useful, especially when this gets transformed into a -ENOENT for the remainder of the call chain. Signed-off-by: Jason A. Donenfeld Applied, thanks. Jessica ---

Re: [PATCH 3/3] modsign: print module name along with error message

2018-06-22 Thread Jessica Yu
+++ Jessica Yu [30/05/18 11:08 +0200]: It is useful to know which module failed signature verification, so print the module name along with the error message. Signed-off-by: Jessica Yu --- kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module.c b

[GIT PULL] modules for v4.18

2018-06-14 Thread Jessica Yu
and also allow sig_enforce param to be shown in sysfs with CONFIG_MODULE_SIG_FORCE Signed-off-by: Jessica Yu Jia Zhang (2): module: Do not access sig_enforce directly module: Allow to always show the status of modsign

Re: [PATCH v2] module: Implement sig_unenforce parameter

2018-06-13 Thread Jessica Yu
+++ Brett T. Warden [06/06/18 12:44 -0700]: When CONFIG_MODULE_SIG_FORCE is enabled, also provide a boot-time-only parameter, module.sig_unenforce, to disable signature enforcement. This allows distributions to ship with signature verification enforcement enabled by default, but for users to

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

2018-06-11 Thread Jessica Yu
in 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

[PATCH] module: exclude SHN_UNDEF symbols from kallsyms api

2018-06-05 Thread Jessica Yu
really just affect livepatch modules. Note that this patch doesn't affect the display of undefined symbols in /proc/kallsyms. Reported-by: Josh Poimboeuf Tested-by: Josh Poimboeuf Signed-off-by: Jessica Yu --- kernel/module.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] module: exclude SHN_UNDEF symbols from kallsyms api

2018-06-05 Thread Jessica Yu
+++ Josh Poimboeuf [04/06/18 18:02 -0500]: On Mon, Jun 04, 2018 at 05:56:05PM -0500, Josh Poimboeuf wrote: On Mon, Jun 04, 2018 at 09:54:12AM -0500, Josh Poimboeuf wrote: > On Mon, Jun 04, 2018 at 04:05:11PM +0200, Jessica Yu wrote: > > +++ Josh Poimboeuf [04/06/18 08:16 -0500]: >

Re: [PATCH] module: exclude SHN_UNDEF symbols from kallsyms api

2018-06-04 Thread Jessica Yu
+++ Josh Poimboeuf [04/06/18 08:16 -0500]: On Mon, Jun 04, 2018 at 03:01:31PM +0200, Jessica Yu wrote: +++ Jessica Yu [04/06/18 11:54 +0200]: > +++ Jessica Yu [04/06/18 10:05 +0200]: > > +++ Josh Poimboeuf [02/06/18 12:32 -0500]: > > > Hi Jessica, > > > > > &

[PATCH] module: exclude SHN_UNDEF symbols from kallsyms api

2018-06-04 Thread Jessica Yu
+++ Jessica Yu [04/06/18 11:54 +0200]: +++ Jessica Yu [04/06/18 10:05 +0200]: +++ Josh Poimboeuf [02/06/18 12:32 -0500]: Hi Jessica, I found a bug: [root@f25 ~]# modprobe livepatch-sample [root@f25 ~]# grep ' u ' /proc/kallsyms 81161080 u klp_enable_patch [livepatch_sample

Re: /proc/kallsyms shows undefined symbols for livepatch modules

2018-06-04 Thread Jessica Yu
+++ Jessica Yu [04/06/18 10:05 +0200]: +++ Josh Poimboeuf [02/06/18 12:32 -0500]: Hi Jessica, I found a bug: [root@f25 ~]# modprobe livepatch-sample [root@f25 ~]# grep ' u ' /proc/kallsyms 81161080 u klp_enable_patch [livepatch_sample] 81a01800 u __fentry__

Re: /proc/kallsyms shows undefined symbols for livepatch modules

2018-06-04 Thread Jessica Yu
+++ Josh Poimboeuf [02/06/18 12:32 -0500]: Hi Jessica, I found a bug: [root@f25 ~]# modprobe livepatch-sample [root@f25 ~]# grep ' u ' /proc/kallsyms 81161080 u klp_enable_patch[livepatch_sample] 81a01800 u __fentry__ [livepatch_sample] 81161250 u

[PATCH 3/3] modsign: print module name along with error message

2018-05-30 Thread Jessica Yu
It is useful to know which module failed signature verification, so print the module name along with the error message. Signed-off-by: Jessica Yu --- kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index ae824a6f1a03

[PATCH 1/3] module: make it clear when we're handling the module copy in info->hdr

2018-05-30 Thread Jessica Yu
ndling the temporary copy makes that explicitly clear. Signed-off-by: Jessica Yu --- kernel/module.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 9c1709a05037..e8eba00bfed7 100644 --- a/kernel/mo

[PATCH 2/3] module: setup load info before module_sig_check()

2018-05-30 Thread Jessica Yu
and split up the operations done in layout_and_allocate(), setup_load_info(), and rewrite_section_headers() more cleanly so these functions only perform what their names suggest. Signed-off-by: Jessica Yu --- kernel/module.c | 77 - 1 file

[PATCH 0/3] lockdown/module: make module name available for module_sig_check()

2018-05-30 Thread Jessica Yu
=lockdown But my plan is probably to take patches 1 and 2 through the modules-next tree as they are generic cleanups, but I wanted to give you a heads up for patch 3, which should probably be taken through the lockdown tree. Thanks! Jessica --- Jessica Yu (3): module: make it clear when we're handling

Re: [PATCH 01/18] kernel: Use pr_fmt

2018-05-13 Thread Jessica Yu
t;j...@perches.com> Acked-by: Jessica Yu <j...@kernel.org> (for module.c) --- kernel/acct.c | 2 ++ kernel/async.c | 14 ++-- kernel/audit_tree.c| 2 +- kernel/backtracetest.c | 8 +++ kernel/crash_core.c| 29 ++--- kernel/exit.c

[GIT PULL] modules fix for v4.17-rc3

2018-04-27 Thread Jessica Yu
- Fix display of module section addresses in sysfs, which were getting hashed with %pK and breaking tools like perf. Signed-off-by: Jessica Yu <j...@kernel.org> Thomas Richter (1): module: Fix display of wrong module .text a

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: [PATCH v3] module: Fix display of wrong module .text address

2018-04-18 Thread Jessica Yu
/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 ("vsprintf: don'

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:

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

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

Re: [PATCH v3 0/3][RESEND] modsign enhancement

2018-03-27 Thread Jessica Yu
+++ Jia Zhang [24/03/18 10:59 +0800]: This patch series allows to disable module validity enforcement in runtime through the control switch located in securityfs. In order to keep /sys/module/module/parameters/sig_enforce simple, the disablement switch is located at

[GIT PULL] Modules fix for 4.16-rc7

2018-03-22 Thread Jessica Yu
() had failed. Signed-off-by: Jessica Yu <j...@kernel.org> Leon Yu (1): module: propagate error in modules_open() kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v2 0/4] modsign enhancement

2018-03-12 Thread Jessica Yu
+++ Jia Zhang [08/03/18 12:26 +0800]: This patch series allows to disable module validity enforcement in runtime through /sys/kernel/security/modsign/enforce interface. Assuming CONFIG_MODULE_SIG_FORCE=y, here are the instructions to disable the validity enforcement. # cat

Re: linux-next: Signed-off-by missing for commit in the modules tree

2018-03-08 Thread Jessica Yu
+++ Stephen Rothwell [09/03/18 07:54 +1100]: Hi Jessica, Commit 934ccf7248dd ("module: propagate error in modules_open()") is missing a Signed-off-by from its committer. Whoops, thanks for catching that. Should be fixed now. Jessica

Re: [PATCH resend] module: propagate error in modules_open()

2018-03-08 Thread Jessica Yu
deo+0x37/0xd0 proc_reg_release+0x5d/0x60 __fput+0x9d/0x1d0 fput+0x9/0x10 task_work_run+0x75/0x90 do_exit+0x252/0xa00 do_group_exit+0x36/0xb0 SyS_exit_group+0xf/0x10 Fixes: 516fb7f2e73d ("/proc/module: use the same logic as /proc/kallsyms for address exposure") Cc: Jessica Yu <j..

Re: [PATCH 3/4] module: Support to show the current enforcement policy

2018-03-07 Thread Jessica Yu
+++ Jia Zhang [01/03/18 17:09 +0800]: /sys/kernel/security/modsign/enforce gives the result of current enforcement policy of loading module. Signed-off-by: Jia Zhang Why is this being added as part of securityfs? AFAIK that's primarily used by LSMs. And we

Re: [PATCH] Make kernel taint on invalid module signatures configurable

2018-02-20 Thread Jessica Yu
+++ Matthew Garrett [07/08/17 12:50 -0700]: The default kernel behaviour is for unsigned or invalidly signed modules to load without warning. Right now, If CONFIG_MODULE_SIG is enabled the kernel will be tainted in this case. Distributions may wish to enable CONFIG_MODULE_SIG in order to permit

Re: [PATCH] Make kernel taint on invalid module signatures configurable

2018-02-20 Thread Jessica Yu
+++ Matthew Garrett [20/02/18 20:37 +]: On Tue, Feb 20, 2018 at 11:21 AM Jessica Yu <j...@kernel.org> wrote: Ah, OK. So if I'm understanding correctly, you want to use the same kernel image/configuration but for two different use cases, one where the module signatures do not

Re: [PATCH] Make kernel taint on invalid module signatures configurable

2018-02-20 Thread Jessica Yu
+++ Matthew Garrett [15/02/18 19:36 +]: On Thu, Feb 15, 2018 at 7:25 AM Jessica Yu <j...@kernel.org> wrote: I'm still unclear on why a distro would enable CONFIG_MODULE_SIG and then _not_ want to know about unsigned modules. The same kernel image may be used in situations where t

[tip:perf/urgent] kprobes: Propagate error from arm_kprobe_ftrace()

2018-02-16 Thread tip-bot for Jessica Yu
Commit-ID: 12310e3437554328bcd75186cf331bc712cb30b2 Gitweb: https://git.kernel.org/tip/12310e3437554328bcd75186cf331bc712cb30b2 Author: Jessica Yu <j...@kernel.org> AuthorDate: Wed, 10 Jan 2018 00:51:23 +0100 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Fri, 16 Feb 2

[tip:perf/urgent] kprobes: Propagate error from disarm_kprobe_ftrace()

2018-02-16 Thread tip-bot for Jessica Yu
Commit-ID: 297f9233b53a08fd457815e19f1d6f2c3389857b Gitweb: https://git.kernel.org/tip/297f9233b53a08fd457815e19f1d6f2c3389857b Author: Jessica Yu <j...@kernel.org> AuthorDate: Wed, 10 Jan 2018 00:51:24 +0100 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Fri, 16 Feb 2

Re: [PATCH] Make kernel taint on invalid module signatures configurable

2018-02-15 Thread Jessica Yu
+++ Matthew Garrett [14/02/18 18:21 +]: Hi Jessica, Any objections to this patch? Thanks! Hi Matthew! My questions and comments from last year still apply here - http://lkml.kernel.org/r/20170829175647.ej5fqszss2mbpc5i@redbean I'm still unclear on why a distro would enable

[tip:perf/urgent] kprobes: Propagate error from disarm_kprobe_ftrace()

2018-02-13 Thread tip-bot for Jessica Yu
Commit-ID: cea1e51c8357feb0e98464a82e1ad3ca2d0382a6 Gitweb: https://git.kernel.org/tip/cea1e51c8357feb0e98464a82e1ad3ca2d0382a6 Author: Jessica Yu <j...@kernel.org> AuthorDate: Wed, 10 Jan 2018 00:51:24 +0100 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Tue, 13 Feb 2

[tip:perf/urgent] kprobes: Propagate error from arm_kprobe_ftrace()

2018-02-13 Thread tip-bot for Jessica Yu
Commit-ID: 384f1d86a8890fcf8118add0b6a0785ee35f5a65 Gitweb: https://git.kernel.org/tip/384f1d86a8890fcf8118add0b6a0785ee35f5a65 Author: Jessica Yu <j...@kernel.org> AuthorDate: Wed, 10 Jan 2018 00:51:23 +0100 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Tue, 13 Feb 2

[GIT PULL] modules updates for 4.16

2018-02-07 Thread Jessica Yu
: - Minor code cleanups and MAINTAINERS update Signed-off-by: Jessica Yu <j...@kernel.org> Luis de Bethencourt (1): modpost: Remove trailing semicolon Namit Gupta (1): ftrace/module: Move ftrace_relea

Re: [PATCH] Revert "module: Add retpoline tag to VERMAGIC"

2018-01-25 Thread Jessica Yu
+++ Andi Kleen [24/01/18 10:17 -0800]: On Wed, Jan 24, 2018 at 09:00:48AM -0800, Linus Torvalds wrote: On Wed, Jan 24, 2018 at 6:28 AM, Greg Kroah-Hartman wrote: > > Linus, if there are no objections, can you apply this revert to your > tree now so this doesn't get

Re: [PATCH] modpost: Remove trailing semicolon

2018-01-16 Thread Jessica Yu
+++ Luis de Bethencourt [16/01/18 13:21 +]: The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt Applied. Thanks, Jessica

Re: [PATCH v3] ftrace/module: Move ftrace_release_mod() to ddebug_cleanup label

2018-01-12 Thread Jessica Yu
+++ Namit Gupta [08/01/18 10:41 +0530]: ftrace_module_init happen after dynamic_debug_setup, it is desired that cleanup should be called after this label however in current implementation it is called in free module label,ie:even though ftrace in not initialized, from so many fail case

[PATCH v5 1/2] kprobes: propagate error from arm_kprobe_ftrace()

2018-01-09 Thread Jessica Yu
been paused since then and the patches were not upstreamed. Based-on-patches-by: Petr Mladek <pmla...@suse.com> Acked-by: Masami Hiramatsu <mhira...@kernel.org> Signed-off-by: Jessica Yu <j...@kernel.org> --- kernel/kprobes.c | 100 +

[PATCH v5 2/2] kprobes: propagate error from disarm_kprobe_ftrace()

2018-01-09 Thread Jessica Yu
; Signed-off-by: Jessica Yu <j...@kernel.org> --- kernel/kprobes.c | 78 ++-- 1 file changed, 53 insertions(+), 25 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index beda29641ed5..0951d6f0d59d 100644 --- a/kernel/kprobes.c +++

[PATCH v5 0/2] kprobes: improve error handling when arming/disarming kprobes

2018-01-09 Thread Jessica Yu
message in (dis)arm_all_kprobes() Changes from v1: - Don't arm the kprobe before adding it to the kprobe table, otherwise we'll temporarily see a stray breakpoint. - Remove kprobe from the kprobe_table and call synchronize_sched() if arming during register_kprobe() fails. - add Masami's ack on

[PATCH v4 1/2] kprobes: propagate error from arm_kprobe_ftrace()

2018-01-07 Thread Jessica Yu
been paused since then and the patches were not upstreamed. Based-on-patches-by: Petr Mladek <pmla...@suse.com> Signed-off-by: Jessica Yu <j...@kernel.org> --- kernel/kprobes.c | 96 +--- 1 file changed, 71 insertions(+), 25 deletions(-)

[PATCH v4 0/2] kprobes: improve error handling when arming/disarming kprobes

2018-01-07 Thread Jessica Yu
le and call synchronize_sched() if arming during register_kprobe() fails. - add Masami's ack on the 2nd patch (unchanged from v1) --- Jessica Yu (2): kprobes: propagate error from arm_kprobe_ftrace() kprobes: propagate error from disarm_kprobe_ftrace() kernel/kprobes.c | 174 +

[PATCH v4 2/2] kprobes: propagate error from disarm_kprobe_ftrace()

2018-01-07 Thread Jessica Yu
; Signed-off-by: Jessica Yu <j...@kernel.org> --- kernel/kprobes.c | 78 ++-- 1 file changed, 53 insertions(+), 25 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 21d88cebb29b..2792450b811e 100644 --- a/kernel/kprobes.c +++

Re: kprobes: propagate error from arm_kprobe_ftrace()

2018-01-03 Thread Jessica Yu
+++ Steven Rostedt [03/01/18 09:33 -0500]: On Wed, 3 Jan 2018 02:40:47 +0100 Jessica Yu <j...@kernel.org> wrote: Improve error handling when arming ftrace-based kprobes. Specifically, if we fail to arm a ftrace-based kprobe, register_kprobe()/enable_kprobe() should report an error i

[PATCH v3 1/2] kprobes: propagate error from arm_kprobe_ftrace()

2018-01-02 Thread Jessica Yu
been paused since then and the patches were not upstreamed. Based-on-patches-by: Petr Mladek <pmla...@suse.com> Signed-off-by: Jessica Yu <j...@kernel.org> --- kernel/kprobes.c | 94 +--- 1 file changed, 69 insertions(+), 25 deletions(-)

[PATCH v3 2/2] kprobes: propagate error from disarm_kprobe_ftrace()

2018-01-02 Thread Jessica Yu
; Signed-off-by: Jessica Yu <j...@kernel.org> --- kernel/kprobes.c | 76 +--- 1 file changed, 51 insertions(+), 25 deletions(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index ae6b6fe79de3..10b7139a141a 100644 --- a/kernel/kprobes.c +++

[PATCH v3 0/2] kprobes: improve error handling when arming/disarming kprobes

2018-01-02 Thread Jessica Yu
to the kprobe table, otherwise we'll temporarily see a stray breakpoint. - Remove kprobe from the kprobe_table and call synchronize_sched() if arming during register_kprobe() fails. - add Masami's ack on the 2nd patch (unchanged from v1) --- Jessica Yu (2): kprobes: propagate error from a

Re: ftrace/module: Move ftrace_release_mod to ddebug_cleanup label

2017-12-28 Thread Jessica Yu
+++ Steven Rostedt [28/12/17 19:57 -0500]: On Fri, 29 Dec 2017 01:36:48 +0100 Jessica Yu <j...@kernel.org> wrote: +++ Steven Rostedt [28/12/17 11:32 -0500]: > >Jessica, > >Can you take this patch. You can add: > >Reviewed-by: Steven Rostedt (VMware) <rost...@goodmi

Re: ftrace/module: Move ftrace_release_mod to ddebug_cleanup label

2017-12-28 Thread Jessica Yu
+++ Steven Rostedt [28/12/17 11:32 -0500]: Jessica, Can you take this patch. You can add: Reviewed-by: Steven Rostedt (VMware) Sure, thanks Steven. Namit, your patch does not apply cleanly to modules-next nor linux-next. It looks like you based your patch on an old

Re: module: avoid allocation if module is already present and ready

2017-12-18 Thread Jessica Yu
+++ Luis R. Rodriguez [07/12/17 16:15 -0800]: load_module() will allocate a struct module before even checking if the module is already loaded. This can create unecessary memory pressure since we can easily just check if the module is already present early with the copy of the module information

Re: module: add an early early_mod_check()

2017-12-18 Thread Jessica Yu
+++ Luis R. Rodriguez [07/12/17 16:15 -0800]: We technically do a bit of sanity check with a local struct module with pointers set to passed user data first. Only after we do these checks do we embark on allocating a struct module based on the passed information. There's a small set of early

Re: module: add debugging alias parsing support

2017-12-04 Thread Jessica Yu
+++ Djalal Harouni [04/12/17 10:01 +0100]: On Thu, Nov 30, 2017 at 7:39 PM, Luis R. Rodriguez <mcg...@kernel.org> wrote: On Thu, Nov 30, 2017 at 02:17:11PM +0100, Jessica Yu wrote: Just some quick questions - are there any plans to use these in-kernel module aliases anywhere else? Or a

Re: module: add debugging alias parsing support

2017-11-30 Thread Jessica Yu
+++ Luis R. Rodriguez [29/11/17 18:36 -0800]: Debugging modules can often lead to an alias question. We purposely don't have alias parsing support upstream as this is all dealt with in userpace with the assumption that in-kernel we just process aliases and userspace Does The Right Thing (TM)

Re: kprobes: propagate error from arm_kprobe_ftrace()

2017-11-21 Thread Jessica Yu
+++ Masami Hiramatsu [09/11/17 09:35 +0900]: On Tue, 7 Nov 2017 18:14:56 +0100 Jessica Yu <j...@kernel.org> wrote: +++ Steven Rostedt [03/11/17 10:03 -0400]: >On Thu, 2 Nov 2017 17:33:33 +0100 >Jessica Yu <j...@kernel.org> wrote: > >> Improve error handling when

[GIT PULL] modules updates for 4.15

2017-11-15 Thread Jessica Yu
code cleanups Signed-off-by: Jessica Yu <j...@kernel.org> Kees Cook (3): module: Prepare to convert all module_param_call() prototypes treewide: Fix function prototypes for module_param_call() module: Do not pape

Re: kprobes: propagate error from arm_kprobe_ftrace()

2017-11-07 Thread Jessica Yu
+++ Steven Rostedt [03/11/17 10:03 -0400]: On Thu, 2 Nov 2017 17:33:33 +0100 Jessica Yu <j...@kernel.org> wrote: Improve error handling when arming ftrace-based kprobes. Specifically, if we fail to arm a ftrace-based kprobe, register_kprobe()/enable_kprobe() should report an error i

Re: x86/module: Detect corrupt relocations against nonzero data

2017-11-03 Thread Jessica Yu
+++ Josh Poimboeuf [02/11/17 21:19 -0500]: On Thu, Nov 02, 2017 at 04:57:11PM -0500, Josh Poimboeuf wrote: There have been some cases where external tooling (e.g., kpatch-build) creates a corrupt relocation which targets the wrong address. This is a silent failure which can corrupt memory in

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

2017-11-02 Thread Jessica Yu
+++ Corey Minyard [02/11/17 11:40 -0500]: On 11/02/2017 09:27 AM, Jessica Yu wrote: +++ Corey Minyard [02/11/17 08:31 -0500]: On 11/01/2017 10:58 PM, Stephen Rothwell wrote: Hi Corey, Today's linux-next merge of the ipmi tree got a conflict in:   drivers/char/ipmi/ipmi_si_intf.c between

  1   2   3   4   5   >