Linux Modules
 help / color / mirror / Atom feed
* [PATCH v2] rust: module_param: return value by copy from `value`
@ 2026-06-01 10:17 Andreas Hindborg
  2026-06-01 10:28 ` sashiko-bot
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Andreas Hindborg @ 2026-06-01 10:17 UTC (permalink / raw)
  To: Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
	Aaron Tomlin, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
	Danilo Krummrich
  Cc: linux-modules, linux-kernel, rust-for-linux, Andreas Hindborg

For `Copy` parameter types it is more ergonomic to retrieve the
parameter value by copy than through a shared reference. Change
`ModuleParamAccess::value` to return `T` by copy when `T: Copy`,
and rename the previous reference-returning accessor to
`value_ref`. Update the in-tree caller in `rust_minimal`.

Suggested-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
---
This change was suggested during review of the rust null block series [1].

[1] https://lore.kernel.org/r/abfe2LbhLzXiGCkA@google.com
---
Changes in v2:
- Move `value` into existing impl block (Gary).
- Add inline attributes (Sashiko).
- Link to v1: https://msgid.link/20260529-modules-value-ref-v1-1-a0df7e9e6f2d@kernel.org
---
 rust/kernel/module_param.rs  | 18 +++++++++++++++++-
 samples/rust/rust_minimal.rs |  2 +-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/module_param.rs b/rust/kernel/module_param.rs
index 6a8a7a875643..a33302d1b8a3 100644
--- a/rust/kernel/module_param.rs
+++ b/rust/kernel/module_param.rs
@@ -131,10 +131,26 @@ pub const fn new(default: T) -> Self {
         }
     }
 
+    /// Get a copy of the parameter value.
+    ///
+    /// Returns the value supplied at module load time, or the default value
+    /// if the parameter has not been set.
+    #[inline]
+    pub fn value(&self) -> T
+    where
+        T: Copy,
+    {
+        self.value.copy().unwrap_or(self.default)
+    }
+
     /// Get a shared reference to the parameter value.
+    ///
+    /// Returns a reference to the value supplied at module load time, or a
+    /// reference to the default value if the parameter has not been set.
     // Note: When sysfs access to parameters are enabled, we have to pass in a
     // held lock guard here.
-    pub fn value(&self) -> &T {
+    #[inline]
+    pub fn value_ref(&self) -> &T {
         self.value.as_ref().unwrap_or(&self.default)
     }
 
diff --git a/samples/rust/rust_minimal.rs b/samples/rust/rust_minimal.rs
index 8eb9583571d7..60d03df6cd80 100644
--- a/samples/rust/rust_minimal.rs
+++ b/samples/rust/rust_minimal.rs
@@ -28,7 +28,7 @@ fn init(_module: &'static ThisModule) -> Result<Self> {
         pr_info!("Am I built-in? {}\n", !cfg!(MODULE));
         pr_info!(
             "test_parameter: {}\n",
-            *module_parameters::test_parameter.value()
+            module_parameters::test_parameter.value()
         );
 
         let mut numbers = KVec::new();

---
base-commit: 7fd2df204f342fc17d1a0bfcd474b24232fb0f32
change-id: 20260529-modules-value-ref-e95a7ab94fdb

Best regards,
-- 
Andreas Hindborg <a.hindborg@kernel.org>



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-06-01 10:17 [PATCH v2] rust: module_param: return value by copy from `value` Andreas Hindborg
@ 2026-06-01 10:28 ` sashiko-bot
  2026-06-01 20:15 ` Gary Guo
  2026-07-09 11:48 ` Petr Pavlu
  2 siblings, 0 replies; 11+ messages in thread
From: sashiko-bot @ 2026-06-01 10:28 UTC (permalink / raw)
  To: Andreas Hindborg; +Cc: linux-modules, ojeda

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Casting a pointer of `ModuleParamAccess<T>` to `SetOnce<T>` invokes undefined behavior due to missing `#[repr(C)]` on `ModuleParamAccess`.
--

commit 9dc35dfddf4037b5b314ed7586fa775219811371
Author: Andreas Hindborg <a.hindborg@kernel.org>

rust: module_param: return value by copy from value

