me}_struct:
> +::kernel::module_param::RacyKernelParam =
> +
> ::kernel::module_param::RacyKernelParam(::kernel::bindings::kernel_param {{
> +name: if cfg!(MODULE) {{
> +
>
; @@ -0,0 +1,201 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +//! Support for module parameters.
> +//!
> +//! C header:
> [`include/linux/moduleparam.h`](srctree/include/linux/moduleparam.h)
> +
> +use crate::prelude::*;
> +use crate::str::BStr;
> +
&g
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote:
> When we add parameter support to the module macro, we want to be able to
> pass a reference to `ModuleInfo` to a helper function. That is not possible
> when we move out of the local `modinfo`. So change the function to acc
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote:
> Showcase the rust module parameter support by adding a module parameter to
> the `rust_minimal` sample.
>
> Signed-off-by: Andreas Hindborg
Reviewed-by: Benno Lossin
---
Cheers,
Benno
> ---
> samples/rust/ru
_type_t enum
> having a signed integer as its underlying type.
>
> Fixes: c7ee8aebf6c0 ("module: add stop-grap sanity check on module memcpy()")
> Signed-off-by: Petr Pavlu
> Reviewed-by: Sami Tolvanen
> ---
> kernel/module/main.c | 4 ++--
> 1 file changed,
ed-off-by: Petr Pavlu
> Reviewed-by: Sami Tolvanen
> ---
> kernel/module/main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index 9ac994b2f354..7822b91fca6b 100644
> --- a/kernel/module/main.c
>
All error conditions in move_module() set the return value by updating the
ret variable. Therefore, it is not necessary to the initialize the variable
when declaring it.
Remove the unnecessary initialization.
Signed-off-by: Petr Pavlu
Reviewed-by: Sami Tolvanen
---
kernel/module/main.c | 3
reasons as well, in which case t remains set to 0 and no memory is freed.
Fix the problem by initializing t to MOD_MEM_NUM_TYPES. Additionally, make
the deallocation loop more robust by not relying on the mod_mem_type_t enum
having a signed integer as its underlying type.
Fixes: c7ee8aebf6c0 ("m
/linux-modules/20250607161823.409691-1-petr.pa...@suse.com/
Petr Pavlu (2):
module: Fix memory deallocation on error path in move_module()
module: Avoid unnecessary return value initialization in move_module()
kernel/module/main.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions
>> One thing though, we are "releasing" the memory even if we have skipped the
>> allocation in the first place. So, I think it would make sense to release
>> only
>> for the types we have actually allocated. What do you think?
>
> I noticed this too, specifically because move_module() is inco
On 6/17/25 11:47 AM, Daniel Gomez wrote:
>> Do you mean the following, or something else:
>>
>> static int move_module(struct module *mod, struct load_info *info)
>> {
>> int i;
>> enum mod_mem_type t = MOD_MEM_NUM_TYPES;
>> int ret;
On Tue, Jun 17, 2025 at 2:27 AM Petr Pavlu wrote:
>
> On 6/10/25 6:22 PM, Casey Chen wrote:
> > The empty MOD_CODETAG_SECTIONS() macro added an incomplete .data
> > section in module linker script, which caused symbol lookup tools
> > like gdb to misinterp
> Do you mean the following, or something else:
>
> static int move_module(struct module *mod, struct load_info *info)
> {
> int i;
> enum mod_mem_type t = MOD_MEM_NUM_TYPES;
> int ret;
> bool codetag_section_found = false;
>
>
On 6/10/25 6:22 PM, Casey Chen wrote:
> The empty MOD_CODETAG_SECTIONS() macro added an incomplete .data
> section in module linker script, which caused symbol lookup tools
> like gdb to misinterpret symbol addresses e.g., __ib_process_cq
> incorrectly mapping to unrelated function
On 6/12/25 4:53 PM, Thomas Weißschuh wrote:
> The struct was moved to the public header file in
> commit c8e21ced08b3 ("module: fix kdb's illicit use of struct module_use.").
> Back then the structure was used outside of the module core.
> Nowadays this is not true anymo
y earlier suggestion was incorrect. We can simply initialize the memory
> type t to MOD_MEM_NUM_TYPES since it's only used in the error path of
> module_memory_alloc().
Do you mean the following, or something else:
static int move_module(struct module *mod, struct load_i
> This seems to be off by one. For instance, if the loop reaches the last
> valid type in mod_mem_type, MOD_INIT_RODATA, and successfully allocates
> its memory, the variable t gets set to MOD_INIT_RODATA. Subsequently, if
> an error occurs later in move_module() and control is transferred to
> out
Move netpoll_parse_ip_addr() and netpoll_parse_options() from the generic
netpoll module to the netconsole module where they are actually used.
These functions were originally placed in netpoll but are only consumed by
netconsole. This refactoring improves code organization by:
- Removing
On Fri, May 09, 2025 at 01:16:24PM -0700, Josh Poimboeuf wrote:
> I've tested with a variety of patches on defconfig and Fedora-config
> kernels with both GCC and Clang.
>
> These patches can also be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git
> klp-build-v2
The struct was moved to the public header file in
commit c8e21ced08b3 ("module: fix kdb's illicit use of struct module_use.").
Back then the structure was used outside of the module core.
Nowadays this is not true anymore, so the structure can be made internal.
Signed-off-by: T
MODULE_STATE_COMING,/* Full formed, running module_init. */
@@ -598,6 +587,18 @@ struct module {
struct _ddebug_info dyndbg_info;
#endif
} cacheline_aligned __randomize_layout;
+
+#ifdef CONFIG_MODULES
+
+extern int modules_disabled; /* for sysctl */
+/* Get/put a kernel symbol
Code using IS_ENABLED(CONFIG_MODULES) as a C expression may need access
to the module structure definitions to compile.
Make sure these structure definitions are always visible.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3):
module: move 'struct module_use' to
When we add parameter support to the module macro, we want to be able to
pass a reference to `ModuleInfo` to a helper function. That is not possible
when we move out of the local `modinfo`. So change the function to access
the local via reference rather than value.
Signed-off-by: Andreas Hindborg
Allow module parameters to be declared in the rust `module!` macro.
Signed-off-by: Andreas Hindborg
---
rust/macros/helpers.rs | 25 +++
rust/macros/lib.rs | 31 +
rust/macros/module.rs | 175 ++---
3 files changed, 221 insertions
/module_param.rs
new file mode 100644
index ..fd167df8e53d
--- /dev/null
+++ b/rust/kernel/module_param.rs
@@ -0,0 +1,201 @@
+// SPDX-License-Identifier: GPL-2.0
+
+//! Support for module parameters.
+//!
+//! C header:
[`include/linux/moduleparam.h`](srctree/include/linux/moduleparam.h)
+
+use
Showcase the rust module parameter support by adding a module parameter to
the `rust_minimal` sample.
Signed-off-by: Andreas Hindborg
---
samples/rust/rust_minimal.rs | 10 ++
1 file changed, 10 insertions(+)
diff --git a/samples/rust/rust_minimal.rs b/samples/rust/rust_minimal.rs
Extend the `module!` macro with support module parameters. Also add some string
to integer parsing functions and updates `BStr` with a method to strip a string
prefix.
Based on code by Adam Bratschi-Kaye lifted from the original `rust` branch [1].
Link:
https://github.com/Rust-for-Linux/linux
; +/// Parse a token stream of the form `expected_name: "value",` and return
>>>> the
>>>> +/// string in the position of "value".
>>>> +///
>>>> +/// # Panics
>>>> +///
>>>> +/// - On parse error.
>>>>
test it by directly inserting errors in
move_module().
>
>>
>> Fix the problem by setting t to MOD_MEM_NUM_TYPES after all memory types
>> have been allocated. Additionally, make the deallocation loop more robust
>> by not relying on the mod_mem_type_t enum having a signed intege
cs
>>> +///
>>> +/// - On parse error.
>>> +pub(crate) fn expect_string_field(it: &mut token_stream::IntoIter,
>>> expected_name: &str) -> String {
>>> +assert_eq!(expect_ident(it), expected_name);
>>> +assert_eq!(expect_punct(it
Move netpoll_parse_ip_addr() and netpoll_parse_options() from the generic
netpoll module to the netconsole module where they are actually used.
These functions were originally placed in netpoll but are only consumed by
netconsole. This refactoring improves code organization by:
- Removing
"Miguel Ojeda" writes:
> On Wed, Jun 11, 2025 at 2:24 PM Andreas Hindborg
> wrote:
>>
>> So either we need to `#[allow(missing_docs)]` or just add the line back.
>> What do you prefer?
>
> Do you mean if you remove the `concat!` too, right?
Yes, all of it.
>
> It would need to be `expect`, b
On Wed, May 7, 2025 at 1:23 PM Benno Lossin wrote:
>
> > +unsafe extern "C" fn set_param(
> > +val: *const kernel::ffi::c_char,
> > +param: *const crate::bindings::kernel_param,
> > +) -> core::ffi::c_int
New instance of `core::ffi::` (and both these `c_*` should be unqualified).
Cheers,
On Wed, Jun 11, 2025 at 2:24 PM Andreas Hindborg wrote:
>
> So either we need to `#[allow(missing_docs)]` or just add the line back. What
> do you prefer?
Do you mean if you remove the `concat!` too, right?
It would need to be `expect`, but I think even an
`expect(missing_docs)` is not really u
Andreas Hindborg writes:
> "Benno Lossin" writes:
>
>> On Tue May 6, 2025 at 3:02 PM CEST, Andreas Hindborg wrote:
>>> Add support for module parameters to the `module!` macro. Implement read
>>> only support for integer types without `sysfs` suppo
"Benno Lossin" writes:
> On Tue May 6, 2025 at 3:02 PM CEST, Andreas Hindborg wrote:
>> Add support for module parameters to the `module!` macro. Implement read
>> only support for integer types without `sysfs` support.
>>
>> Acked-by: Petr Pavlu # from mod
ed-off-by: Petr Pavlu
Reviewed-by: Daniel Gomez
> ---
> kernel/module/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index 322b38c0a782..06511607075c 100644
> --- a/kernel/module/main.c
> +++ b/kernel
ocated. Additionally, make the deallocation loop more robust
> by not relying on the mod_mem_type_t enum having a signed integer as its
> underlying type.
>
> Fixes: c7ee8aebf6c0 ("module: add stop-grap sanity check on module memcpy()")
> Signed-off-by: Petr Pavlu
> ---
> ker
The empty MOD_CODETAG_SECTIONS() macro added an incomplete .data
section in module linker script, which caused symbol lookup tools
like gdb to misinterpret symbol addresses e.g., __ib_process_cq
incorrectly mapping to unrelated functions like below.
(gdb) disas __ib_process_cq
Dump of
Move netpoll_parse_ip_addr() and netpoll_parse_options() from the generic
netpoll module to the netconsole module where they are actually used.
These functions were originally placed in netpoll but are only consumed by
netconsole. This refactoring improves code organization by:
- Removing
initial per-cpu support for modules. The relocation
> handling at that point appears correct to me. I think it's the mentioned patch
> "Don't relocate non-allocated regions in modules" that broke it.
Ach, it ignores that bit. Okay then.
> It seems logical to me
;
> Signed-off-by: Petr Pavlu
> ---
> kernel/module/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index 322b38c0a782..06511607075c 100644
> --- a/kernel/module/main.c
> +++ b/kernel/mod
to MOD_MEM_NUM_TYPES after all memory types
> > have been allocated. Additionally, make the deallocation loop more robust
> > by not relying on the mod_mem_type_t enum having a signed integer as its
> > underlying type.
> >
> > Fixes: c7ee8aebf6c0 ("module: add stop-gr
robust
> by not relying on the mod_mem_type_t enum having a signed integer as its
> underlying type.
>
> Fixes: c7ee8aebf6c0 ("module: add stop-grap sanity check on module memcpy()")
> Signed-off-by: Petr Pavlu
> ---
> kernel/module/main.c | 7 ---
> 1 file c
underlying type.
Fixes: c7ee8aebf6c0 ("module: add stop-grap sanity check on module memcpy()")
Signed-off-by: Petr Pavlu
---
kernel/module/main.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 08b59c37735e..322b38c0a
All error conditions in move_module() set the return value by updating the
ret variable. Therefore, it is not necessary to the initialize the variable
when declaring it.
Remove the unnecessary initialization.
Signed-off-by: Petr Pavlu
---
kernel/module/main.c | 2 +-
1 file changed, 1
The first patch is an actual fix. The second patch is a minor related
cleanup.
Petr Pavlu (2):
module: Fix memory deallocation on error path in move_module()
module: Avoid unnecessary return value initialization in move_module()
kernel/module/main.c | 9 +
1 file changed, 5
On Wed, Jun 4, 2025 at 5:50 PM Petr Pavlu wrote:
>
> On 6/2/25 12:55 PM, Masahiro Yamada wrote:
> > The __mod_device_table__* symbols are only parsed by modpost to generate
> > MODULE_ALIAS() entries from MODULE_DEVICE_TABLE().
> >
> > Therefore, these symbols do not need to be globally visible, o
.sh_flags &= ~(unsigned long)SHF_ALLOC;
> + }
>
> so this looks like the origin.
This patch added the initial per-cpu support for modules. The relocation
handling at that point appears correct to me. I think it's the mentioned patch
"Don't relocate non-alloc
dralign);
+ if (!mod->percpu) {
+ err = -ENOMEM;
+ goto free_mod;
+ }
+ sechdrs[pcpuindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
+ }
so this looks like the origin.
…
> > --- a/kernel/module/main.c
> > +++ b/kernel/
On Thu, Jun 05, 2025 at 03:44:23PM +0200, Petr Pavlu wrote:
> For instance:
>
> /*
>* Don't bother with non-allocated sections.
>*
>* An exception is the percpu section, which has separate allocations
>* for individual CPUs. We relocate the percpu section in
or the per-CPU section (if found) after
> move_module().
>
> Reported-by: kernel test robot
> Closes: https://lore.kernel.org/oe-lkp/202506041623.e45e4f7d-...@intel.com
> Fixes: 8d8022e8aba85 ("module: do percpu allocation after uniqueness check.
> No, really!")
Isn't
e4f7d-...@intel.com
Fixes: 8d8022e8aba85 ("module: do percpu allocation after uniqueness check.
No, really!")
Signed-off-by: Sebastian Andrzej Siewior
---
v1…v2: https://lore.kernel.org/all/20250604152707.cied9...@linutronix.de/
- Add the flag back only on SMP if the per-CPU section was
e and must remain writable. While
> > > SHF_WRITE is ignored by vmlinux, it's still needed for modules.
> > >
> > > To work around the linker interference, remove SHF_WRITE during
> > > compilation and restore it after linking the module.
> >
> &
modules.
> >
> > To work around the linker interference, remove SHF_WRITE during
> > compilation and restore it after linking the module.
>
> *groan*
>
> This and the following patches marking a whole bunch of sections M,
> seems to suggest you're going to rely o
e4f7d-...@intel.com
Fixes: 8d8022e8aba85 ("module: do percpu allocation after uniqueness check.
No, really!")
Signed-off-by: Sebastian Andrzej Siewior
---
kernel/module/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/module/main.c b/kernel/module/main.c
inde
On 6/2/25 12:55 PM, Masahiro Yamada wrote:
> The __mod_device_table__* symbols are only parsed by modpost to generate
> MODULE_ALIAS() entries from MODULE_DEVICE_TABLE().
>
> Therefore, these symbols do not need to be globally visible, or globally
> unique.
>
> If they are in the global scope, we
: characters such as commas (,) and
hyphens (-) are not allowed in C identifiers, so they were replaced
with underscores (_) in Kbuild.
Since commit f83b5e323f57 ("kbuild: set correct KBUILD_MODNAME when
using well known kernel symbols as module names"), KBUILD_MODNAME has
been passed to C a
ens (-) are not allowed in C identifiers, so they were replaced
> with underscores (_) in Kbuild.
>
> Since commit f83b5e323f57 ("kbuild: set correct KBUILD_MODNAME when
> using well known kernel symbols as module names"), KBUILD_MODNAME has
> been passed to C as a string literal
Kbuild.
Since commit f83b5e323f57 ("kbuild: set correct KBUILD_MODNAME when
using well known kernel symbols as module names"), KBUILD_MODNAME has
been passed to C as a string literal, which allows any characters.
Aside from this historical behavior in the build system, there is no
longe
/module.h
+++ b/include/linux/module.h
@@ -249,8 +249,8 @@ struct module_kobject
*lookup_or_create_module_kobject(const char *name);
#ifdef MODULE
/* Creates an alias so file2alias.c can find device table. */
#define MODULE_DEVICE_TABLE(type, name)
\
-extern
lly considered this. From what I can tell, kprobe is the
only non-arch-specific code that takes this mutex when touching kernel
text. Though my understanding of kprobe is very limited, I think there
could be a risk due to the late relocations for livepatch:
Suppose I apply a livepatch 'L' that
On Thu 2025-05-22 20:52:04, Dylan Hatch wrote:
> Late module relocations are an issue on any arch that supports
> livepatch, so move the text_mutex locking to the livepatch core code.
>
> Signed-off-by: Dylan Hatch
> Acked-by: Song Liu
> ---
> arch/x86/kernel/module.c |
On 5/22/25 09:17, Masahiro Yamada wrote:
> When MODULE_IMPORT_NS() is missing, "make nsdeps" runs the Coccinelle
> script to automatically add MODULE_IMPORT_NS() to each module.
>
> This should not occur for users of EXPORT_SYMBOL_GPL_FOR_MODULES(), which
> is intende
licitly forbids combining with SHF_MERGE.
>
> Those sections are modified at runtime and must remain writable. While
> SHF_WRITE is ignored by vmlinux, it's still needed for modules.
>
> To work around the linker interference, remove SHF_WRITE during
> compilation and restor
On Thu, May 22, 2025 at 6:04 PM Alexei Starovoitov
wrote:
>
> On Wed, May 21, 2025 at 8:00 AM Alan Maguire wrote:
> >
> > > Hi Alan,
> > >
> > > Thanks for taking a look at this. I've been following your related effort
> > > to allow /s
Hi Dylan,
> Late relocations (after the module is initially loaded) are needed when
> livepatches change module code. This is supported by x86, ppc, and s390.
> This series borrows the x86 methodology to reach the same level of support on
> arm64, and moves the text-poke locking i
On Wed, May 21, 2025 at 8:00 AM Alan Maguire wrote:
>
> > Hi Alan,
> >
> > Thanks for taking a look at this. I've been following your related effort
> > to allow /sys/kernel/btf/vmlinux as a module in support of small systems
> > with kernel-size constrain
To enable late module patching, livepatch modules need to be able to
apply some of their relocations well after being loaded. In this
scenario, use the text-poking API to allow this, even with
STRICT_MODULE_RWX.
This patch is partially based off commit 88fc078a7a8f6 ("x86/module: Use
text
Late module relocations are an issue on any arch that supports
livepatch, so move the text_mutex locking to the livepatch core code.
Signed-off-by: Dylan Hatch
Acked-by: Song Liu
---
arch/x86/kernel/module.c | 8 ++--
kernel/livepatch/core.c | 18 +-
2 files changed, 15
Late relocations (after the module is initially loaded) are needed when
livepatches change module code. This is supported by x86, ppc, and s390.
This series borrows the x86 methodology to reach the same level of
support on arm64, and moves the text-poke locking into the core livepatch
code to
On Thu, May 22, 2025 at 11:43 AM Dylan Hatch wrote:
> -static int reloc_data(enum aarch64_reloc_op op, void *place, u64 val, int
> len)
> +static int reloc_data(enum aarch64_reloc_op op, void *place, u64 val, int
> len,
> + struct module *me)
> {
On Thu, May 22, 2025 at 11:43 AM Dylan Hatch wrote:
>
> Late module relocations are an issue on any arch that supports
> livepatch, so move the text_mutex locking to the livepatch core code.
>
> Signed-off-by: Dylan Hatch
Acked-by: Song Liu
Late module relocations are an issue on any arch that supports
livepatch, so move the text_mutex locking to the livepatch core code.
Signed-off-by: Dylan Hatch
---
arch/x86/kernel/module.c | 8 ++--
kernel/livepatch/core.c | 18 +-
2 files changed, 15 insertions(+), 11
Late relocations (after the module is initially loaded) are needed when
livepatches change module code. This is supported by x86, ppc, and s390.
This series borrows the x86 methodology to reach the same level of
support on arm64, and moves the text-poke locking into the core livepatch
code to
To enable late module patching, livepatch modules need to be able to
apply some of their relocations well after being loaded. In this
scenario, use the text-poking API to allow this, even with
STRICT_MODULE_RWX.
This patch is partially based off commit 88fc078a7a8f6 ("x86/module: Use
text
When MODULE_IMPORT_NS() is missing, "make nsdeps" runs the Coccinelle
script to automatically add MODULE_IMPORT_NS() to each module.
This should not occur for users of EXPORT_SYMBOL_GPL_FOR_MODULES(), which
is intended to export a symbol to a specific module only. In such cases,
explici
On Wed, May 21, 2025 at 9:08 PM Masahiro Yamada wrote:
>
> I think the patch subject is stale.
>
> MODULE_ was the prefix in the previous v2 series.
>
> Now, the prefix part is module:
I will apply with the subject fixed, as "MODULE_" prefix does not make
sense any
On Sat, May 17, 2025 at 4:19 PM Masahiro Yamada wrote:
>
> On Fri, May 2, 2025 at 11:26 PM Peter Zijlstra wrote:
> >
> > Designate the "module:${modname}" symbol namespace to mean: 'only
> > export to the named module'.
> >
> > Notably
On Wed, May 21, 2025 at 2:04 PM Casey Chen wrote:
>
> On Wed, May 21, 2025 at 9:06 AM Suren Baghdasaryan wrote:
> >
> > Failures inside codetag_load_module() are currently ignored. As a
> > result an error there would not cause a module load failure and freeing
> &g
On Wed, May 21, 2025 at 9:06 AM Suren Baghdasaryan wrote:
>
> Failures inside codetag_load_module() are currently ignored. As a
> result an error there would not cause a module load failure and freeing
> of the associated resources. Correct this behavior by propagating the
> er
> Hi Alan,
>
> Thanks for taking a look at this. I've been following your related effort
> to allow /sys/kernel/btf/vmlinux as a module in support of small systems
> with kernel-size constraints, and wondered how this series might affect
> that work? Such support would
Failures inside codetag_load_module() are currently ignored. As a
result an error there would not cause a module load failure and freeing
of the associated resources. Correct this behavior by propagating the
error code to the caller and handling possible errors. With this change,
error to allocate
I think the patch subject is stale.
MODULE_ was the prefix in the previous v2 series.
Now, the prefix part is module:
On Fri, May 2, 2025 at 11:25 PM Peter Zijlstra wrote:
>
> Instead of only accepting "module:${name}", extend it with a comma
> separated list of module name
On Mon, May 19, 2025 at 9:46 AM Suren Baghdasaryan wrote:
>
> On Mon, May 19, 2025 at 9:38 AM David Wang <00107...@163.com> wrote:
> >
> > When module load fails after memory for codetag section is ready,
> > codetag section memory will not be properly released. Th
On Mon, May 19, 2025 at 9:38 AM David Wang <00107...@163.com> wrote:
>
> When module load fails after memory for codetag section is ready,
> codetag section memory will not be properly released. This
> causes memory leak, and if next module load happens to get the
> same mo
When module load fails after memory for codetag section is ready,
codetag section memory will not be properly released. This
causes memory leak, and if next module load happens to get the
same module address, codetag may pick the uninitialized section
when manipulating tags during module unload
At 2025-05-20 00:03:16, "Suren Baghdasaryan" wrote:
>On Sun, May 18, 2025 at 3:12 AM David Wang <00107...@163.com> wrote:
>>
>> When module load failed after memory for codetag sections ready,
>
>nit: s/ready/is ready
>
>> codetag section memory wa
On Sun, May 18, 2025 at 3:12 AM David Wang <00107...@163.com> wrote:
>
> When module load failed after memory for codetag sections ready,
nit: s/ready/is ready
> codetag section memory was not properly released. This
> causes memory leak, and if next module load happens
On Thu, May 15, 2025 at 02:45:22PM +0200, Petr Pavlu wrote:
> On 5/15/25 12:04, Joel Granados wrote:
> > On Thu, May 15, 2025 at 10:04:53AM +0200, Petr Pavlu wrote:
> >> On 5/9/25 14:54, Joel Granados wrote:
> >>> Move module sysctl (modprobe_path and modules_disab
plicitly limiting the usage of certain exports, the abuse
>>> potential/risk is greatly reduced.
>>>
>>> Changes since v2:
>>>
>>> - switch to "module:" prefix (Masahiro)
>>> - removed some patch noise (Masahiro)
>>> - st
When module load failed after memory for codetag sections ready,
codetag section memory was not properly released. This
causes memory leak, and if next module load happens to got the
same module address, codetag may pick the uninitialized section
when manipulating tags during module unload, and
On Fri, May 2, 2025 at 11:26 PM Peter Zijlstra wrote:
>
> Designate the "module:${modname}" symbol namespace to mean: 'only
> export to the named module'.
>
> Notably, explicit imports of anything in the "module:" space is
> forbidden.
>
> Si
On Fri, May 2, 2025 at 11:26 PM Peter Zijlstra wrote:
>
> Designate the "module:${modname}" symbol namespace to mean: 'only
> export to the named module'.
>
> Notably, explicit imports of anything in the "module:" space is
> forbidden.
>
>
t; potential/risk is greatly reduced.
> >
> > Changes since v2:
> >
> > - switch to "module:" prefix (Masahiro)
> > - removed some patch noise (Masahiro)
> > - strstarts() and strlen() usage for prefixes (Masahiro)
> > - simpler ___EXPORT_SYMB
On 5/15/25 12:04, Joel Granados wrote:
> On Thu, May 15, 2025 at 10:04:53AM +0200, Petr Pavlu wrote:
>> On 5/9/25 14:54, Joel Granados wrote:
>>> Move module sysctl (modprobe_path and modules_disabled) out of sysctl.c
>>> and into the modules subsystem. Make the mo
On Thu, May 15, 2025 at 10:04:53AM +0200, Petr Pavlu wrote:
> On 5/9/25 14:54, Joel Granados wrote:
> > Move module sysctl (modprobe_path and modules_disabled) out of sysctl.c
> > and into the modules subsystem. Make the modprobe_path variable static
> > as it no longer
On 5/9/25 14:54, Joel Granados wrote:
> Move module sysctl (modprobe_path and modules_disabled) out of sysctl.c
> and into the modules subsystem. Make the modprobe_path variable static
> as it no longer needs to be exported. Remove module.h from the includes
> in sysctl as it no lon
On 5/2/25 16:12, Peter Zijlstra wrote:
> Hi!
>
> Implement means for exports to be available to an explicit list of named
> modules. By explicitly limiting the usage of certain exports, the abuse
> potential/risk is greatly reduced.
>
> Changes since v2:
>
> -
On 5/2/25 16:12, Peter Zijlstra wrote:
> Helper macro to more easily limit the export of a symbol to a given
> list of modules.
>
> Eg:
>
> EXPORT_SYMBOL_GPL_FOR_MODULES(preempt_notifier_inc, "kvm");
>
> will limit the use of said function to kvm.ko, any
1 - 100 of 6991 matches
Mail list logo