[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:

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:

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,

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

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

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] 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 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

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,

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

2024-04-08 Thread Luis Chamberlain
rly 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

[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

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 could s

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 that

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: [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

Re: [PATCH v4] modules: wait do_free_init correctly

2024-02-27 Thread Luis Chamberlain
7b7d922081 ("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: [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

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

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] lib/test_kmod: fix kernel-doc warnings

2024-02-01 Thread Luis Chamberlain
mber '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 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've que

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,

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/pub/scm

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

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: [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&quo

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: [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 >

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

2024-01-29 Thread Luis Chamberlain
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 + lib/tests/module/.gitignore

[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 0/3] modules: few of alignment fixes

2024-01-29 Thread Luis Chamberlain
* 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 ++ li

[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..51b8

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

2024-01-29 Thread Luis Chamberlain
] 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.lds.S +++ b/scripts/module.lds.S @@ -15,10 +15,10 @@ SECTIONS

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+

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

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 just

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 >

[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

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

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

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

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

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] 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] 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

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

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

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

2023-11-01 Thread Luis Chamberlain
. 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: add include

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

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 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. > + > +

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

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

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

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

2023-10-10 Thread Luis Chamberlain
t 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
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 > --- >

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: Fix comment typo

2023-09-20 Thread Luis Chamberlain
On Sun, Jun 18, 2023 at 10:58:43PM +0800, zhumao...@208suo.com wrote: > > Delete duplicated word in comment. > > Signed-off-by: Zhu Mao > --- Applied and pushed, next time please consider sending a slew of typo fixes, just one word is a bit too much trouble for just one patch. Luis

Re: [PATCH 0/2] module: Do some small changes

2023-09-20 Thread Luis Chamberlain
On Fri, Jun 16, 2023 at 09:51:31AM +0800, Tiezhu Yang wrote: > The first patch is suggested by Xi Zhang offline, > the second patch is inspired by the first patch, no functional changes. Applied and pushed, thanks! Luis

Re: [PATCH] module/decompress: use vmalloc() for gzip decompression workspace

2023-09-20 Thread Luis Chamberlain
On Wed, Aug 30, 2023 at 05:58:20PM +0200, Andrea Righi wrote: > Use a similar approach as commit a419beac4a07 ("module/decompress: use > vmalloc() for zstd decompression workspace") and replace kmalloc() with > vmalloc() also for the gzip module decompression workspace. > > In this case the

[PATCH] MAINTAINERS: add include/linux/module*.h to modules

2023-09-20 Thread Luis Chamberlain
Use glob include/linux/module*.h to capture all module changes. Suggested-by: Kees Cook Signed-off-by: Luis Chamberlain --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 3be1bdfe8ecc..b78cf8dc7f16 100644 --- a/MAINTAINERS +++ b

Re: [PATCH v2 0/8] sysctl: Remove sentinel elements from arch

2023-09-20 Thread Luis Chamberlain
On Wed, Sep 13, 2023 at 11:10:54AM +0200, Joel Granados via B4 Relay wrote: > V2: > * Added clarification both in the commit messages and the coverletter as > to why this patch is safe to apply. > * Added {Acked,Reviewed,Tested}-by from list > * Link to v1: >

Re: [RFC v2 6/6] fs: add automatic kernel fs freeze / thaw and remove kthread freezing

2021-04-20 Thread Luis Chamberlain
On Tue, Apr 20, 2021 at 01:59:03PM +0100, Christoph Hellwig wrote: > > This also removes all the superflous freezer calls on all filesystems > > as they are no longer needed as the VFS now performs filesystem > > freezing/thaw if the filesystem has support for it. The filesystem > > therefore is

Re: [PATCH 2/2] fs/kernel_read_file: use usermodehelper_read_trylock() as a stop gap

2021-04-19 Thread Luis Chamberlain
On Fri, Apr 16, 2021 at 11:58:50PM +, Luis Chamberlain wrote: > The endless wait for the read which the piece of hardware never got > stalls resume as sync calls are all asynchronous. Sorry, this should read: The endless wait for the read, which the piece of hardware never got, stalls

[RFC v2 4/6] fs: distinguish between user initiated freeze and kernel initiated freeze

2021-04-16 Thread Luis Chamberlain
the definitions a frozen filesystem to account for future kernel initiated filesystem freeze. Signed-off-by: Luis Chamberlain --- fs/super.c | 27 ++- include/linux/fs.h | 17 +++-- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/fs/super.c b

[RFC v2 6/6] fs: add automatic kernel fs freeze / thaw and remove kthread freezing

2021-04-16 Thread Luis Chamberlain
| WQ_ARG3 ) | fs_wq_fn( - WQ_FREEZABLE | WQ_ARG2 + WQ_ARG2 ) | fs_wq_fn( - WQ_FREEZABLE + 0 ) ) Signed-off-by: Luis Chamberlain --- fs/btrfs/disk-io.c | 4 +- fs/btrfs/scrub.c | 2 +- fs

[RFC v2 5/6] fs: add iterate_supers_excl() and iterate_supers_reverse_excl()

2021-04-16 Thread Luis Chamberlain
. If an error occurs we capture it and propagate it. Likewise there are use cases where we wish to traverse the superblock list but in reverse order. The new iterate_supers_reverse_excl() helpers does this but also also captures any errors encountered. Reviewed-by: Jan Kara Signed-off-by: Luis

[RFC v2 1/6] fs: provide unlocked helper for freeze_super()

2021-04-16 Thread Luis Chamberlain
. Suggested-by: Dave Chinner Reviewed-by: Jan Kara Signed-off-by: Luis Chamberlain --- fs/super.c | 100 + 1 file changed, 55 insertions(+), 45 deletions(-) diff --git a/fs/super.c b/fs/super.c index 11b7e7213fd1..e24d0849d935 100644 --- a/fs

[RFC v2 3/6] fs: add a helper for thaw_super_locked() which does not unlock

2021-04-16 Thread Luis Chamberlain
The thaw_super_locked() expects the caller to hold the sb->s_umount semaphore. It also handles the unlocking of the semaphore for you. Allow for cases where the caller will do the unlocking of the semaphore. Signed-off-by: Luis Chamberlain --- fs/super.c | 25 +++-- 1 f

[RFC v2 2/6] fs: add frozen sb state helpers

2021-04-16 Thread Luis Chamberlain
to expand checks later in these same call sites as we expand the definition of a frozen superblock. Signed-off-by: Luis Chamberlain --- fs/ext4/ext4_jbd2.c | 2 +- fs/super.c | 4 ++-- fs/xfs/xfs_trans.c | 3 +-- include/linux/fs.h | 34 ++ 4 files

[RFC v2 0/6] vfs: provide automatic kernel freeze / resume

2021-04-16 Thread Luis Chamberlain
mcg...@kernel.org [1] https://lkml.kernel.org/r/20171129232356.28296-1-mcg...@kernel.org Luis Chamberlain (6): fs: provide unlocked helper for freeze_super() fs: add frozen sb state helpers fs: add a helper for thaw_super_locked() which does not unlock fs: distinguish between u

[PATCH 2/2] fs/kernel_read_file: use usermodehelper_read_trylock() as a stop gap

2021-04-16 Thread Luis Chamberlain
nel gets VFS fs freeze / thaw support. Cc: raf...@kernel.org Cc: j...@suse.cz Cc: bvanass...@acm.org Cc: ker...@tuxforce.de Cc: mche...@kernel.org Cc: keesc...@chromium.org Reported-by: Lukas Middendorf Signed-off-by: Luis Chamberlain --- fs/kernel_read_file.c | 37

[PATCH 0/2] fs: provide a stop gap fix for buggy resume firmware API calls

2021-04-16 Thread Luis Chamberlain
...@tuxforce.de Luis Chamberlain (2): test_firmware: add suspend support to test buggy drivers fs/kernel_read_file: use usermodehelper_read_trylock() as a stop gap fs/kernel_read_file.c | 37 - kernel/kexec_file.c | 9 +- kernel/module.c

[PATCH 1/2] test_firmware: add suspend support to test buggy drivers

2021-04-16 Thread Luis Chamberlain
)) done Cc: raf...@kernel.org Cc: j...@suse.cz Cc: bvanass...@acm.org Cc: ker...@tuxforce.de Cc: mche...@kernel.org Cc: keesc...@chromium.org Signed-off-by: Luis Chamberlain --- lib/test_firmware.c | 136 -- tools/testing/selftests/firmware/fw