This commit updates parameter access to be more ergonomic for Copy types
by returning the parameter value by copy rather than through a shared
reference. It changes ModuleParamAccess::value to return T by copy when
T: Copy, and renames the previous reference-returning accessor to
value_ref. The in-tree caller in rust_minimal is updated to reflect this
change.

> diff --git a/rust/kernel/module_param.rs b/rust/kernel/module_param.rs
> index 6a8a7a875643a..a33302d1b8a36 100644
> --- a/rust/kernel/module_param.rs
> +++ b/rust/kernel/module_param.rs

[ ... ]

[Severity: High]
This isn't a bug introduced by this patch, but casting the pointer to
SetOnce<T> appears to rely on an unspecified memory layout.

In rust/kernel/module_param.rs:ModuleParamAccess:

pub struct ModuleParamAccess<T> {
    value: SetOnce<T>,
    default: T,
}

Since ModuleParamAccess lacks a #[repr(C)] annotation, the compiler is
free to reorder its fields. If the default field is placed before value
to minimize padding, would the cast in set_param() overwrite the default
field instead?

rust/kernel/module_param.rs:set_param() {
    ...
    // SAFETY: By function safety requirements, this access is safe.
    let container = unsafe {
        &*((*param).__bindgen_anon_1.arg.cast::<SetOnce<T>>())
    };

    container
        .populate(new_value)
    ...
}

Should ModuleParamAccess be marked with #[repr(C)], or should the pointer
be cast back to ModuleParamAccess<T> before accessing the value field?

> @@ -131,10 +131,26 @@ pub const fn new(default: T) -> Self {
>          }
>      }
>  
> +    /// Get a copy of the parameter value.
> +    ///

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260601-modules-value-ref-v2-1-12ebbf0510c9@kernel.org?part=1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-06-01 10:17 [PATCH v2] rust: module_param: return value by copy from `value` Andreas Hindborg
  2026-06-01 10:28 ` sashiko-bot
@ 2026-06-01 20:15 ` Gary Guo
  2026-07-09 11:48 ` Petr Pavlu
  2 siblings, 0 replies; 11+ messages in thread
From: Gary Guo @ 2026-06-01 20:15 UTC (permalink / raw)
  To: Andreas Hindborg, Luis Chamberlain, Petr Pavlu, Daniel Gomez,
	Sami Tolvanen, Aaron Tomlin, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
	Danilo Krummrich
  Cc: linux-modules, linux-kernel, rust-for-linux

On Mon Jun 1, 2026 at 11:17 AM BST, Andreas Hindborg wrote:
> For `Copy` parameter types it is more ergonomic to retrieve the
> parameter value by copy than through a shared reference. Change
> `ModuleParamAccess::value` to return `T` by copy when `T: Copy`,
> and rename the previous reference-returning accessor to
> `value_ref`. Update the in-tree caller in `rust_minimal`.
> 
> Suggested-by: Alice Ryhl <aliceryhl@google.com>
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>

Reviewed-by: Gary Guo <gary@garyguo.net>

> ---
> This change was suggested during review of the rust null block series [1].
> 
> [1] https://lore.kernel.org/r/abfe2LbhLzXiGCkA@google.com
> ---
> Changes in v2:
> - Move `value` into existing impl block (Gary).
> - Add inline attributes (Sashiko).
> - Link to v1: https://msgid.link/20260529-modules-value-ref-v1-1-a0df7e9e6f2d@kernel.org
> ---
>  rust/kernel/module_param.rs  | 18 +++++++++++++++++-
>  samples/rust/rust_minimal.rs |  2 +-
>  2 files changed, 18 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-06-01 10:17 [PATCH v2] rust: module_param: return value by copy from `value` Andreas Hindborg
  2026-06-01 10:28 ` sashiko-bot
  2026-06-01 20:15 ` Gary Guo
@ 2026-07-09 11:48 ` Petr Pavlu
  2026-07-09 14:13   ` Miguel Ojeda
  2 siblings, 1 reply; 11+ messages in thread
From: Petr Pavlu @ 2026-07-09 11:48 UTC (permalink / raw)
  To: Andreas Hindborg, Miguel Ojeda
  Cc: Luis Chamberlain, Daniel Gomez, Sami Tolvanen, Aaron Tomlin,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Alice Ryhl, Trevor Gross, Danilo Krummrich, linux-modules,
	linux-kernel, rust-for-linux

On 6/1/26 12:17 PM, Andreas Hindborg wrote:
> For `Copy` parameter types it is more ergonomic to retrieve the
> parameter value by copy than through a shared reference. Change
> `ModuleParamAccess::value` to return `T` by copy when `T: Copy`,
> and rename the previous reference-returning accessor to
> `value_ref`. Update the in-tree caller in `rust_minimal`.
> 
> Suggested-by: Alice Ryhl <aliceryhl@google.com>
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>

Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>

@Miguel, please let me know if I should take this patch on modules-next,
or if you'd prefer for it to go through the Rust tree.

-- 
Thanks,
Petr

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-07-09 11:48 ` Petr Pavlu
@ 2026-07-09 14:13   ` Miguel Ojeda
  2026-07-10  8:13     ` Petr Pavlu
  0 siblings, 1 reply; 11+ messages in thread
