Re: [PATCH v15 1/7] rust: sync: add `SetOnce`

2025-07-09 Thread Benno Lossin
On Wed Jul 9, 2025 at 10:12 PM CEST, Boqun Feng wrote: > On Wed, Jul 09, 2025 at 08:22:16PM +0200, Benno Lossin wrote: >> On Wed Jul 9, 2025 at 12:34 PM CEST, Andreas Hindborg wrote: >> > "Benno Lossin" writes: >> >> On Tue Jul 8, 2025 at 10:54 AM CEST, An

Re: [PATCH v16 1/7] rust: sync: add `SetOnce`

2025-07-09 Thread Benno Lossin
indborg A couple notes on safety documentation below. Also one pretty subtle functionality change from last version. With everything fixed: Reviewed-by: Benno Lossin > --- > rust/kernel/sync.rs | 2 + > rust/kernel/sync/set_once.rs | 122 >

Re: [PATCH v15 1/7] rust: sync: add `SetOnce`

2025-07-09 Thread Benno Lossin
On Wed Jul 9, 2025 at 12:34 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Tue Jul 8, 2025 at 10:54 AM CEST, Andreas Hindborg wrote: >>> "Boqun Feng" writes: >>>> On Mon, Jul 07, 2025 at 03:38:58PM +0200, Alice Ryhl wrote: >

Re: [PATCH v15 1/7] rust: sync: add `SetOnce`

2025-07-09 Thread Benno Lossin
On Wed Jul 9, 2025 at 10:56 AM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: > >> On Tue Jul 8, 2025 at 3:06 PM CEST, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> On Mon Jul 7, 2025 at 3:29 PM CEST, Andreas Hindborg wrote:

Re: [PATCH v15 1/7] rust: sync: add `SetOnce`

2025-07-08 Thread Benno Lossin
On Tue Jul 8, 2025 at 3:06 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Mon Jul 7, 2025 at 3:29 PM CEST, Andreas Hindborg wrote: >>> diff --git a/rust/kernel/sync.rs b/rust/kernel/sync.rs >>> index 81e3a806e57e2..13e6bc7fa87ac 100644 >>

Re: [PATCH v15 1/7] rust: sync: add `SetOnce`

2025-07-08 Thread Benno Lossin
On Tue Jul 8, 2025 at 10:54 AM CEST, Andreas Hindborg wrote: > "Boqun Feng" writes: > >> On Mon, Jul 07, 2025 at 03:38:58PM +0200, Alice Ryhl wrote: >>> On Mon, Jul 7, 2025 at 3:32 PM Andreas Hindborg >>> wrote: >>> > >>> > Introduce the `SetOnce` type, a container that can only be written once.

Re: [PATCH v15 1/7] rust: sync: add `SetOnce`

2025-07-08 Thread Benno Lossin
mment fix below. (feel free to ignore the nit) With the safety comment fixed: Reviewed-by: Benno Lossin > --- > rust/kernel/sync.rs | 2 + > rust/kernel/sync/set_once.rs | 125 > +++ > 2 files changed, 127 insertions(+) > >

Re: [PATCH v15 2/7] rust: str: add radix prefixed integer parsing functions

2025-07-08 Thread Benno Lossin
y: Daniel Gomez > Reviewed-by: Greg Kroah-Hartman > Suggested-by: Benno Lossin > Signed-off-by: Andreas Hindborg Reviewed-by: Benno Lossin --- Cheers, Benno > --- > rust/kernel/str.rs | 2 + > rust/kernel/str/parse_int.rs | 148 > ++

Re: [PATCH v4 2/6] rust: switch to `#[expect(...)]` in init and kunit

2025-07-07 Thread Benno Lossin
On Mon Jul 7, 2025 at 3:02 PM CEST, Miguel Ojeda wrote: > On Wed, Jul 2, 2025 at 8:47 PM Benno Lossin wrote: >> >> @Miguel are you going to pick this eventually, or do you think it should >> have a new version with the right splitting? > > I guess I could take i

Re: [PATCH v14 5/7] rust: module: update the module macro with module parameter support

