Re: [PATCH] firmware: Fix security issue with request_firmware_into_buf()

2018-08-02 Thread Luis Chamberlain
On Wed, Aug 1, 2018, 4:26 PM Rishabh Bhatnagar wrote: > When calling request_firmware_into_buf() with the FW_OPT_NOCACHE flag > it is expected that firmware is loaded into buffer from memory. > But inside alloc_lookup_fw_priv every new firmware that is loaded is > added to the firmware cache (fwc

Re: [PATCH] firmware: Avoid caching firmware when FW_OPT_NOCACHE is set

2018-07-25 Thread Luis Chamberlain
On Thu, Jul 19, 2018 at 02:25:21PM -0700, Rishabh Bhatnagar wrote: > When calling request_firmware_into_buf(), we pass the FW_OPT_NOCACHE > flag with the intent of skipping the caching mechanism of the > firmware loader. Unfortunately, that doesn't work, because > alloc_lookup_fw_priv() isn't told

[PATCH] test_kmod: fix rmmod double free

2018-11-23 Thread Luis Chamberlain
We double free the misc device string twice on rmmod, fix this. Without this we cannot remove the module without crashing. Cc: # for v4.12 and up Reported-by: Randy Dunlap Signed-off-by: Luis Chamberlain --- lib/test_kmod.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib

Re: test_kmod: BUG on module removal

2018-11-23 Thread Luis Chamberlain
On Sat, Oct 13, 2018 at 10:59:46AM -0700, Randy Dunlap wrote: > 4.19-rc7, on x86_64: > > modprobe test_kmod; rmmod test_kmod > > [ 199.033143] calling test_kmod_init+0x0/0x1000 [test_kmod] @ 1704 > [ 199.034636] misc test_kmod0: interface ready > [ 199.035468] initcall test_kmod_init+0x0/0x10

Re: [PATCH] fs: Make /proc/sys inodes be owned by global root.

2018-11-26 Thread Luis Chamberlain
On Mon, Nov 26, 2018 at 06:26:07PM +0100, Radoslaw Burny wrote: > Due to a recent commit (d151ddc00498 - fs: Update i_[ug]id_(read|write) > to translate relative to s_user_ns), Recent? This is commit is from 2014 and present upstream since v4.8. And the commit ID you mentioned in your commit log s

Re: [PATCH v2 1/2] firmware: add nowarn variant of request_firmware_nowait()

2018-11-19 Thread Luis Chamberlain
On Mon, Nov 12, 2018 at 05:01:42PM +0100, Lucas Stach wrote: > Device drivers with optional firmware may still want to use the > asynchronous firmware loading interface. To avoid printing a > warining into the kernel log when the optional firmware is > absent, add a nowarn variant of this interface

Re: [PATCH v2] sysctl: kselftests: fix test_modprobe issue

2018-11-21 Thread Luis Chamberlain
On Thu, Sep 06, 2018 at 06:22:54PM +0800, Lei Yang wrote: > when CONFIG_TEST_SYSCTL=y, there is no "/sys/module/test_sysctl/" > when CONFIG_TEST_SYSCTL=m, checking /sys/module/test_sysctl/ is > before kernel module loading > > you'll get below error message > root@intel-x86-64:/tmp/sysctl# ./sysct

Re: [kconfig-sat] Re: [ANN] init-kconfig - easy way to embrace Linux's kconfig

2018-11-21 Thread Luis Chamberlain
On Fri, Oct 05, 2018 at 07:48:34PM +0900, Masahiro Yamada wrote: > Hi, > > > > On Fri, Oct 5, 2018 at 5:03 AM Luis Chamberlain wrote: > > > > Every now and then a project is born, and they decide to use Linux's > > kconfig to enable configuration o

Re: [PATCH] fs: Make /proc/sys inodes be owned by global root.

2018-11-29 Thread Luis Chamberlain
On Mon, Nov 26, 2018 at 11:29:40PM -0600, Eric W. Biederman wrote: > Luis Chamberlain writes: > > Thanks for the description of how to run into the issue described but > > is there also a practical use case today where this is happening? I ask > > as it would be good to kno

Re: [PATCH 2/2] selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config

2018-11-29 Thread Luis Chamberlain
On Mon, Nov 26, 2018 at 09:12:16PM -0600, Dan Rue wrote: > CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y is required for fw_fallback.sh. > Without it, fw_fallback.sh fails with 'usermode helper disabled so > ignoring test'. Enable the config in selftest so that it gets built by > default. > > Signed-off

Re: [PATCH 1/2] selftests: firmware: remove use of non-standard diff -Z option

2018-11-29 Thread Luis Chamberlain
On Mon, Nov 26, 2018 at 09:12:15PM -0600, Dan Rue wrote: > diff -Z is used to trim the trailing whitespace when comparing the > loaded firmware file with the source firmware file. However, per the > comment in the source code, -Z should not be necessary. In testing, the > input and output files are

Re: Re: Re: [PATCH] proc/sysctl: fix return error forproc_doulongvec_minmax

2018-12-05 Thread Luis Chamberlain
On Wed, Dec 05, 2018 at 03:10:07PM +0800, cheng.lin...@zte.com.cn wrote: > > On Mon, Dec 03, 2018 at 01:12:39PM +0800, cheng.lin...@zte.com.cn wrote: > > > >Cheng, thanks for the patch! > > > > > > > >On Fri, Nov 30, 2018 at 02:35:17PM +0800, Cheng Lin wrote: > > > >> If the number of input paramet

Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-12-06 Thread Luis Chamberlain
> /* > * Arrays are not supported, keep this simple. *Do not* add > * support for them. > */ > if (vleft != 1) { > *lenp = 0; > return -EINVAL; > } > ... > } > > So,