From: Miguel Ojeda @ 2026-07-09 14:13 UTC (permalink / raw)
  To: Petr Pavlu
  Cc: Andreas Hindborg, Miguel Ojeda, Luis Chamberlain, Daniel Gomez,
	Sami Tolvanen, Aaron Tomlin, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, linux-modules, linux-kernel, rust-for-linux

On Thu, Jul 9, 2026 at 1:48 PM Petr Pavlu <petr.pavlu@suse.com> wrote:
>
> @Miguel, please let me know if I should take this patch on modules-next,
> or if you'd prefer for it to go through the Rust tree.

Please feel free to take it through modules-next, of course.

Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-07-09 14:13   ` Miguel Ojeda
@ 2026-07-10  8:13     ` Petr Pavlu
  2026-07-10 14:26       ` Alice Ryhl
  0 siblings, 1 reply; 11+ messages in thread
From: Petr Pavlu @ 2026-07-10  8:13 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Andreas Hindborg, Miguel Ojeda, Luis Chamberlain, Daniel Gomez,
	Sami Tolvanen, Aaron Tomlin, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, linux-modules, linux-kernel, rust-for-linux

On 7/9/26 4:13 PM, Miguel Ojeda wrote:
> On Thu, Jul 9, 2026 at 1:48 PM Petr Pavlu <petr.pavlu@suse.com> wrote:
>>
>> @Miguel, please let me know if I should take this patch on modules-next,
>> or if you'd prefer for it to go through the Rust tree.
> 
> Please feel free to take it through modules-next, of course.

Thanks for the confirmation. Queued now on modules-next for v7.3-rc1.

-- Petr

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-07-10  8:13     ` Petr Pavlu
@ 2026-07-10 14:26       ` Alice Ryhl
  2026-07-10 14:41         ` Miguel Ojeda
  2026-07-10 15:58         ` Petr Pavlu
  0 siblings, 2 replies; 11+ messages in thread
From: Alice Ryhl @ 2026-07-10 14:26 UTC (permalink / raw)
  To: Petr Pavlu
  Cc: Miguel Ojeda, Andreas Hindborg, Miguel Ojeda, Luis Chamberlain,
	Daniel Gomez, Sami Tolvanen, Aaron Tomlin, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Trevor Gross,
	Danilo Krummrich, linux-modules, linux-kernel, rust-for-linux

On Fri, Jul 10, 2026 at 10:13:53AM +0200, Petr Pavlu wrote:
> On 7/9/26 4:13 PM, Miguel Ojeda wrote:
> > On Thu, Jul 9, 2026 at 1:48 PM Petr Pavlu <petr.pavlu@suse.com> wrote:
> >>
> >> @Miguel, please let me know if I should take this patch on modules-next,
> >> or if you'd prefer for it to go through the Rust tree.
> > 
> > Please feel free to take it through modules-next, of course.
> 
> Thanks for the confirmation. Queued now on modules-next for v7.3-rc1.

I'm seeing this error on x86 with latest nightly rust compiler:

rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramaEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramhEB4_()
rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramhEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramiEB4_()
rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramiEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramjEB4_()
rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramjEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramlEB4_()
rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramlEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_parammEB4_()
rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_parammEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramsEB4_()
rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramsEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramtEB4_()
rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramtEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramyEB4_()
rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramyEB4_() falls through to next function _RINvNvNtCs65fqAZscXCv_6kernel6devres16register_foreign8callbackINtNtCsbtRzKR1rrUg_4core3pin3PinINtNtNtB6_5alloc4kbox3BoxNtNtNtB6_3pci3irq21IrqVectorRegistrationNtNtB1A_9allocator7KmallocEEEB6_()
rust/kernel.o: error: objtool: _RNvMNtCs65fqAZscXCv_6kernel6deviceNtB2_6Device10get_device() falls through to next function _RNvMNtCs65fqAZscXCv_6kernel6devresINtB2_6DevresNtNtB4_3i2c12RegistrationE19devres_node_releaseB4_()
rust/kernel.o: error: objtool: _RNvMNtCs65fqAZscXCv_6kernel6devresINtB2_6DevresNtNtB4_3i2c12RegistrationE19devres_node_releaseB4_() falls through to next function _RNvMNtCs65fqAZscXCv_6kernel6devresINtB2_6DevresNtNtB4_3i2c12RegistrationE21devres_node_free_nodeB4_()

I understand this is probably due to a new function in Rust stdlib that
is no_return, so probably not caused by this patch even if this is
triggering it.

Alice

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-07-10 14:26       ` Alice Ryhl
@ 2026-07-10 14:41         ` Miguel Ojeda
  2026-07-10 15:58         ` Petr Pavlu
  1 sibling, 0 replies; 11+ messages in thread