Re: [RFC v3 0/2] vfs / btrfs: add support for ustat()

2021-04-15 Thread Luis Chamberlain
On Thu, Apr 15, 2021 at 02:17:58PM -0400, Josef Bacik wrote: > There's a lot of larger things that need to > be addressed in general to support the volume approach inside file systems > that is going to require a lot of work inside of VFS. If you feel like > tackling that work and then wiring up

Re: [RFC v3 0/2] vfs / btrfs: add support for ustat()

2021-04-15 Thread Luis Chamberlain
On Wed, Aug 23, 2017 at 3:31 PM Jeff Mahoney wrote: > > On 8/15/14 5:29 AM, Al Viro wrote: > > On Thu, Aug 14, 2014 at 07:58:56PM -0700, Luis R. Rodriguez wrote: > > > >> Christoph had noted that this seemed associated to the problem > >> that the btrfs uses different assignments for st_dev than

Re: [PATCH v3] firmware_loader: fix use-after-free in firmware_fallback_sysfs

2021-04-14 Thread Luis Chamberlain
e with > fw_load_sysfs_fallback") > Reported-by: syzbot+de271708674e20930...@syzkaller.appspotmail.com > Tested-by: syzbot+de271708674e20930...@syzkaller.appspotmail.com > Signed-off-by: Anirudh Rayabharam > --- > > Changes in v3: > Modified the patch to incorporate suggesti