2025-07-04 Thread Benno Lossin
On Fri Jul 4, 2025 at 3:51 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Fri Jul 4, 2025 at 2:29 PM CEST, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> On Wed Jul 2, 2025 at 3:18 PM CEST, Andreas Hindborg wrote: >&

Re: [PATCH v14 5/7] rust: module: update the module macro with module parameter support

2025-07-04 Thread Benno Lossin
On Fri Jul 4, 2025 at 2:29 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Wed Jul 2, 2025 at 3:18 PM CEST, Andreas Hindborg wrote: >>> +perm: 0, // Will not appear in sysfs >>> +

Re: [PATCH v14 3/7] rust: introduce module_param module

2025-07-04 Thread Benno Lossin
On Fri Jul 4, 2025 at 9:37 AM CEST, Andreas Hindborg wrote: > Andreas Hindborg writes: > >> "Danilo Krummrich" writes: >> >>> On 7/2/25 3:18 PM, Andreas Hindborg wrote: +/// Get a shared reference to the parameter value. +// Note: When sysfs access to parameters are enabled, we

Re: [PATCH v14 1/7] rust: sync: add `OnceLock`

2025-07-03 Thread Benno Lossin
On Thu Jul 3, 2025 at 6:25 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Thu Jul 3, 2025 at 11:03 AM CEST, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> On Wed Jul 2, 2025 at 3:18 PM CEST, Andreas Hindborg wrote: >&

Re: [PATCH v14 1/7] rust: sync: add `OnceLock`

2025-07-03 Thread Benno Lossin
On Thu Jul 3, 2025 at 11:03 AM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Wed Jul 2, 2025 at 3:18 PM CEST, Andreas Hindborg wrote: >>> +/// >>> +/// # Example >>> +/// >>> +/// ``` >>> +/// # use kerne

Re: [PATCH v4 2/6] rust: switch to `#[expect(...)]` in init and kunit

2025-07-02 Thread Benno Lossin
On Tue Jul 1, 2025 at 7:35 AM CEST, Onur Özkan wrote: > This makes it clear that the warning is expected not just > ignored, so we don't end up having various unnecessary > linting rules in the codebase. > > Some parts of the codebase already use this approach, this > patch just applies i

Re: [PATCH v14 1/7] rust: sync: add `OnceLock`