From: Miguel Ojeda @ 2026-07-10 14:41 UTC (permalink / raw)
  To: Alice Ryhl
  Cc: Petr Pavlu, Andreas Hindborg, Miguel Ojeda, Luis Chamberlain,
	Daniel Gomez, Sami Tolvanen, Aaron Tomlin, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Trevor Gross,
	Danilo Krummrich, linux-modules, linux-kernel, rust-for-linux

On Fri, Jul 10, 2026 at 4:26 PM Alice Ryhl <aliceryhl@google.com> wrote:
>
> I understand this is probably due to a new function in Rust stdlib that
> is no_return, so probably not caused by this patch even if this is
> triggering it.

I can take a look and perhaps push a patch via `rust-fixes`, which
would make it fixed by the time this one lands in the merge window.

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-07-10 14:26       ` Alice Ryhl
  2026-07-10 14:41         ` Miguel Ojeda
@ 2026-07-10 15:58         ` Petr Pavlu
  2026-07-10 17:00           ` Miguel Ojeda
  1 sibling, 1 reply; 11+ messages in thread
From: Petr Pavlu @ 2026-07-10 15:58 UTC (permalink / raw)
  To: Alice Ryhl
  Cc: Miguel Ojeda, Andreas Hindborg, Miguel Ojeda, Luis Chamberlain,
	Daniel Gomez, Sami Tolvanen, Aaron Tomlin, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Trevor Gross,
	Danilo Krummrich, linux-modules, linux-kernel, rust-for-linux

On 7/10/26 4:26 PM, Alice Ryhl wrote:
> On Fri, Jul 10, 2026 at 10:13:53AM +0200, Petr Pavlu wrote:
>> On 7/9/26 4:13 PM, Miguel Ojeda wrote:
>>> On Thu, Jul 9, 2026 at 1:48 PM Petr Pavlu <petr.pavlu@suse.com> wrote:
>>>>
>>>> @Miguel, please let me know if I should take this patch on modules-next,
>>>> or if you'd prefer for it to go through the Rust tree.
>>>
>>> Please feel free to take it through modules-next, of course.
>>
>> Thanks for the confirmation. Queued now on modules-next for v7.3-rc1.
> 
> I'm seeing this error on x86 with latest nightly rust compiler:
> 
> rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramaEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramhEB4_()
> rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramhEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramiEB4_()
> rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramiEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramjEB4_()
> rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramjEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramlEB4_()
> rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramlEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_parammEB4_()
> rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_parammEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramsEB4_()
> rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramsEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramtEB4_()
> rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramtEB4_() falls through to next function _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramyEB4_()
> rust/kernel.o: error: objtool: _RINvNtCs65fqAZscXCv_6kernel12module_param9set_paramyEB4_() falls through to next function _RINvNvNtCs65fqAZscXCv_6kernel6devres16register_foreign8callbackINtNtCsbtRzKR1rrUg_4core3pin3PinINtNtNtB6_5alloc4kbox3BoxNtNtNtB6_3pci3irq21IrqVectorRegistrationNtNtB1A_9allocator7KmallocEEEB6_()
> rust/kernel.o: error: objtool: _RNvMNtCs65fqAZscXCv_6kernel6deviceNtB2_6Device10get_device() falls through to next function _RNvMNtCs65fqAZscXCv_6kernel6devresINtB2_6DevresNtNtB4_3i2c12RegistrationE19devres_node_releaseB4_()
> rust/kernel.o: error: objtool: _RNvMNtCs65fqAZscXCv_6kernel6devresINtB2_6DevresNtNtB4_3i2c12RegistrationE19devres_node_releaseB4_() falls through to next function _RNvMNtCs65fqAZscXCv_6kernel6devresINtB2_6DevresNtNtB4_3i2c12RegistrationE21devres_node_free_nodeB4_()
> 
> I understand this is probably due to a new function in Rust stdlib that
> is no_return, so probably not caused by this patch even if this is
> triggering it.