Re: [PATCH v2] firmware_loader: fix use-after-free in firmware_fallback_sysfs

2021-04-13 Thread Luis Chamberlain
On Tue, Apr 13, 2021 at 04:12:42PM +0530, Anirudh Rayabharam wrote: > The use-after-free happens when a fw_priv object has been freed but > hasn't been removed from the pending list (pending_fw_head). The next > time fw_load_sysfs_fallback tries to insert into the list, it ends up > accessing the

Re: [PATCH v2 1/1] kernel.h: Split out panic and oops helpers

2021-04-09 Thread Luis Chamberlain
u > Acked-by: Rasmus Villemoes > Signed-off-by: Andrew Morton Acked-by: Luis Chamberlain Luis

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-04-08 Thread Luis Chamberlain
On Thu, Apr 08, 2021 at 10:55:53AM +0200, Greg KH wrote: > So to add crazy complexity to the kernel, I agree that this can be tricky. However, driver developers are going to open code this either way. The problem with that as well, and one of my own reasons for striving for at least *trying* for

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Luis Chamberlain
On Wed, Apr 07, 2021 at 05:59:19PM +0300, Andy Shevchenko wrote: > On Wed, Apr 7, 2021 at 5:30 PM Luis Chamberlain wrote: > > On Wed, Apr 07, 2021 at 10:33:44AM +0300, Andy Shevchenko wrote: > > > On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain > > > wrote: > &g

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-04-07 Thread Luis Chamberlain
On Tue, Apr 06, 2021 at 06:38:24PM -0700, Minchan Kim wrote: > To clarify what I understood form the discussion until now: > > 1. zram shouldn't allow creating more zram instance during > rmmod(It causes CPU multistate splat) Right! > 2. the private data of gendisk shouldn't destroyed while

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-04-07 Thread Luis Chamberlain
On Tue, Apr 06, 2021 at 06:23:46PM -0700, Minchan Kim wrote: > On Tue, Apr 06, 2021 at 12:29:09AM +0000, Luis Chamberlain wrote: > > On Mon, Apr 05, 2021 at 12:58:05PM -0700, Minchan Kim wrote: > > > On Mon, Apr 05, 2021 at 07:00:23PM +, Luis Chamberlain wrote: &g

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-07 Thread Luis Chamberlain
On Wed, Apr 07, 2021 at 10:33:44AM +0300, Andy Shevchenko wrote: > On Wed, Apr 7, 2021 at 10:25 AM Luis Chamberlain wrote: > > > > On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > > > diff --git a/include/linux/panic_notifier.h > > > b/include

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Luis Chamberlain
On Tue, Apr 06, 2021 at 04:31:58PM +0300, Andy Shevchenko wrote: > diff --git a/include/linux/panic_notifier.h b/include/linux/panic_notifier.h > new file mode 100644 > index ..41e32483d7a7 > --- /dev/null > +++ b/include/linux/panic_notifier.h > @@ -0,0 +1,12 @@ > +/*

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-04-05 Thread Luis Chamberlain
On Mon, Apr 05, 2021 at 12:58:05PM -0700, Minchan Kim wrote: > On Mon, Apr 05, 2021 at 07:00:23PM +0000, Luis Chamberlain wrote: > > On Mon, Apr 05, 2021 at 10:07:24AM -0700, Minchan Kim wrote: > > > On Thu, Apr 01, 2021 at 11:59:25PM +, Luis Chamberlain wrote: > &g

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-04-05 Thread Luis Chamberlain
On Mon, Apr 05, 2021 at 10:07:24AM -0700, Minchan Kim wrote: > On Thu, Apr 01, 2021 at 11:59:25PM +0000, Luis Chamberlain wrote: > > And come to think of it the last patch I had sent with a new > > DECLARE_RWSEM(zram_unload) also has this same issue making most > > sysfs attr

Re: [syzbot] KASAN: use-after-free Read in fw_load_sysfs_fallback

2021-04-02 Thread Luis Chamberlain
On Fri, Apr 02, 2021 at 02:41:20PM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:5ee96fa9 Merge tag 'irq-urgent-2021-03-21' of git://git.ke.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1028d621d0 >

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-04-02 Thread Luis Chamberlain
On Fri, Apr 02, 2021 at 09:54:12AM +0200, Greg KH wrote: > On Thu, Apr 01, 2021 at 11:59:25PM +0000, Luis Chamberlain wrote: > > As for the syfs deadlock possible with drivers, this fixes it in a generic > > way: > > > > commit fac43d8025727a74f80a183cc5eb74

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-04-01 Thread Luis Chamberlain
On Mon, Mar 22, 2021 at 03:12:01PM -0700, Minchan Kim wrote: > On Mon, Mar 22, 2021 at 08:41:56PM +0000, Luis Chamberlain wrote: > > > > I would not call it *every* syfs knob as not all deal with things which > > are related to CPU hotplug multistate, right?

Re: [Ksummit-discuss] RFC: create mailing list "linux-issues" focussed on issues/bugs and regressions

2021-03-23 Thread Luis Chamberlain
On Mon, Mar 22, 2021 at 1:25 PM Thorsten Leemhuis wrote: > > > > On 22.03.21 19:32, Linus Torvalds wrote: > > On Mon, Mar 22, 2021 at 8:18 AM Thorsten Leemhuis > > wrote: > >> > >> I even requested a > >> "linux-regressi...@vger.kernel.org" a while later, but didn't hear > >> anything back;

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-03-22 Thread Luis Chamberlain
On Mon, Mar 22, 2021 at 09:37:17AM -0700, Minchan Kim wrote: > On Fri, Mar 19, 2021 at 07:09:24PM +0000, Luis Chamberlain wrote: > > Indeed one issue is a consequence of the other but a bit better > > description can be put together for both separately. > > > > Th

Re: [PATCH 1/2] zram: fix crashes due to use of cpu hotplug multistate

2021-03-19 Thread Luis Chamberlain
On Fri, Mar 12, 2021 at 11:28:21AM -0800, Minchan Kim wrote: > On Fri, Mar 12, 2021 at 06:32:38PM +0000, Luis Chamberlain wrote: > > On Thu, Mar 11, 2021 at 06:14:40PM -0800, Minchan Kim wrote: > > > On Wed, Mar 10, 2021 at 09:21:28PM +, Luis Chamberlain wrote: > >

Re: blktests: block/009 next-20210304 failure rate average of 1/448

2021-03-18 Thread Luis Chamberlain
On Tue, Mar 16, 2021 at 06:47:39PM +, Luis Chamberlain wrote: > On Tue, Mar 16, 2021 at 05:46:45PM +0000, Luis Chamberlain wrote: > > I've managed to reproduce blktests block/009 failures with kdevops [0] > > on linux-next tag next-20210304 with a current failure rate average

Re: blktests: block/009 next-20210304 failure rate average of 1/448

2021-03-18 Thread Luis Chamberlain
Adding linux-fsdevel as folks working on fstests might be interested. On Tue, Mar 16, 2021 at 05:46:45PM +, Luis Chamberlain wrote: > My personal suspicion is not on the block layer but on scsi_debug > because this can fail: > > modprobe scsi_debug; rmmod scsi_debug > >

  1   2   3   4   5   6   >