: 39f54262ba499d862420a97719d2f0eea0cbd394
patch link:
https://lore.kernel.org/r/20250211-b4-ovpn-v19-25-86d5daf2a47a%40openvpn.net
patch subject: [PATCH net-next v19 25/26] testing/selftests: add test tool and
scripts for ovpn module
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build
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.
Signed-off-by: Andreas Hindborg
---
rust/kernel/lib.rs | 1 +
rust/kernel/module_param.rs | 225
This series extends the `module!` macro with support module parameters. It
also adds some string to integer parsing functions and updates `BStr` with
a method to strip a string prefix.
This series stated out as code by Adam Bratschi-Kaye lifted from the original
`rust` branch [1].
After a bit of
The ovpn-cli tool can be compiled and used as selftest for the ovpn
kernel module.
[NOTE: it depends on libmedtls for decoding base64-encoded keys]
ovpn-cli implements the netlink and RTNL APIs and can thus be integrated
in any script for more automated testing.
Along with the tool, 4 scripts
counters HPMN..N are only accessible by EL2.
Introduce a module parameter in the PMUv3 driver to set this
register. The name reserved_host_counters reflects the intent to
reserve some counters for the host so the guest may eventually be
allowed direct access to a subset of PMU functionality for
gt; Introduce a module parameter in the PMUv3 driver to set this
> register. The name reserved_host_counters reflects the intent to
> reserve some counters for the host so the guest may eventually be
> allowed direct access to a subset of PMU functionality for increased
> performance.
Fixed multiple spelling issues in the kselftests bpf modules.
Signed-off-by: Armin
---
tools/testing/selftests/bpf/Makefile| 2 +-
tools/testing/selftests/bpf/bench.c | 2 +-
tools/testing/selftests/bpf/prog_tests/btf_dump.c | 2 +-
tools
For PMUv3, the register MDCR_EL2.HPMN partitiones the PMU counters
into two ranges where counters 0..HPMN-1 are accessible by EL1 and, if
allowed, EL0 while counters HPMN..N are only accessible by EL2.
Introduce a module parameter in the PMUv3 driver to set this
register. The name
> modules. By explicitly limiting the usage of certain exports, the abuse
> >> potential/risk is greatly reduced.
> >>
> >> The first 'patch' is an awk scripts that cleans up the existing module
> >> namespace code along the same lines of commit 33d
mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1553,6 +1553,16 @@ static void mod_set_crcs(struct module *
> free(buf);
> }
>
> +static const char *mod_basename(const char *modname)
> +{
> + const char *basename = strrchr(modname, '/');
> +
The commit subject prefix should be "modpost: "
instead of "module/modpost: "
You are touching only modpost in this patch.
On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote:
>
>
> Signed-off-by: Peter Zijlstra (Intel)
> ---
> scripts/mod/modpost.c
On Tue, Dec 3, 2024 at 12:11 AM 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. Modules
On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote:
>
> Instead of only accepting "MODULE_${name}", extend it with a comma
> separated list of module names and add tail glob support.
>
> That is, something like: "MODULE_foo-*,bar" is now possible.
>
On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote:
Please add a commit description.
>
> Signed-off-by: Peter Zijlstra (Intel)
> ---
> scripts/mod/modpost.c |7 ++-
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@
On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote:
>
> Instead of only accepting "MODULE_${name}", extend it with a comma
> separated list of module names and add tail glob support.
>
> That is, something like: "MODULE_foo-*,bar" is now possible.
>
On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote:
>
Commit description is needed.
[bikeshed]
Perhaps, I slightly prefer EXPORT_SYMBOL_GPL_FOR_MODULES().
>
> -#define ___EXPORT_SYMBOL(sym, license, ns) \
> +/*
> + * LLVM intregrated assembler refuses to merge adjacent string
tial/risk is greatly reduced.
>>
>> The first 'patch' is an awk scripts that cleans up the existing module
>> namespace code along the same lines of commit 33def8498fdd ("treewide:
>> Convert
>> macro and uses of __section(foo) to __section("foo
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.
Signed-off-by: Andreas Hindborg
---
rust/kernel/lib.rs | 1 +
rust/kernel/module_param.rs | 225
This series extends the `module!` macro with support module parameters. It
also adds some string to integer parsing functions and updates `BStr` with
a method to strip a string prefix.
This series stated out as code by Adam Bratschi-Kaye lifted from the original
`rust` branch [1].
After a bit of
Colton Lewis writes:
Marc Zyngier writes:
On Tue, 28 Jan 2025 22:08:27 +,
Colton Lewis wrote:
>> + bitmap_set(cpu_pmu->cntr_mask, 0, pmcr_n);
>> +
>> + if (reserved_guest_counters > 0 && reserved_guest_counters <
pmcr_n) {
>> + cpu_pmu->hpmn = reserved_guest_c
This commit adds a test_boost_holdoff module parameter that tells the RCU
priority-boosting tests to wait for the specified number of seconds past
the start of the rcutorture test. This can be useful when rcutorture
is built into the kernel (as opposed to being modprobed), especially on
large
On 1/29/25 09:52, Sebastian Andrzej Siewior wrote:
> On 2025-01-27 13:22:17 [+0100], Petr Pavlu wrote:
>> On 1/24/25 18:49, Sebastian Andrzej Siewior wrote:
>>> On 2025-01-13 12:09:27 [+0100], Petr Pavlu wrote:
Thanks for this cleanup. I've queued the fix in patch #1 on
modules-fixes. For
Marc Zyngier writes:
On Tue, 28 Jan 2025 22:08:27 +,
Colton Lewis wrote:
>> + bitmap_set(cpu_pmu->cntr_mask, 0, pmcr_n);
>> +
>> + if (reserved_guest_counters > 0 && reserved_guest_counters <
pmcr_n) {
>> + cpu_pmu->hpmn = reserved_guest_counters;
>> +
On Tue, 28 Jan 2025 22:08:27 +,
Colton Lewis wrote:
>
> >> + bitmap_set(cpu_pmu->cntr_mask, 0, pmcr_n);
> >> +
> >> + if (reserved_guest_counters > 0 && reserved_guest_counters < pmcr_n) {
> >> + cpu_pmu->hpmn = reserved_guest_counters;
> >> + cpu_pmu->partitioned = true;
On 2025-01-27 13:22:17 [+0100], Petr Pavlu wrote:
> On 1/24/25 18:49, Sebastian Andrzej Siewior wrote:
> > On 2025-01-13 12:09:27 [+0100], Petr Pavlu wrote:
> >> Thanks for this cleanup. I've queued the fix in patch #1 on
> >> modules-fixes. For the rest, I plan to give folks more time to look at
>
Colton Lewis writes:
Hey Marc, thanks for looking.
*for the review
Marc Zyngier writes:
On Mon, 27 Jan 2025 22:20:27 +,
Colton Lewis wrote:
/* Read the nb of CNTx counters supported from PMNC */
- bitmap_set(cpu_pmu->cntr_mask,
- 0, FIELD_GET(ARM
or 'cpu_pmu->hpmn != pmcr_n'.
Yes, because code outside this module that isn't already reading PMCR.N
will need to know the result of that comparion.
+ } else {
+ reserved_guest_counters = 0;
+ cpu_pmu->hpmn = pmcr_n;
+ cpu
accessible by EL2.
Introduce a module parameter in the PMUv3 driver to set this
register. The name reserved_guest_counters reflects the intent to
reserve some counters for the guest so they may eventually be allowed
direct access to a subset of PMU functionality for increased
performance
On Mon, Jan 27, 2025 at 4:26 PM Colton Lewis wrote:
>
> For PMUv3, the register MDCR_EL2.HPMN partitiones the PMU counters
> into two ranges where counters 0..HPMN-1 are accessible by EL1 and, if
> allowed, EL0 while counters HPMN..N are only accessible by EL2.
>
> Introduce a m
On Mon, 27 Jan 2025 22:20:27 +,
Colton Lewis wrote:
>
> For PMUv3, the register MDCR_EL2.HPMN partitiones the PMU counters
> into two ranges where counters 0..HPMN-1 are accessible by EL1 and, if
> allowed, EL0 while counters HPMN..N are only accessible by EL2.
>
>
For PMUv3, the register MDCR_EL2.HPMN partitiones the PMU counters
into two ranges where counters 0..HPMN-1 are accessible by EL1 and, if
allowed, EL0 while counters HPMN..N are only accessible by EL2.
Introduce a module parameter in the PMUv3 driver to set this
register. The name
On 1/24/25 18:49, Sebastian Andrzej Siewior wrote:
> On 2025-01-13 12:09:27 [+0100], Petr Pavlu wrote:
>> Thanks for this cleanup. I've queued the fix in patch #1 on
>> modules-fixes. For the rest, I plan to give folks more time to look at
>> the changes as this affects a number of subsystems. If t
On 2025-01-13 12:09:27 [+0100], Petr Pavlu wrote:
> Thanks for this cleanup. I've queued the fix in patch #1 on
> modules-fixes. For the rest, I plan to give folks more time to look at
> the changes as this affects a number of subsystems. If there are no
> other concerns, I'd then add the series on
"Petr Pavlu" writes:
> On 1/9/25 11:54, Andreas Hindborg wrote:
>> 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.
>>
[cut]
&
On 1/9/25 11:54, Andreas Hindborg wrote:
> 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.
>
> Signed-off-by: Andreas Hindborg
> ---
>
This commit adds a test_boost_holdoff module parameter that tells the RCU
priority-boosting tests to wait for the specified number of seconds past
the start of the rcutorture test. This can be useful when rcutorture
is built into the kernel (as opposed to being modprobed), especially on
large
follow the naming scheme of
the existing sample modules. Also only one version of the test
module and one version of the livepatch module is built.
Signed-off-by: Petr Mladek
---
samples/livepatch/Makefile| 5 +-
.../livepatch/livepatch-callbacks-busymod.c | 60
Substitute hard-coded /sys/module path with $SYSFS_MODULE_DIR.
It is going to be used even more often in the upcoming selftests.
Signed-off-by: Petr Mladek
---
tools/testing/selftests/livepatch/functions.sh | 18 ++
.../selftests/livepatch/test-callbacks.sh | 2 +-
2 files
On 1/10/25 20:16, Luis Chamberlain wrote:
> On Thu, Jan 09, 2025 at 11:52:27AM +0100, Arnout Engelen wrote:
>> On Fri, 3 Jan 2025 17:37:52 -0800, Luis Chamberlain wrote:
>>> What distro which is using module signatures would switch
>>> to this as an alternative instead?
On 2025-01-13 12:09:27 [+0100], Petr Pavlu wrote:
> Thanks for this cleanup. I've queued the fix in patch #1 on
> modules-fixes. For the rest, I plan to give folks more time to look at
> the changes as this affects a number of subsystems. If there are no
> other concerns, I'd then add the series on
On 1/8/25 10:04, Sebastian Andrzej Siewior wrote:
> This is an updated version of the initial post after PeterZ made me
> aware that there are users outside of the module directory.
> The goal is replace the mix auf rcu_read_lock(), rcu_read_lock_sched()
> and preempt_disable
The ovpn-cli tool can be compiled and used as selftest for the ovpn
kernel module.
[NOTE: it depends on libmedtls for decoding base64-encoded keys]
ovpn-cli implements the netlink and RTNL APIs and can thus be integrated
in any script for more automated testing.
Along with the tool, 4 scripts
On January 4, 2025 2:37 am, Luis Chamberlain wrote:
> On Wed, Dec 25, 2024 at 11:52:00PM +0100, Thomas Weißschuh wrote:
>> diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig
>> index
>> 7b329057997ad2ec310133ca84617d9bfcdb7e9f..57d317a6fa444195d0806e6bd7a2af6e338a7f0
Hey Jakub,
I just realized that I forgot to fix the nla_get_uint clash triggered on
Fedora.
However, I'd rather not send a new patchset right away...
Maybe we will be happy with this version and then I will just resend
this patch alone.
Best Regards,
--
Antonio Quartulli
OpenVPN Inc.
The ovpn-cli tool can be compiled and used as selftest for the ovpn
kernel module.
[NOTE: it depends on libmedtls for decoding base64-encoded keys]
ovpn-cli implements the netlink and RTNL APIs and can thus be integrated
in any script for more automated testing.
Along with the tool, 4 scripts
On Thu, Jan 09, 2025 at 11:52:27AM +0100, Arnout Engelen wrote:
> On Fri, 3 Jan 2025 17:37:52 -0800, Luis Chamberlain wrote:
> > What distro which is using module signatures would switch
> > to this as an alternative instead?
>
> In NixOS, we disable MODULE_SIG by defa
On Thu, Jan 09, 2025 at 02:03:39PM +0100, Andreas Hindborg wrote:
> "Greg KH" writes:
>
> > On Thu, Jan 09, 2025 at 11:54:59AM +0100, Andreas Hindborg wrote:
> >> This patch includes changes required for Rust kernel modules to utilize
> >> module pa
"Greg KH" writes:
> On Thu, Jan 09, 2025 at 11:54:59AM +0100, Andreas Hindborg wrote:
>> This patch includes changes required for Rust kernel modules to utilize
>> module parameters. This code implements read only support for integer
>> types without `sysfs` suppo
On Thu, Jan 09, 2025 at 11:54:59AM +0100, Andreas Hindborg wrote:
> 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.
I know you want to keep this simple for
This series extends the `module!` macro with support module parameters. It
also adds some string to integer parsing functions and updates `BStr` with
a method to strip a string prefix.
This series stated out as code by Adam Bratschi-Kaye lifted from the original
`rust` branch [1].
After a bit of
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.
Signed-off-by: Andreas Hindborg
---
rust/kernel/lib.rs | 1 +
rust/kernel/module_param.rs | 225
On Fri, 3 Jan 2025 17:37:52 -0800, Luis Chamberlain wrote:
> What distro which is using module signatures would switch
> to this as an alternative instead?
In NixOS, we disable MODULE_SIG by default (because we value
reproducibility over having module signatures). Enabling
MODULE_HAS
On Mon, Jan 06, 2025 at 04:13:29PM -0800, Kees Cook wrote:
> On Fri, Jan 03, 2025 at 05:13:32PM +0100, Petr Pavlu wrote:
> > On 12/5/24 20:46, Christophe Leroy wrote:
> > > This series reworks module loading to avoid leaving the module in a
> > > stale state when prote
On Sat, Jan 04, 2025 at 07:30:39AM +0100, Thomas Weißschuh wrote:
> Hi Luis,
>
> On 2025-01-03 17:37:52-0800, Luis Chamberlain wrote:
> > On Wed, Dec 25, 2024 at 11:52:00PM +0100, Thomas Weißschuh wrote:
> > > diff --git a/kernel/module/Kconfig b/kernel/mo
On 2025-01-08 10:55:04 [+0100], Helge Deller wrote:
> Nice catch.
>
> Acked-by: Helge Deller
>
> This patch really should be backported.
> Can you add a Cc: stable tag?
It should be picked due to the fixes tag. I add it if I am going to
repost it.
> Helge
Sebastian
On 1/8/25 10:04, Sebastian Andrzej Siewior wrote:
dereference_symbol_descriptor() needs to obtain the module pointer
belonging to pointer in order to resolve that pointer.
The returned mod pointer is obtained under RCU-sched/ preempt_disable()
guarantees and needs to be used within this section
add_kallsyms() assigns the RCU pointer module::kallsyms and setups the
structures behind it which point to init-data. The module was not
published yet, nothing can see the kallsyms pointer and the data behind
it. Also module's init function was not yet invoked.
There is no need t
Zijlstra (Intel)
Signed-off-by: Sebastian Andrzej Siewior
---
kernel/module/tracking.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/module/tracking.c b/kernel/module/tracking.c
index 16742d1c630c6..4fefec5b683c6 100644
--- a/kernel/module/tracking.c
+++ b/kernel/module/tracking.c
-by: Sebastian Andrzej Siewior
---
arch/arm/kernel/module-plts.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/kernel/module-plts.c b/arch/arm/kernel/module-plts.c
index da2ee8d6ef1a7..354ce16d83cb5 100644
--- a/arch/arm/kernel/module-plts.c
+++ b/arch/arm/kernel
+--
kernel/module/kallsyms.c | 5 +
kernel/module/main.c | 9 ++---
3 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index 1c6a6c1704d8d..d5dd54c53ace6 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
__module_text_address() can be invoked within a RCU section, there is no
requirement to have preemption disabled.
Replace the preempt_disable() section around __module_text_address()
with RCU.
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Sebastian Andrzej Siewior
---
kernel/module/main.c
search_module_extables() returns an exception_table_entry belonging to a
module. The lookup via __module_address() can be performed with RCU
protection.
The returned exception_table_entry remains valid because the passed
address usually belongs to a module that is currently executed. So the
module
module::kallsyms can be accessed under RCU assumption.
Use rcu_dereference() to access module::kallsyms.
Update callers.
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Sebastian Andrzej Siewior
---
kernel/module/kallsyms.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff
find_symbol() and update callers.
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Sebastian Andrzej Siewior
---
kernel/module/main.c| 30 --
kernel/module/version.c | 14 +++---
2 files changed, 19 insertions(+), 25 deletions(-)
diff --git a/kernel/module
mod_find() uses either the modules list to find a module or a tree
lookup (CONFIG_MODULES_TREE_LOOKUP). The list and the tree can both be
iterated under RCU assumption (as well as RCU-sched).
Remove module_assert_mutex_or_preempt() from __module_address() and
entirely since __module_address() is
The modules list can be accessed under RCU assumption.
Use RCU protection instead preempt_disable().
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Sebastian Andrzej Siewior
---
kernel/module/main.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/kernel/module/main.c
module::kallsyms can be accessed under RCU assumption.
Use rcu_dereference() to access module::kallsyms.
Update callers.
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Sebastian Andrzej Siewior
---
kernel/module/kallsyms.c | 17 -
1 file changed, 4 insertions(+), 13 deletions
The modules list and module::kallsyms can be accessed under RCU
assumption.
Use rcu_dereference() to reference the kallsyms pointer in
find_kallsyms_symbol(). Use a RCU section instead of preempt_disable in
callers of find_kallsyms_symbol(). Keep the preempt-disable in
module_address_lookup
The RCU usage in module was introduced in commit d72b37513cdfb ("Remove
stop_machine during module load v2") and it claimed not to be RCU but
similar. Then there was another improvement in commit e91defa26c527
("module: don't use stop_machine on module load"). It become a
dereference_symbol_descriptor() needs to obtain the module pointer
belonging to pointer in order to resolve that pointer.
The returned mod pointer is obtained under RCU-sched/ preempt_disable()
guarantees and needs to be used within this section to ensure that the
module is not removed in the
The modules list and module::kallsyms can be accessed under RCU
assumption.
Iterate the modules with RCU protection, use rcu_dereference() to access
the kallsyms pointer.
Acked-by: Peter Zijlstra (Intel)
Signed-off-by: Sebastian Andrzej Siewior
---
kernel/module/kallsyms.c | 6 ++
1 file
Hi,
This is an updated version of the initial post after PeterZ made me
aware that there are users outside of the module directory.
The goal is replace the mix auf rcu_read_lock(), rcu_read_lock_sched()
and preempt_disable() with just rcu_read_lock().
I've split it into smaller chunks whic
On 2025-01-02 13:47:06 [+0100], Christophe Leroy wrote:
> Hi Sebastian,
Hi Christophe,
> How did you generate that cover letter ?
>
> It should contain the full list of files modified by the series, so that I
> can see if any of them is of interest to me without going into each patch.
>
> This i
On Mon, Jan 06, 2025 at 04:13:29PM -0800, Kees Cook wrote:
> On Fri, Jan 03, 2025 at 05:13:32PM +0100, Petr Pavlu wrote:
> > On 12/5/24 20:46, Christophe Leroy wrote:
> > > This series reworks module loading to avoid leaving the module in a
> > > stale state when prote
On (24/12/20 18:41), Sebastian Andrzej Siewior wrote:
> dereference_symbol_descriptor() needs to obtain the module pointer
> belonging to pointer in order to resolve that pointer.
> The returned mod pointer is obtained under RCU-sched/ preempt_disable()
> guarantees and needs to be
On Fri, Dec 20, 2024 at 06:41:14PM +0100, Sebastian Andrzej Siewior wrote:
> Hi,
>
> This is an updated version of the inital post after PeterZ made me aware
> that there are users outside of the module directory.
> The goal is replace the mix auf rcu_read_lock(), rcu_read_loc
On Fri, Jan 03, 2025 at 05:13:32PM +0100, Petr Pavlu wrote:
> On 12/5/24 20:46, Christophe Leroy wrote:
> > This series reworks module loading to avoid leaving the module in a
> > stale state when protecting ro_after_init section fails.
> >
> > Once module init has
On 06.01.25 15:05, Petr Pavlu wrote:
> On 1/4/25 10:43, Thorsten Leemhuis wrote:
>> On 20.10.24 00:57, Luis Chamberlain wrote:
>>> On Wed, Oct 16, 2024 at 04:18:41PM +0200, Thorsten Leemhuis wrote:
>>>> Switch away from using sha1 for module signing by defaul
On 1/4/25 10:43, Thorsten Leemhuis wrote:
> On 20.10.24 00:57, Luis Chamberlain wrote:
>> On Wed, Oct 16, 2024 at 04:18:41PM +0200, Thorsten Leemhuis wrote:
>>> Switch away from using sha1 for module signing by default and use the
>>> more modern sha512 instead, whic
On 1/4/25 08:39, Christophe Leroy wrote:
> Le 03/01/2025 à 17:13, Petr Pavlu a écrit :
>> On 12/5/24 20:46, Christophe Leroy wrote:
>>> This series reworks module loading to avoid leaving the module in a
>>> stale state when protecting ro_after_init section fails.
&
On 20.10.24 00:57, Luis Chamberlain wrote:
> On Wed, Oct 16, 2024 at 04:18:41PM +0200, Thorsten Leemhuis wrote:
>> Switch away from using sha1 for module signing by default and use the
>> more modern sha512 instead, which is what among others Arch, Fedora,
>> RHEL, and Ubunt
ainly the earlier
described limitation of the current init_module() interface and the
consistency of the module loader interface as a whole.
Another aspect is that a number of modules is loaded directly by the
kernel via request_module(). I'm not sure how the new error would be
handled in such ca
Le 03/01/2025 à 17:13, Petr Pavlu a écrit :
On 12/5/24 20:46, Christophe Leroy wrote:
This series reworks module loading to avoid leaving the module in a
stale state when protecting ro_after_init section fails.
Once module init has succeded it is too late to cancel loading.
If setting
Hi Luis,
On 2025-01-03 17:37:52-0800, Luis Chamberlain wrote:
> On Wed, Dec 25, 2024 at 11:52:00PM +0100, Thomas Weißschuh wrote:
> > diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig
> > index
> > 7b329057997ad2ec310133ca84617d9bfcdb7e9f..57d317a6fa444195d08
On Wed, Dec 25, 2024 at 11:52:00PM +0100, Thomas Weißschuh wrote:
> diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig
> index
> 7b329057997ad2ec310133ca84617d9bfcdb7e9f..57d317a6fa444195d0806e6bd7a2af6e338a7f01
> 100644
> --- a/kernel/module/Kconfig
> +++ b/ker
ation/kbuild/gendwarfksyms.rst
@@ -0,0 +1,308 @@
+===
+DWARF module versioning
+===
+
+1. Introduction
+===
+
+When CONFIG_MODVERSIONS is enabled, symbol versions for modules
+are typically calculated from preprocessed source code using the
+**gen
On 1/3/25 15:06, Christophe Leroy wrote:
> Le 23/12/2024 à 10:37, Petr Pavlu a écrit :
>> Section .static_call_sites holds data structures that need to be sorted and
>> processed only at module load time. The section is never modified afterwards.
>> Make it therefore r
On 12/5/24 20:46, Christophe Leroy wrote:
> This series reworks module loading to avoid leaving the module in a
> stale state when protecting ro_after_init section fails.
>
> Once module init has succeded it is too late to cancel loading.
> If setting ro_after_init data section to
he __kcrctab
> > and __kcrctab_gpl sections directly contain the CRC values in all cases.
> >
> > The genksyms tool outputs unsigned 32-bit CRC values, so u32 is preferred
> > over s32.
> >
> > No functional changes are intended.
> >
> > Regardless of this
, 2024 at 7:53 PM CET, Christophe Leroy wrote:
>>>>>>
>>>>>>
>>>>>> Le 09/11/2024 à 23:17, Daniel Gomez a écrit :
>>>>>>> On Sat Nov 9, 2024 at 11:35 AM CET, Christophe Leroy wrote:
>>>>>>>> Once module init has succeded i
Hi Petr,
Le 23/12/2024 à 10:37, Petr Pavlu a écrit :
Section .static_call_sites holds data structures that need to be sorted and
processed only at module load time. The section is never modified afterwards.
Make it therefore read-only after module initialization to avoid any
(non-)accidental
Hi Sebastian,
Le 20/12/2024 à 18:41, Sebastian Andrzej Siewior a écrit :
Hi,
This is an updated version of the inital post after PeterZ made me aware
that there are users outside of the module directory.
The goal is replace the mix auf rcu_read_lock(), rcu_read_lock_sched()
and preempt_disable
On 20/12/24 05:02, Jakub Kicinski wrote:
On Thu, 19 Dec 2024 02:42:20 +0100 Antonio Quartulli wrote:
+uint64_t nla_get_uint(struct nlattr *attr)
+{
+ if (nla_len(attr) == sizeof(uint32_t))
+ return nla_get_u32(attr);
+ else
+ return nla_get_u64(attr);
+}
> The genksyms tool outputs unsigned 32-bit CRC values, so u32 is preferred
> over s32.
>
> No functional changes are intended.
>
> Regardless of this change, the CRC value is assigned to the u32 variable,
> 'crcval' before the comparison, as seen in kernel/module/versio
l cases.
>
> The genksyms tool outputs unsigned 32-bit CRC values, so u32 is preferred
> over s32.
>
> No functional changes are intended.
>
> Regardless of this change, the CRC value is assigned to the u32 variable,
> 'crcval' before the comparison, as seen in kerne
nctional changes are intended.
Regardless of this change, the CRC value is assigned to the u32 variable,
'crcval' before the comparison, as seen in kernel/module/version.c:
crcval = *crc;
Signed-off-by: Masahiro Yamada
---
include/linux/module.h | 4 ++--
kernel/module/inte
The generic function from the sysfs core can replace the custom one.
Signed-off-by: Thomas Weißschuh
Acked-by: Andrii Nakryiko
---
kernel/bpf/btf.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index
e5a5f023cedd5c288c2
The current signature-based module integrity checking has some drawbacks
in combination with reproducible builds:
Either the module signing key is generated at build time, which makes
the build unreproducible, or a static key is used, which precludes
rebuilds by third parties and makes the whole
The current signature-based module integrity checking has some drawbacks
in combination with reproducible builds:
Either the module signing key is generated at build time, which makes
the build unreproducible, or a static key is used, which precludes
rebuilds by third parties and makes the whole
On Thu, 19 Dec 2024 18:04:03 +0100
Danilo Krummrich wrote:
> In order to access static metadata of a Rust kernel module, add the
> `ModuleMetadata` trait.
>
> In particular, this trait provides the name of a Rust kernel module as
> specified by the `module!` macro.
>
>
1 - 100 of 6760 matches
Mail list logo