I can't immediately reproduce this issue. I tried with linux-next
(next-20260710), rustc 1.99.0-nightly (af3d95584 2026-07-09) and
x86_64_defconfig with Rust enabled. What am I missing? Could you send me
your config and the produced rust/kernel.o off-list?

-- 
Thanks,
Petr

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-07-10 15:58         ` Petr Pavlu
@ 2026-07-10 17:00           ` Miguel Ojeda
  2026-07-10 17:33             ` Miguel Ojeda
  0 siblings, 1 reply; 11+ messages in thread
From: Miguel Ojeda @ 2026-07-10 17:00 UTC (permalink / raw)
  To: Petr Pavlu
  Cc: Alice Ryhl, Andreas Hindborg, Miguel Ojeda, Luis Chamberlain,
	Daniel Gomez, Sami Tolvanen, Aaron Tomlin, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Trevor Gross,
	Danilo Krummrich, linux-modules, linux-kernel, rust-for-linux

On Fri, Jul 10, 2026 at 5:58 PM Petr Pavlu <petr.pavlu@suse.com> wrote:
>
> I can't immediately reproduce this issue. I tried with linux-next
> (next-20260710), rustc 1.99.0-nightly (af3d95584 2026-07-09) and
> x86_64_defconfig with Rust enabled. What am I missing? Could you send me
> your config and the produced rust/kernel.o off-list?

I can reproduce it independently of this patch.

It looks like `panic_null_reference_constructed`, added the other day
-- I will send the patch.

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] rust: module_param: return value by copy from `value`
  2026-07-10 17:00           ` Miguel Ojeda
@ 2026-07-10 17:33             ` Miguel Ojeda
  0 siblings, 0 replies; 11+ messages in thread
From: Miguel Ojeda @ 2026-07-10 17:33 UTC (permalink / raw)
  To: Petr Pavlu
  Cc: Alice Ryhl, Andreas Hindborg, Miguel Ojeda, Luis Chamberlain,
	Daniel Gomez, Sami Tolvanen, Aaron Tomlin, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Trevor Gross,
	Danilo Krummrich, linux-modules, linux-kernel, rust-for-linux

On Fri, Jul 10, 2026 at 7:00 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> It looks like `panic_null_reference_constructed`, added the other day
> -- I will send the patch.

  https://lore.kernel.org/rust-for-linux/20260710173252.191781-1-ojeda@kernel.org/

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-07-10 17:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 10:17 [PATCH v2] rust: module_param: return value by copy from `value` Andreas Hindborg
2026-06-01 10:28 ` sashiko-bot
2026-06-01 20:15 ` Gary Guo
2026-07-09 11:48 ` Petr Pavlu
2026-07-09 14:13   ` Miguel Ojeda
2026-07-10  8:13     ` Petr Pavlu
2026-07-10 14:26       ` Alice Ryhl
2026-07-10 14:41         ` Miguel Ojeda
2026-07-10 15:58         ` Petr Pavlu
2026-07-10 17:00           ` Miguel Ojeda
2026-07-10 17:33             ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox