Re: [PATCH v3 1/2] Introduce klp_ops into klp_func structure

2024-08-24 Thread Christoph Hellwig
On Thu, Aug 22, 2024 at 11:01:58AM +0800, Wardenjohn wrote: > 1. Move klp_ops into klp_func structure. > Rewrite the logic of klp_find_ops and > other logic to get klp_ops of a function. > > 2. Move definition of struct klp_ops into > include/linux/livepatch.h Why?

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

2024-08-24 Thread Trevor Gross
On Sat, Aug 24, 2024 at 8:16 AM Benno Lossin wrote: > > We shouldn't enable `const_mut_refs`. It is indeed close to > > stabilization, but it is still kind of churny right now and we don't > > want to enable the sharp edges everywhere. > > > > If the change from `static mut` to `UnsafeCell` that I

Re: [PATCH v8 2/4] kbuild: generate offset range data for builtin modules

2024-08-24 Thread Miguel Ojeda
On Fri, Aug 23, 2024 at 7:24 PM Sami Tolvanen wrote: > > I assume they wanted to avoid conflicts between Rust-specific > environment variables and existing Kbuild variables. Note that > KBUILD_MODFILE is also double quoted for the C preprocessor, which > isn't needed for Rust. Miguel, do you remem

[PATCH] hwspinlock: improve locking safety by using raw_spinlock_t

2024-08-24 Thread Wen Yang
Both __hwspin_trylock and __hwspin_unlock use hwlock->lock, and require running in atomic context, with a special annotation: function will never sleep. However, this requirement is not fulfilled on PREEMPT_RT. To address it, use raw_spinlock_t instead of spin_lock_t. Signed-off-by: Wen Yang Cc:

Re: [PATCH v2 16/19] gendwarfksyms: Add support for reserved structure fields

2024-08-24 Thread Benno Lossin
On 23.08.24 21:17, Sami Tolvanen wrote: > On Thu, Aug 22, 2024 at 11:53 PM Greg Kroah-Hartman > wrote: >> >> On Thu, Aug 22, 2024 at 12:00:15PM +, Benno Lossin wrote: Here's one example in the android tree where 4 64bit fields are reserved for future abi changes: https

Re: [PATCH v2 16/19] gendwarfksyms: Add support for reserved structure fields

2024-08-24 Thread Benno Lossin
On 23.08.24 01:53, Greg Kroah-Hartman wrote: > On Thu, Aug 22, 2024 at 12:00:15PM +, Benno Lossin wrote: >>> Here's one example in the android tree where 4 64bit fields are reserved >>> for future abi changes: >>> >>> https://android.googlesource.com/kernel/common/+/refs/heads/android12-5.

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

2024-08-24 Thread Benno Lossin
On 24.08.24 13:27, Trevor Gross wrote: > On Mon, Aug 19, 2024 at 8:35 AM Andreas Hindborg wrote: >> From: Andreas Hindborg >> +write!( >> +self.param_buffer, >> +" >> +static mut __{name}_{param_name}_value: {param_type} = >

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

2024-08-24 Thread Trevor Gross
On Mon, Aug 19, 2024 at 8:35 AM 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. Also, I think the subject line n

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

2024-08-24 Thread Trevor Gross
On Mon, Aug 19, 2024 at 8:35 AM 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. > diff --git a/rust/kernel/modul