Re: [RFC v3 11/19] kunit: add Python libraries for handing KUnit config and kernel

2018-12-06 Thread Luis Chamberlain
On Thu, Dec 06, 2018 at 12:32:47PM +, Kieran Bingham wrote: > My main initial idea for a libumlinux is to provide infrastructure such > as our linked-lists and other kernel formatting so that we can take > kernel code directly to userspace for test and debug (assuming that > there are no hardwa

Re: [PATCH] fs: Make /proc/sys inodes be owned by global root.

2018-11-30 Thread Luis Chamberlain
On Fri, Nov 30, 2018 at 08:48:11AM -0600, Eric W. Biederman wrote: > Luis Chamberlain writes: > > > The logic seems sensible then, but are we implicating what a container > > does with its sysctl values onto the entire system? If so, sure, it > > seems you want this fo

Re: [RFC v3 06/19] arch: um: enable running kunit from User Mode Linux

2018-11-30 Thread Luis Chamberlain
On Fri, Nov 30, 2018 at 08:05:34AM -0600, Rob Herring wrote: > On Thu, Nov 29, 2018 at 9:37 PM Luis Chamberlain wrote: > > > > On Wed, Nov 28, 2018 at 03:26:03PM -0600, Rob Herring wrote: > > > On Wed, Nov 28, 2018 at 1:37 PM Brendan Higgins > > > wrote: >

Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-11-30 Thread Luis Chamberlain
Cheng, thanks for the patch! On Fri, Nov 30, 2018 at 02:35:17PM +0800, Cheng Lin wrote: > If the number of input parameters is less than the total > parameters, an INVAL error will be returned. Do you mean EINVAL? > This patch ensure no error returned in this condition, just > like other interfa

Re: Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-12-03 Thread Luis Chamberlain
On Mon, Dec 03, 2018 at 01:12:39PM +0800, cheng.lin...@zte.com.cn wrote: > >Cheng, thanks for the patch! > > > >On Fri, Nov 30, 2018 at 02:35:17PM +0800, Cheng Lin wrote: > >> If the number of input parameters is less than the total > >> parameters, an INVAL error will be returned. > > > >Do you me

Re: [PATCH 1/1] Preventive patch in the proc file-system to handle NULL check.

2018-08-16 Thread Luis Chamberlain
On Thu, Aug 16, 2018 at 03:04:13PM +0530, Srikanth K H wrote: > If the make directory for "sys" interface fail's then its > dereferenced without even checking for its validity which > will lead to crash, hence added preventive code to check > for NULL and accordingly dereference. > > Signed-off-by

Re: [driver-core PATCH v8 0/9] Add NUMA aware async_schedule calls

2018-12-10 Thread Luis Chamberlain
On Wed, Dec 05, 2018 at 09:25:13AM -0800, Alexander Duyck wrote: > This patch set provides functionality that will help to improve the > locality of the async_schedule calls used to provide deferred > initialization. > > This patch set originally started out focused on just the one call to > async

Re: [driver-core PATCH v8 0/9] Add NUMA aware async_schedule calls

2018-12-10 Thread Luis Chamberlain
On Mon, Dec 10, 2018 at 03:25:04PM -0800, Alexander Duyck wrote: > On Mon, 2018-12-10 at 11:22 -0800, Luis Chamberlain wrote: > > On Wed, Dec 05, 2018 at 09:25:13AM -0800, Alexander Duyck wrote: > > > This patch set provides functionality that will help to improve the >

Re: [PATCH] kernel/sysctl.c: remove duplicated include

2018-10-04 Thread Luis Chamberlain
#include > > #include > > -#include > > > > #include > > #include > > Reviewed-by: Richard Weinberger Acked-by: Luis Chamberlain Luis

[ANN] init-kconfig - easy way to embrace Linux's kconfig

2018-10-04 Thread Luis Chamberlain
Every now and then a project is born, and they decide to use Linux's kconfig to enable configuration of their project. As it stands we *know* kconfig is now used in at least over 12 different projects [0]. I myself added kconfig to one as well years ago. Even research reveals that kconfig has becom

Re: [kconfig-sat] [ANN] init-kconfig - easy way to embrace Linux's kconfig

2018-10-04 Thread Luis Chamberlain
On Thu, Oct 04, 2018 at 01:09:00PM -0700, Josh Triplett wrote: > On Thu, Oct 04, 2018 at 01:02:49PM -0700, Luis Chamberlain wrote: > > Every now and then a project is born, and they decide to use Linux's > > kconfig to enable configuration of their project. As it stands we *

Re: [kconfig-sat] [ANN] init-kconfig - easy way to embrace Linux's kconfig

2018-10-04 Thread Luis Chamberlain
On Thu, Oct 04, 2018 at 01:41:18PM -0700, Josh Triplett wrote: > I would *love* to see Kconfig in Linux evolved to be more easily reused. This *can* happen. Let me itemize a few things off of my head I think would need to be done as its at least fresh in my head now: All we need from scripts/Kbui

Re: [PATCH] kernel/module: improve documentation for try_module_get()

2023-12-21 Thread Luis Chamberlain
On Thu, Dec 21, 2023 at 05:58:47PM +0100, Marco Pagani wrote: > The sentence "this call will fail if the module is already being > removed" is potentially confusing and may contradict the rest of the > documentation. If one tries to get a module that has already been > removed using a stale pointer

Re: [PATCH 2/4] modules: Ensure 64-bit alignment on __ksymtab_* sections

2023-12-21 Thread Luis Chamberlain
On Wed, Nov 22, 2023 at 11:18:12PM +0100, del...@kernel.org wrote: > From: Helge Deller > > On 64-bit architectures without CONFIG_HAVE_ARCH_PREL32_RELOCATIONS > (e.g. ppc64, ppc64le, parisc, s390x,...) the __KSYM_REF() macro stores > 64-bit pointers into the __ksymtab* sections. > Make sure that

Re: [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries

2023-12-21 Thread Luis Chamberlain
On Fri, Dec 22, 2023 at 01:01:23AM +0900, Masahiro Yamada wrote: > On Thu, Dec 21, 2023 at 7:22 PM Masahiro Yamada wrote: > > > > On Thu, Nov 23, 2023 at 7:18 AM wrote: > > > > > > From: Helge Deller > > > > > > An alignment of 4 bytes is wrong for 64-bit platforms which don't define > > > CONFI

Re: [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries

2023-12-21 Thread Luis Chamberlain
On Thu, Dec 21, 2023 at 10:07:13PM -0800, Luis Chamberlain wrote: > > If we want to go bananas we could even get a graph of size of modules Sorry I meant size of number of symbols Vs cost. Luis

Re: [PATCH 2/4] modules: Ensure 64-bit alignment on __ksymtab_* sections

2023-12-22 Thread Luis Chamberlain
On Fri, Dec 22, 2023 at 01:13:26PM +0100, Helge Deller wrote: > Hi Luis, > > On 12/22/23 06:59, Luis Chamberlain wrote: > > On Wed, Nov 22, 2023 at 11:18:12PM +0100, del...@kernel.org wrote: > > > From: Helge Deller > > > > > > On 64-bit architectures w

Re: [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries

2023-12-22 Thread Luis Chamberlain
On Fri, Dec 22, 2023 at 04:01:30PM +0900, Masahiro Yamada wrote: > On Fri, Dec 22, 2023 at 3:08 PM Luis Chamberlain wrote: > > > > On Thu, Dec 21, 2023 at 10:07:13PM -0800, Luis Chamberlain wrote: > > > > > > If we want to go bananas we could even get a graph o

[GIT PULL] Modules changes for v6.8-rc1

2024-01-09 Thread Luis Chamberlain
The following changes since commit ceb6a6f023fd3e8b07761ed900352ef574010bcb: Linux 6.7-rc6 (2023-12-17 15:19:28 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/ tags/modules-6.8-rc1 for you to fetch changes up to 4515d08a742c766

Re: [PATCH 2/4] modules: Ensure 64-bit alignment on __ksymtab_* sections

2024-01-22 Thread Luis Chamberlain
On Sat, Dec 30, 2023 at 08:33:24AM +0100, Helge Deller wrote: > Your selftest code is based on perf. > AFAICS we don't have perf on parisc/hppa, I see! > so I can't test your selftest code > on that architecture. > I assume you tested on x86, where the CPU will transparently take care of > unali

Re: [PATCH 2/4] modules: Ensure 64-bit alignment on __ksymtab_* sections

2024-01-22 Thread Luis Chamberlain
On Mon, Jan 22, 2024 at 05:47:49PM +0100, Helge Deller wrote: > On 1/22/24 17:10, Luis Chamberlain wrote: > > > > It's within the noise for x86_64, but given what you suggest > > for parisc where it is much more expensive, we should see a non-noise > > delta. Even

Re: [RESEND PATCH v2] modules: wait do_free_init correctly

2024-01-29 Thread Luis Chamberlain
On Mon, Jan 29, 2024 at 10:03:04AM +0800, Changbin Du wrote: > The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves > do_free_init() into a global workqueue instead of call_rcu(). So now > rcu_barrier() can not ensure that do_free_init has completed. We should > wait it via flush_wor

Re: [PATCH 4/4] modules: Add missing entry for __ex_table

2024-01-29 Thread Luis Chamberlain
On Wed, Nov 22, 2023 at 11:18:14PM +0100, del...@kernel.org wrote: > From: Helge Deller > > The entry for __ex_table was missing, which may make __ex_table > become 1- or 2-byte aligned in modules. > Add the entry to ensure it gets 32-bit aligned. > > Signed-off-by: Helge Deller > Cc: # v6.0+

[PATCH v2 3/4] vmlinux.lds.h: add missing alignment for symbol CRCs

2024-01-29 Thread Luis Chamberlain
d7f06 ("linux/export: use inline assembler to populate symbol CRCs") Signed-off-by: Luis Chamberlain --- include/linux/export-internal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/export-internal.h b/include/linux/export-internal.h index 69501e0ec239..51b8cf3f60

[PATCH v2 2/4] modules: Ensure 64-bit alignment on __ksymtab_* sections

2024-01-29 Thread Luis Chamberlain
-by: Helge Deller [mcgrof: ran kallsyms selftests on x86_64] Signed-off-by: Luis Chamberlain --- scripts/module.lds.S | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/module.lds.S b/scripts/module.lds.S index bf5bcf2836d8..b00415a9ff27 100644 --- a/scripts/module.l

[PATCH v2 0/3] modules: few of alignment fixes

2024-01-29 Thread Luis Chamberlain
__ksymtab_* sections modules: Add missing entry for __ex_table Luis Chamberlain (2): selftests: add new kallsyms selftests vmlinux.lds.h: add missing alignment for symbol CRCs include/linux/export-internal.h | 1 + lib/Kconfig.debug | 103

[PATCH v2 4/4] modules: Add missing entry for __ex_table

2024-01-29 Thread Luis Chamberlain
From: Helge Deller The entry for __ex_table was missing, which may make __ex_table become 1- or 2-byte aligned in modules. Add the entry to ensure it gets 32-bit aligned. Signed-off-by: Helge Deller Signed-off-by: Luis Chamberlain --- scripts/module.lds.S | 1 + 1 file changed, 1 insertion

[PATCH v2 1/4] selftests: add new kallsyms selftests

2024-01-29 Thread Luis Chamberlain
g code, which may be more useful for more complex cases later in the future. Signed-off-by: Luis Chamberlain --- lib/Kconfig.debug | 103 ++ lib/Makefile | 1 + lib/tests/Makefile| 1 + li

Re: [PATCH 1/3] module: Use set_memory_rox()

2024-01-29 Thread Luis Chamberlain
On Thu, Dec 21, 2023 at 08:24:23AM +0100, Christophe Leroy wrote: > A couple of architectures seem concerned about calling set_memory_ro() > and set_memory_x() too frequently and have implemented a version of > set_memory_rox(), see commit 60463628c9e0 ("x86/mm: Implement native > set_memory_rox()"

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-29 Thread Luis Chamberlain
On Thu, Dec 21, 2023 at 10:02:46AM +0100, Christophe Leroy wrote: > Declaring rodata_enabled and mark_rodata_ro() at all time > helps removing related #ifdefery in C files. > > Signed-off-by: Christophe Leroy Very nice cleanup, thanks!, applied and pushed Luis

Re: [RESEND PATCH v2] modules: wait do_free_init correctly

2024-01-30 Thread Luis Chamberlain
On Tue, Jan 30, 2024 at 09:40:38AM +0800, Changbin Du wrote: > On Mon, Jan 29, 2024 at 09:53:58AM -0800, Luis Chamberlain wrote: > > On Mon, Jan 29, 2024 at 10:03:04AM +0800, Changbin Du wrote: > > > The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-30 Thread Luis Chamberlain
;> pourquoi ceci est important ? > >> https://aka.ms/LearnAboutSenderIdentification ] > >> > >> On Mon, Jan 29, 2024 at 12:09:50PM -0800, Luis Chamberlain wrote: > >>> On Thu, Dec 21, 2023 at 10:02:46AM +0100, Christophe Leroy wrote: > >>>>

Re: [RFC PATCH] kernel/module: add a safer implementation of try_module_get()

2024-01-30 Thread Luis Chamberlain
On Tue, Jan 30, 2024 at 08:36:14PM +0100, Marco Pagani wrote: > The current implementation of try_module_get() requires the module to > exist and be live as a precondition. While this may seem intuitive at > first glance, enforcing the precondition can be tricky, considering that > modules can be u

Re: [PATCH v2 0/3] modules: few of alignment fixes

2024-01-31 Thread Luis Chamberlain
On Mon, Jan 29, 2024 at 11:26:39AM -0800, Luis Chamberlain wrote: > Masahiro, if there no issues feel free to take this or I can take them in > too via the modules-next tree. Lemme know! I've queued this onto modules-testing to get winder testing [0] [0] https://git.kernel.org/pu

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-31 Thread Luis Chamberlain
On Wed, Jan 31, 2024 at 06:53:13AM +, Christophe Leroy wrote: > The problem being identified in commit 677bfb9db8a3 ("module: Don't > ignore errors from set_memory_XX()"), you can keep/re-apply the series > [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time. Sure, queu

Re: [PATCH v2 0/3] modules: few of alignment fixes

2024-02-01 Thread Luis Chamberlain
On Wed, Jan 31, 2024 at 02:11:44PM -0800, Luis Chamberlain wrote: > On Mon, Jan 29, 2024 at 11:26:39AM -0800, Luis Chamberlain wrote: > > Masahiro, if there no issues feel free to take this or I can take them in > > too via the modules-next tree. Lemme know! > > I'v

Re: [PATCH] lib/test_kmod: fix kernel-doc warnings

2024-02-01 Thread Luis Chamberlain
d.c:100: warning: Function parameter or member 'task_sync' not > described in 'kmod_test_device_info' > test_kmod.c:134: warning: Function parameter or member 'thread_mutex' not > described in 'kmod_test_device' > > Signed-off-by: Randy Dunlap > Cc: Luis Chamberlain > Cc: linux-modu...@vger.kernel.org Applied and pushed, thanks! Luis

Re: [PATCH v1] module.h: define __symbol_get_gpl() as a regular __symbol_get()

2024-02-01 Thread Luis Chamberlain
On Thu, Feb 01, 2024 at 12:29:46PM +0300, Andrew Kanner wrote: > On Thu, Feb 01, 2024 at 06:29:58AM +0100, Christoph Hellwig wrote: > > On Wed, Jan 31, 2024 at 10:02:52PM +0300, Andrew Kanner wrote: > > > Prototype for __symbol_get_gpl() was introduced in the initial git > > > commit 1da177e4c3f4 (

Re: [PATCH v2 0/3] modules: few of alignment fixes

2024-02-02 Thread Luis Chamberlain
On Sat, Feb 03, 2024 at 12:20:38AM +0900, Masahiro Yamada wrote: > On Fri, Feb 2, 2024 at 3:05 AM Luis Chamberlain wrote: > > > > On Wed, Jan 31, 2024 at 02:11:44PM -0800, Luis Chamberlain wrote: > > > On Mon, Jan 29, 2024 at 11:26:39AM -0800, Luis Chamberlain wrote: >

Re: [RFC PATCH] kernel/module: add a safer implementation of try_module_get()

2024-02-02 Thread Luis Chamberlain
On Thu, Feb 01, 2024 at 03:27:54PM +0100, Marco Pagani wrote: > > On 2024-01-30 21:47, Luis Chamberlain wrote: > > > > It very much sounds like there is a desire to have this but without a > > user, there is no justification. > > I was working on a set of patch

Re: [PATCH v3] modules: wait do_free_init correctly

2024-02-21 Thread Luis Chamberlain
+ live-patching folks, Finally, things are starting to be much clearer. Thanks for the time for working on this, some more comments below and a question which I think deserves some attention. On Sat, Feb 17, 2024 at 04:18:10PM +0800, Changbin Du wrote: > The synchronization here is just to ensure

Re: [PATCH v4] modules: wait do_free_init correctly

2024-02-27 Thread Luis Chamberlain
t; Fixes: 1a7b7d922081 ("modules: Use vmalloc special flag") > Signed-off-by: Changbin Du > Cc: Xiaoyi Su > Cc: Eric Chanudet > Cc: Luis Chamberlain > Tested-by: Eric Chanudet Acked-by: Luis Chamberlain Luis

Re: [RFC][PATCH 0/4] Make bpf_jit and kprobes work with CONFIG_MODULES=n

2024-03-06 Thread Luis Chamberlain
On Wed, Mar 06, 2024 at 12:05:07PM -0800, Calvin Owens wrote: > Hello all, > > This patchset makes it possible to use bpftrace with kprobes on kernels > built without loadable module support. This is a step in the right direction for another reason: clearly the module_alloc() is not about modules

Re: [RFC][PATCH 0/4] Make bpf_jit and kprobes work with CONFIG_MODULES=n

2024-03-07 Thread Luis Chamberlain
On Thu, Mar 7, 2024 at 6:50 PM Masami Hiramatsu wrote: > > On Wed, 6 Mar 2024 17:58:14 -0800 > Song Liu wrote: > > > Hi Calvin, > > > > It is great to hear from you! :) > > > > On Wed, Mar 6, 2024 at 3:23 PM Calvin Owens wrote: > > > > &

Re: [PATCH v1] module.h: define __symbol_get_gpl() as a regular __symbol_get()

2024-03-12 Thread Luis Chamberlain
On Tue, Feb 13, 2024 at 02:10:45PM +0300, Andrew Kanner wrote: > On Thu, Feb 01, 2024 at 10:13:54AM -0800, Luis Chamberlain wrote: > > > > While you're at it, if you want to try it, you could see if you can > > improve the situation more by looking at symbol_get() users

Re: [PATCH v1] module.h: define __symbol_get_gpl() as a regular __symbol_get()

2024-03-12 Thread Luis Chamberlain
On Tue, Mar 12, 2024 at 03:25:27PM -0700, Luis Chamberlain wrote: > On Tue, Feb 13, 2024 at 02:10:45PM +0300, Andrew Kanner wrote: > > On Thu, Feb 01, 2024 at 10:13:54AM -0800, Luis Chamberlain wrote: > > > > > > While you're at it, if you want to try it, you co

[GIT PULL] Modules changes for v6.9-rc1

2024-03-12 Thread Luis Chamberlain
The following changes since commit 41bccc98fb7931d63d03f326a746ac4d429c1dd3: Linux 6.8-rc2 (2024-01-28 17:01:12 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/ tags/modules-6.9-rc1 for you to fetch changes up to d1909c022173935

Re: [PATCH] [v4] module: don't ignore sysfs_create_link() failures

2024-04-08 Thread Luis Chamberlain
> Rework the code to properly unwind and return the error code to the > caller. My reading of the original code was that it tries to > not fail when the links already exist, so keep ignoring -EEXIST > errors. > > Fixes: e17e0f51aeea ("Driver core: show drivers in /sys/module/") > Reviewed-by: Greg Kroah-Hartman Reviewed-by: Luis Chamberlain Luis

Re: [PATCH v4 05/15] mm: introduce execmem_alloc() and execmem_free()

2024-04-11 Thread Luis Chamberlain
On Thu, Apr 11, 2024 at 07:00:41PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > module_alloc() is used everywhere as a mean to allocate memory for code. > > Beside being semantically wrong, this unnecessarily ties all subsystems > that need to allocate code, such as ftrace, kpro

Re: [PATCH v4 00/15] mm: jit/text allocator

2024-04-11 Thread Luis Chamberlain
On Thu, Apr 11, 2024 at 07:00:36PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > Since v3 I looked into making execmem more of an utility toolbox, as we > discussed at LPC with Mark Rutland, but it was getting more hairier than > having a struct describing architecture co

Re: [PATCH] module: ban '.', '..' as module names, ban '/' in module names

2024-04-14 Thread Luis Chamberlain
On Sun, Apr 14, 2024 at 10:05:05PM +0300, Alexey Dobriyan wrote: > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -3616,4 +3616,12 @@ extern int vfs_fadvise(struct file *file, loff_t > offset, loff_t len, > extern int generic_fadvise(struct file *file, loff_t offset, loff_t len, >

Re: [PATCH v5 00/15] mm: jit/text allocator

2024-04-23 Thread Luis Chamberlain
On Mon, Apr 22, 2024 at 12:44:21PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > (something went wrong with the prevois posting, sorry for the noise) > > Hi, > > Since v3 I looked into making execmem more of an utility toolbox, as we > discussed at LPC with Mark Rutland, but it

Re: [PATCH v6 00/16] mm: jit/text allocator

2024-04-26 Thread Luis Chamberlain
On Fri, Apr 26, 2024 at 11:28:38AM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > The patches are also available in git: > https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/log/?h=execmem/v6 > > v6 changes: > * restore patch "arm64: extend execmem_info for ge

Re: [PATCH v7 00/16] mm: jit/text allocator

2024-04-29 Thread Luis Chamberlain
On Mon, Apr 29, 2024 at 03:16:04PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > The patches are also available in git: > https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/log/?h=execmem/v7 > > v7 changes: > * define MODULE_{VADDR,END} for riscv32 to fix the

Re: [PATCH v7 00/16] mm: jit/text allocator

2024-05-02 Thread Luis Chamberlain
On Thu, May 02, 2024 at 11:50:36PM +0100, Liviu Dudau wrote: > On Mon, Apr 29, 2024 at 09:29:20AM -0700, Luis Chamberlain wrote: > > On Mon, Apr 29, 2024 at 03:16:04PM +0300, Mike Rapoport wrote: > > > From: "Mike Rapoport (IBM)" > > > > > > Hi, >

Re: [PATCH RESEND v8 00/16] mm: jit/text allocator

2024-05-05 Thread Luis Chamberlain
On Sun, May 05, 2024 at 07:06:12PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > The patches are also available in git: > https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/log/?h=execmem/v8 > > v8: > * fix intialization of default_execmem_info Thanks, appli

Re: [PATCH] modules: Drop the .export_symbol section from the final modules

2024-05-11 Thread Luis Chamberlain
On Wed, Apr 17, 2024 at 01:35:30PM +0800, wang...@lemote.com wrote: > From: Wang Yao > > Commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost") > forget drop the .export_symbol section from the final modules. > > Signed-off-by: Wang Yao Masahiro, commit ddb5cdbafaaa ("kbuild: gene

[GIT PULL] Modules changes for v6.10-rc1

2024-05-14 Thread Luis Chamberlain
The following changes since commit a5131c3fdf2608f1c15f3809e201cf540eb28489: Merge tag 'x86-shstk-2024-05-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (2024-05-13 19:33:23 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/li

Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch

2023-10-10 Thread Luis Chamberlain
On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote: > V3: > * Removed the ia64 patch to avoid conflicts with the ia64 removal > * Rebased onto v6.6-rc4 > * Kept/added the trailing comma for the ctl_table arrays. This was a comment > that we received "drivers/*" patch set.

Re: [PATCH] module: Add CONFIG_MODULE_LOAD_IN_SEQUENCE option

2023-10-10 Thread Luis Chamberlain
On Mon, Oct 09, 2023 at 10:26:35AM +0530, Joey Jiao wrote: > When modprobe cmds are executed one by one, the final loaded modules > are not in fixed sequence as expected. > > Add the option to make sure modules are in fixed sequence across reboot. > > Signed-off-by: Joey Jiao > --- > kernel/mod

Re: [PATCH v2 0/5] params: harden string ops and allocatio ops

2023-10-10 Thread Luis Chamberlain
r the limit when getting the string length > > params: Use size_add() for kmalloc() > > params: Sort headers > > params: Fix multi-line comment style > > Seems like a nice bit of clean-up. > > Reviewed-by: Kees Cook Reviewed-by: Luis Chamberlain Luis

Re: [PATCH] module: Add CONFIG_MODULE_LOAD_IN_SEQUENCE option

2023-10-10 Thread Luis Chamberlain
Please find a good email client to reply to patches. On Wed, Oct 11, 2023 at 01:57:58AM +, Joey Jiao (QUIC) wrote: > Hi Luis, > > > How is ignoring an error ensuring ordering? > The change is just to disable the schedule_work. That's different and can be made clearer. Try: if (!IS_ENABLED(C

Re: [PATCH v2] module: Add CONFIG_MODULE_LOAD_IN_SEQUENCE option

2023-10-11 Thread Luis Chamberlain
On Wed, Oct 11, 2023 at 01:14:38PM +0530, Joey Jiao wrote: > When modprobe cmds are executed one by one, the final loaded modules > are not in fixed sequence as expected. > > Add the option to make sure modules are in fixed sequence across reboot. > > Signed-off-by: Joey Jiao > --- > kernel/mod

Re: [PATCH v3] module: Add CONFIG_MODULE_DISABLE_INIT_FREE option

2023-10-12 Thread Luis Chamberlain
On Thu, Oct 12, 2023 at 07:10:11AM +0530, Joey Jiao wrote: > To facilitate syzkaller test, it's essential for the module to retain the same > address across reboots. Why? > In userspace, the execution of modprobe commands must > occur sequentially. Why? > In the kernel, selecting the CONFIG_MOD

Re: [PATCH v4] module: Add CONFIG_MODULE_DISABLE_INIT_FREE option

2023-10-12 Thread Luis Chamberlain
On Thu, Oct 12, 2023 at 07:17:19AM +0530, Joey Jiao wrote: > > +config MODULE_DISABLE_INIT_FREE > + bool "Disable freeing of init sections" > + default n > + help > + By default, kernel will free init sections after module being fully > + loaded. > + > + MODULE_DISAB

Re: [PATCH v3] module: Add CONFIG_MODULE_DISABLE_INIT_FREE option

2023-10-12 Thread Luis Chamberlain
On Thu, Oct 12, 2023 at 09:50:27AM -0700, Luis Chamberlain wrote: > > In the kernel, selecting the CONFIG_MODULE_DISABLE_INIT_FREE > > option disables the asynchronous freeing of init sections. > > No it does not. I take it back, your patch effectively only does this. Luis

Re: [PATCH 5/5] modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules

2023-10-18 Thread Luis Chamberlain
On Wed, Oct 18, 2023 at 07:31:46AM +0200, Christoph Hellwig wrote: > On Wed, Oct 18, 2023 at 01:30:18AM +0100, David Woodhouse wrote: > > > > But if we're going to tolerate the core kernel still exporting some > > stuff with EXPORT_SYMBOL, why isn't OK for a GPL-licensed module do to > > the same?

[GIT PULL] Modules changes for v6.7-rc1

2023-11-01 Thread Luis Chamberlain
er a month. Andrea Righi (1): module/decompress: use vmalloc() for gzip decompression workspace Kees Cook (2): module: Clarify documentation of module_param_call() module: Annotate struct module_notes_attrs with __counted_by Luis Chamberlain (1): MAINTAINERS: a

Re: [PATCH 2/3] modpost: Extended modversion support

2023-11-16 Thread Luis Chamberlain
On Wed, Nov 15, 2023 at 06:50:10PM +, Matthew Maurer wrote: > Adds a new format for modversions which stores each field in a separate > elf section. The "why" is critical and not mentioned. And I'd like to also see documented this with foresight, if Rust needed could this be used in the future

Re: [PATCH] init: move THIS_MODULE from to

2023-12-04 Thread Luis Chamberlain
> it only defines EXPORT_SYMBOL. > > Signed-off-by: Masahiro Yamada Reviewed-by: Luis Chamberlain Do you want this this to go through modules-next or your tree? I'm fine it goes either way. Luis

Re: [PATCH 0/4] Section alignment issues?

2023-12-19 Thread Luis Chamberlain
On Wed, Nov 22, 2023 at 11:18:10PM +0100, del...@kernel.org wrote: > From: Helge Deller > My questions: > - Am I wrong with my analysis? This would typically of course depend on the arch, but whether it helps is what I would like to see with real numbers rather then speculation. Howeer, I don't e

Re: [PATCH] modules: wait do_free_init correctly

2023-12-19 Thread Luis Chamberlain
On Tue, Dec 19, 2023 at 12:51:51PM -0800, Andrew Morton wrote: > On Tue, 19 Dec 2023 22:12:31 +0800 Changbin Du wrote: > > > The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves > > do_free_init() into a global workqueue instead of call_rcu(). So now > > we should wait it via flush

Re: [PATCH] modules: wait do_free_init correctly

2023-12-20 Thread Luis Chamberlain
On Wed, Dec 20, 2023 at 01:27:51PM +0800, Changbin Du wrote: > On Tue, Dec 19, 2023 at 01:52:03PM -0800, Luis Chamberlain wrote: > > On Tue, Dec 19, 2023 at 12:51:51PM -0800, Andrew Morton wrote: > > > On Tue, 19 Dec 2023 22:12:31 +0800 Changbin Du > > > wrote

Re: [PATCH 0/4] Section alignment issues?

2023-12-20 Thread Luis Chamberlain
On Tue, Dec 19, 2023 at 01:26:49PM -0800, Luis Chamberlain wrote: > On Wed, Nov 22, 2023 at 11:18:10PM +0100, del...@kernel.org wrote: > > From: Helge Deller > > My questions: > > - Am I wrong with my analysis? > > This would typically of course depend on the arch, but

Re: [PATCH] module: Add log information for loading module failures

2024-06-18 Thread Luis Chamberlain
On Fri, Jun 14, 2024 at 09:25:19AM +, Yusong Gao wrote: > Add log information in kernel-space when loading module failures. > Try to load the unsigned module and the module with bad signature > when set 1 to /sys/module/module/parameters/sig_enforce. > > Unsigned module case: > (linux) insmod

Re: [PATCH v4 2/3] kbuild, kconfig: generate offset range data for builtin modules

2024-06-18 Thread Luis Chamberlain
On Fri, Jun 14, 2024 at 01:14:27PM -0400, Kris Van Hees wrote: > The offset range data for builtin modules is generated using: > - modules.builtin: associates object files with module names > - vmlinux.map: provides load order of sections and offset of first member > per section > - vmlinux.

Re: [PATCH 00/15] Implement MODVERSIONS for Rust

2024-06-18 Thread Luis Chamberlain
On Mon, Jun 17, 2024 at 05:58:19PM +, Sami Tolvanen wrote: > Hi folks, > > This series implements CONFIG_MODVERSIONS for Rust, an important > feature for distributions like Android that want to ship Rust > kernel modules, and depend on modversions to help ensure module ABI > compatibility. >

Re: [PATCH v3] module: create weak dependecies

2024-06-18 Thread Luis Chamberlain
On Tue, May 14, 2024 at 09:25:55AM -0500, Lucas De Marchi wrote: > On Fri, May 10, 2024 at 10:57:22AM GMT, Jose Ignacio Tornos Martinez wrote: > > It has been seen that for some network mac drivers (i.e. lan78xx) the > > related module for the phy is loaded dynamically depending on the current > >

Re: [PATCH 6.10.0-rc2] kernel/module: avoid panic on loading broken module

2024-06-18 Thread Luis Chamberlain
On Thu, Jun 06, 2024 at 03:31:49PM +0200, Daniel v. Kirschten wrote: > If a module is being loaded, and the .gnu.linkonce.this_module section > in the module's ELF file does not have the WRITE flag, the kernel will > map the finished module struct of that module as read-only. > This causes a kernel

Re: [PATCH 00/15] Implement MODVERSIONS for Rust

2024-06-18 Thread Luis Chamberlain
On Tue, Jun 18, 2024 at 02:19:47PM -0700, Sami Tolvanen wrote: > Hi Luis, > > On Tue, Jun 18, 2024 at 12:42:51PM -0700, Luis Chamberlain wrote: > > a) Ensure correctness for all users / tools, so that proper plumbing is > >really done. By considering all symbols you i

Re: [PATCH v2] module: Add log information for loading module failures

2024-06-20 Thread Luis Chamberlain
On Wed, Jun 19, 2024 at 08:30:37AM +, Yusong Gao wrote: > Add log information in kernel-space when loading module failures. > Try to load the unsigned module and the module with bad signature > when set 1 to /sys/module/module/parameters/sig_enforce. > > Unsigned module case: > (linux) insmod

Re: [PATCH v3] module: Add log info for verifying module signature

2024-06-28 Thread Luis Chamberlain
On Fri, Jun 28, 2024 at 10:39:23AM +, Yusong Gao wrote: > Add log information in kernel-space when loading module failures. > Try to load the unsigned module and the module with bad signature > when set 1 to /sys/module/module/parameters/sig_enforce. > > Unsigned module case: > (linux) insmod

Re: [PATCH 6.10.0-rc2] kernel/module: avoid panic on loading broken module

2024-06-28 Thread Luis Chamberlain
On Fri, Jun 21, 2024 at 04:05:27PM +0200, Daniel von Kirschten wrote: > Am 18.06.2024 um 21:58 schrieb Luis Chamberlain: > > On Thu, Jun 06, 2024 at 03:31:49PM +0200, Daniel v. Kirschten wrote: > > > If a module is being loaded, and the .gnu.linkonce.this_module section > &g

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-06-28 Thread Luis Chamberlain
On Fri, Jun 28, 2024 at 02:23:49PM +0200, Miroslav Benes wrote: > On Fri, 7 Jun 2024, Song Liu wrote: > > > Hi Miroslav, > > > > Thanks for reviewing the patch! > > > > On Fri, Jun 7, 2024 at 6:06 AM Miroslav Benes wrote: > > > > > > Hi, > > > > > > On Tue, 4 Jun 2024, Song Liu wrote: > > > > >

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-03 Thread Luis Chamberlain
On Tue, Jul 02, 2024 at 10:56:41PM -0700, Josh Poimboeuf wrote: > On Mon, Jul 01, 2024 at 03:13:23PM +0200, Petr Mladek wrote: > > So, you suggest to search the symbols by a hash. Do I get it correctly? I meant, that in the Rust world the symbols go over the allowed limit, and so an alternative fo

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-08 Thread Luis Chamberlain
On Thu, Jul 04, 2024 at 11:02:18AM +0200, Petr Mladek wrote: > On Wed 2024-07-03 08:30:33, Luis Chamberlain wrote: > > On Tue, Jul 02, 2024 at 10:56:41PM -0700, Josh Poimboeuf wrote: > > > On Mon, Jul 01, 2024 at 03:13:23PM +0200, Petr Mladek wrote: > > > > So, you su

Re: [PATCH] rust: add `module_params` macro

2024-07-08 Thread Luis Chamberlain
On Fri, Jul 05, 2024 at 11:15:11AM +, Andreas Hindborg wrote: > From: Andreas Hindborg > > This patch includes changes required for Rust kernel modules to utilize > module parameters. This code implements read only support for integer > types without `sysfs` support. > > This code is a reduc

  1   2   3   4   5   6   7   >