2025-07-02 Thread Benno Lossin
On Wed Jul 2, 2025 at 5:27 PM CEST, Alice Ryhl wrote: > On Wed, Jul 2, 2025 at 5:07 PM Benno Lossin wrote: >> On Wed Jul 2, 2025 at 3:18 PM CEST, Andreas Hindborg wrote: >> > +impl OnceLock { >> > +/// Get a copy of the contained object. >> > +/// &

Re: [PATCH v14 5/7] rust: module: update the module macro with module parameter support

2025-07-02 Thread Benno Lossin
On Wed Jul 2, 2025 at 3:18 PM CEST, Andreas Hindborg wrote: > Allow module parameters to be declared in the rust `module!` macro. > > Signed-off-by: Andreas Hindborg A few nits below, with those fixed Reviewed-by: Benno Lossin > --- > rust/macros/helpers.rs | 25 +++

Re: [PATCH v14 3/7] rust: introduce module_param module

2025-07-02 Thread Benno Lossin
On Wed Jul 2, 2025 at 3:18 PM CEST, Andreas Hindborg wrote: > Add types and traits for interfacing the C moduleparam API. > > Signed-off-by: Andreas Hindborg I have some nits below, but overall Reviewed-by: Benno Lossin > --- > rust/kernel/lib.rs | 1 +

Re: [PATCH v14 1/7] rust: sync: add `OnceLock`

2025-07-02 Thread Benno Lossin
On Wed Jul 2, 2025 at 3:18 PM CEST, Andreas Hindborg wrote: > Introduce the `OnceLock` type, a container that can only be written once. > The container uses an internal atomic to synchronize writes to the internal > value. > > Signed-off-by: Andreas Hindborg > --- > rust/kernel/sync.rs

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-07-02 Thread Benno Lossin
On Wed Jul 2, 2025 at 10:26 AM CEST, Andreas Hindborg wrote: > "Miguel Ojeda" writes: > >> On Tue, Jul 1, 2025 at 5:43 PM Benno Lossin wrote: >>> >>> Ultimately this is something for Miguel to decide. >> >> Only if you all cannot get to an agre

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-07-01 Thread Benno Lossin
On Tue Jul 1, 2025 at 6:27 PM CEST, Miguel Ojeda wrote: > On Tue, Jul 1, 2025 at 5:43 PM Benno Lossin wrote: >> >> Ultimately this is something for Miguel to decide. > > Only if you all cannot get to an agreement ;) :) > If Andreas wants to have it already added, then I

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-07-01 Thread Benno Lossin
On Tue Jul 1, 2025 at 4:14 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Tue Jul 1, 2025 at 10:43 AM CEST, Andreas Hindborg wrote: >>> No, I am OK for now with configfs. >>> >>> But, progress is still great. How about if we add a

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-07-01 Thread Benno Lossin
On Tue Jul 1, 2025 at 10:43 AM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Mon Jun 30, 2025 at 3:15 PM CEST, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> On Mon Jun 30, 2025 at 1:18 PM CEST, Andreas Hindborg wrote: &g

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-30 Thread Benno Lossin
On Mon Jun 30, 2025 at 3:15 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Mon Jun 30, 2025 at 1:18 PM CEST, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> (no idea if the orderings are correct, I always have to think w

Re: [PATCH v13 5/6] rust: samples: add a module parameter to the rust_minimal sample

2025-06-30 Thread Benno Lossin
On Mon Jun 30, 2025 at 2:23 PM CEST, Danilo Krummrich wrote: > On 6/30/25 2:18 PM, Danilo Krummrich wrote: >> On 6/30/25 2:12 PM, Andreas Hindborg wrote: >>> "Danilo Krummrich" writes: >>> (Sorry for being late on this one, just a minor nit below.) On 6/12/25 3:40 PM, Andreas Hindbo

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-30 Thread Benno Lossin
On Mon Jun 30, 2025 at 1:18 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Fri Jun 27, 2025 at 9:57 AM CEST, Andreas Hindborg wrote: >>> Andreas Hindborg writes: >>>> "Benno Lossin" writes: >>>>> That's

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-27 Thread Benno Lossin
On Fri Jun 27, 2025 at 9:57 AM CEST, Andreas Hindborg wrote: > Andreas Hindborg writes: >> "Benno Lossin" writes: >>> That's good to know, then let's try to go for something simple. >>> >>> I don't think that we can just use a `Mutex

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-23 Thread Benno Lossin
On Mon Jun 23, 2025 at 4:31 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: > >> On Mon Jun 23, 2025 at 11:44 AM CEST, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>> >>>> On Fri Jun 20, 2025 at 1:29 PM CEST, Andre

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-23 Thread Benno Lossin
On Mon Jun 23, 2025 at 2:37 PM CEST, Miguel Ojeda wrote: > On Mon, Jun 23, 2025 at 1:48 PM Benno Lossin wrote: >> >> Another way would be to use a `Once`-like type (does that exist on the C >> side?) so a type that can be initialized once and then never changes. > > The

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-23 Thread Benno Lossin
On Mon Jun 23, 2025 at 11:44 AM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: > >> On Fri Jun 20, 2025 at 1:29 PM CEST, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindb

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-20 Thread Benno Lossin
On Fri Jun 20, 2025 at 1:29 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: >>> +/// A wrapper for kernel parameters. >>> +/// >>> +/// This type is instantiated by the [`m

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-19 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: > +/// A wrapper for kernel parameters. > +/// > +/// This type is instantiated by the [`module!`] macro when module > parameters are > +/// defined. You should never need to instantiate this type directly. > +/// > +/// Note: This type

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-19 Thread Benno Lossin
On Thu Jun 19, 2025 at 2:20 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: >>> + >>> +// SAFETY: C kernel handles serializing access to this type. We never >>> access it >&

Re: [PATCH v13 1/6] rust: str: add radix prefixed integer parsing functions

2025-06-19 Thread Benno Lossin
On Thu Jun 19, 2025 at 1:12 PM CEST, Andreas Hindborg wrote: > I'm having a difficult time parsing. Are you suggesting that we guard > against implementations of `TryInto` that misbehave? Let me try a different explanation: The safety requirement for implementing the `FromStrRadix`: /// The

Re: [PATCH v13 4/6] rust: module: update the module macro with module parameter support

2025-06-18 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: > + > +fn emit_params(&mut self, info: &ModuleInfo) { > +let Some(params) = &info.params else { > +return; > +}; > + > +for param in params { > +let ops = param_ops_path(¶m.ptype); > + >

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-18 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: > Add types and traits for interfacing the C moduleparam API. > > Signed-off-by: Andreas Hindborg > --- > rust/kernel/lib.rs | 1 + > rust/kernel/module_param.rs | 201 > > 2 file

Re: [PATCH v13 1/6] rust: str: add radix prefixed integer parsing functions

2025-06-18 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: > +pub trait ParseInt: private::FromStrRadix + TryFrom { > +/// Parse a string according to the description in [`Self`]. > +fn from_str(src: &BStr) -> Result { > +match src.deref() { > +[b'-', rest @ ..] => { >

Re: [PATCH v13 3/6] rust: module: use a reference in macros::module::module

2025-06-18 Thread Benno Lossin
ess > the local via reference rather than value. > > Signed-off-by: Andreas Hindborg Reviewed-by: Benno Lossin --- Cheers, Benno > --- > rust/macros/module.rs | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-)

Re: [PATCH v13 5/6] rust: samples: add a module parameter to the rust_minimal sample

2025-06-18 Thread Benno Lossin
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

Re: [PATCH v12 2/3] rust: add parameter support to the `module!` macro

2025-06-12 Thread Benno Lossin
On Wed Jun 11, 2025 at 12:31 PM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Tue May 6, 2025 at 3:02 PM CEST, Andreas Hindborg wrote: >>> diff --git a/rust/macros/helpers.rs b/rust/macros/helpers.rs >>> index a3ee27e29a6f..16d300ad3d3b 10

Re: [PATCH] rust: kunit: use crate-level mapping for `c_void`

2025-05-27 Thread Benno Lossin
On Tue May 27, 2025 at 3:51 PM CEST, Miguel Ojeda wrote: > On Tue, May 27, 2025 at 2:06 PM Benno Lossin wrote: >> >> We don't need to explicitly import it, as `c_void` is present in the >> prelude since 3d5bef5d47c3 ("rust: add C FFI types to the prelude"). &g

Re: [PATCH] rust: kunit: use crate-level mapping for `c_void`

2025-05-27 Thread Benno Lossin
tps://docs.kernel.org/dev-tools/kunit/index.html> > > -use core::{ffi::c_void, fmt}; > +use core::fmt; > +use kernel::ffi::c_void; We don't need to explicitly import it, as `c_void` is present in the prelude since 3d5bef5d47c3 ("rust: add C FFI types to the prelude"). With the import removed: Reviewed-by: Benno Lossin --- Cheers, Benno

Re: [PATCH v12 1/3] rust: str: add radix prefixed integer parsing functions

2025-05-07 Thread Benno Lossin
On Wed May 7, 2025 at 11:15 AM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On Tue May 6, 2025 at 3:02 PM CEST, Andreas Hindborg wrote: >>> +pub trait ParseInt: private::FromStrRadix + TryFrom { >>> +/// Parse a string a

Re: [PATCH v12 2/3] rust: add parameter support to the `module!` macro

2025-05-07 Thread Benno Lossin
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 modules perspective > Tested-by: Daniel Gomez > Reviewed-by: Greg Kroah-

Re: [PATCH v12 1/3] rust: str: add radix prefixed integer parsing functions

2025-05-07 Thread Benno Lossin
On Tue May 6, 2025 at 3:02 PM CEST, Andreas Hindborg wrote: > diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs > index 878111cb77bc..174e70397305 100644 > --- a/rust/kernel/str.rs > +++ b/rust/kernel/str.rs > @@ -573,7 +573,6 @@ macro_rules! c_str { > } > > #[cfg(test)] > -#[expect(clippy::

Re: [PATCH v5 08/17] rust: kunit: refactor to use `&raw [const|mut]`

2025-03-23 Thread Benno Lossin
`&` making > it fit more naturally with other existing code. > > Suggested-by: Benno Lossin > Link: https://github.com/Rust-for-Linux/linux/issues/1148 > Signed-off-by: Antonio Hickey Reviewed-by: Benno Lossin --- Cheers, Benno > --- > rust/kernel/kunit.rs |

Re: [PATCH] rust: sync: rcu: Mark Guard methods as inline

2025-03-12 Thread Benno Lossin
__RNvMNtNtCsaYBeKL739Xz_6kernel4sync3rcuNtB2_5Guard3new 16 - >-16 > Total: Before=23385830, After=23385730, chg -0.00% > > Link: https://github.com/Rust-for-Linux/linux/issues/1145 > Signed-off-by: I Hsin Cheng Reviewed-by: Benno Lossin --- Cheers, Benno

Re: [PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-18 Thread Benno Lossin
On 18.02.25 12:14, Andreas Hindborg wrote: > "Gary Guo" writes: > >> On Tue, 11 Feb 2025 21:24:44 +0100 >> Andreas Hindborg wrote: >> >>> "Gary Guo" writes: >>> On Tue, 11 Feb 2025 16:57:36 +0100 Andreas Hindborg wrote: > The `Index` implementation on `BStr` was lost when we

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

2024-09-13 Thread Benno Lossin
On 13.09.24 00:37, Sami Tolvanen wrote: > Hi, > > On Thu, Sep 12, 2024 at 2:58 PM Benno Lossin wrote: >> >> On 12.09.24 22:58, Sami Tolvanen wrote: >>> That's an interesting point. Is the problem that you cannot assign >>> arbitrary values to the R

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

2024-09-12 Thread Benno Lossin
On 12.09.24 22:58, Sami Tolvanen wrote: > Hi Benno, > > On Thu, Sep 12, 2024 at 11:08 AM Benno Lossin wrote: >> >> On 12.09.24 18:06, Sami Tolvanen wrote: >>> >>> I thought about this a bit and I wonder if we need a separate >>> mechanism f

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

2024-09-12 Thread Benno Lossin
On 12.09.24 18:06, Sami Tolvanen wrote: > On Wed, Sep 11, 2024 at 4:43 AM Petr Pavlu wrote: >> >> On 8/31/24 02:05, Sami Tolvanen wrote: >>> On Fri, Aug 30, 2024 at 9:34 AM Miroslav Benes wrote: yes, this is one of the approaches we use in SLES. We add kabi paddings to some structu

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

2024-08-25 Thread Benno Lossin
On 24.08.24 23:23, Trevor Gross wrote: > 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 th

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 r

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 +0000, Benno Lossin wrote: >>> Here's one example in the android tree where 4 64bit fields are reserved >>> for future abi changes: >>> >>> https://android.googlesou

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 16/19] gendwarfksyms: Add support for reserved structure fields

2024-08-22 Thread Benno Lossin
On 22.08.24 09:29, Greg Kroah-Hartman wrote: > On Thu, Aug 22, 2024 at 05:55:32AM +0000, Benno Lossin wrote: >> On 22.08.24 01:29, Greg Kroah-Hartman wrote: >>> On Wed, Aug 21, 2024 at 11:31:25AM +, Benno Lossin wrote: >>>> On 20.08.24 22:03, Matthew Maurer wrote:

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

2024-08-21 Thread Benno Lossin
On 22.08.24 01:29, Greg Kroah-Hartman wrote: > On Wed, Aug 21, 2024 at 11:31:25AM +0000, Benno Lossin wrote: >> On 20.08.24 22:03, Matthew Maurer wrote: >>>>> The way `KAbiReserved` is implemented is via a `union` (maybe a bit >>>>> ironic, considering what

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

2024-08-21 Thread Benno Lossin
On 20.08.24 22:03, Matthew Maurer wrote: >>> The way `KAbiReserved` is implemented is via a `union` (maybe a bit >>> ironic, considering what I said in my other replies, but in this case, >>> we would provide a safe abstraction over this `union`, thus avoiding >>> exposing users of this type to `un

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

2024-08-19 Thread Benno Lossin
On 19.08.24 21:38, Sami Tolvanen wrote: > Hi Benno, > > On Sat, Aug 17, 2024 at 01:19:55PM +0000, Benno Lossin wrote: >> >> For this use-case (the one in the patch), I don't really know if we want >> to copy the approach from C. Do we even support exporting kABI

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

2024-08-19 Thread Benno Lossin
On 19.08.24 20:25, Greg Kroah-Hartman wrote: > On Sat, Aug 17, 2024 at 01:19:55PM +0000, Benno Lossin wrote: >> On 17.08.24 09:41, Greg Kroah-Hartman wrote: >>> On Fri, Aug 16, 2024 at 08:50:53AM -0700, Sami Tolvanen wrote: >>>> On Fri, Aug 16, 2024 at 12:20 AM

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

2024-08-17 Thread Benno Lossin
On 17.08.24 09:41, Greg Kroah-Hartman wrote: > On Fri, Aug 16, 2024 at 08:50:53AM -0700, Sami Tolvanen wrote: >> On Fri, Aug 16, 2024 at 12:20 AM Greg Kroah-Hartman >> wrote: >>> On Thu, Aug 15, 2024 at 05:39:20PM +, Sami Tolvanen wrote: >>> Especially as I have no idea how you are going to do

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

2024-08-15 Thread Benno Lossin
On 15.08.24 15:11, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 05.08.24 12:55, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> On 02.08.24 12:27, Andreas Hindborg wrote: >>>>> At a higher level where the bindin

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

2024-08-06 Thread Benno Lossin
On 05.08.24 12:55, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 02.08.24 12:27, Andreas Hindborg wrote: >>> At a higher level where the bindings supply the parsing functions, we >>> can decide that passing an argument without a value yields a default

Re: [PATCH v5 2/2] rust: add tracepoint support

2024-08-02 Thread Benno Lossin
On 02.08.24 11:31, Alice Ryhl wrote: > diff --git a/rust/kernel/tracepoint.rs b/rust/kernel/tracepoint.rs > new file mode 100644 > index ..69dafdb8bfe8 > --- /dev/null > +++ b/rust/kernel/tracepoint.rs > @@ -0,0 +1,49 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +// Copyright (C) 202

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

2024-08-02 Thread Benno Lossin
On 02.08.24 12:27, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 01.08.24 17:11, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> On 01.08.24 15:40, Andreas Hindborg wrote: >>>>> "Benno Lossin" writ

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

2024-08-01 Thread Benno Lossin
On 01.08.24 17:11, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 01.08.24 15:40, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> On 01.08.24 13:29, Andreas Hindborg wrote: >>>>> "B

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

2024-08-01 Thread Benno Lossin
On 01.08.24 15:40, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 01.08.24 13:29, Andreas Hindborg wrote: >>> "Benno Lossin" writes: >>>> On 05.07.24 13:15, Andreas Hindborg wrote: >>>>> + >>>>> +/// Types th

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

2024-08-01 Thread Benno Lossin
On 01.08.24 13:29, Andreas Hindborg wrote: > > Hi Benno, > > Thanks for the comments! > > "Benno Lossin" writes: > >> On 05.07.24 13:15, Andreas Hindborg wrote: > > [...] > >>> + >>> +/// Types that can be used for module param

Re: [PATCH v4 2/2] rust: add tracepoint support

2024-07-31 Thread Benno Lossin
On 28.06.24 15:23, Alice Ryhl wrote: > diff --git a/rust/kernel/tracepoint.rs b/rust/kernel/tracepoint.rs > new file mode 100644 > index ..1005f09e0330 > --- /dev/null > +++ b/rust/kernel/tracepoint.rs > @@ -0,0 +1,47 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +// Copyright (C) 202

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

2024-07-29 Thread Benno Lossin
On 05.07.24 13:15, Andreas Hindborg wrote: > From: Andreas Hindborg > > This patch includes changes required for Rust kernel modules to utilize > module parameters. This code implements read only support for integer > types without `sysfs` support. > > This code is a reduced and updated version