lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251117163033.5fe01a29@canb.auug.org.au>
Date: Mon, 17 Nov 2025 16:30:33 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Greg KH <greg@...ah.com>, Danilo Krummrich <dakr@...nel.org>, "Rafael J.
 Wysocki" <rafael@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Ingo
 Molnar <mingo@...nel.org>, "H. Peter Anvin" <hpa@...or.com>, Peter Zijlstra
 <peterz@...radead.org>
Cc: Boqun Feng <boqun.feng@...il.com>, Linux Kernel Mailing List
 <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>
Subject: linux-next: manual merge of the driver-core tree with the tip tree

Hi all,

Today's linux-next merge of the driver-core tree got conflicts in:

  samples/rust/rust_debugfs.rs
  samples/rust/rust_debugfs_scoped.rs

between commit:

  f74cf399e02e ("rust: debugfs: Replace the usage of Rust native atomics")

from the tip tree and commits:

  0242623384c7 ("rust: driver: let probe() return impl PinInit<Self, Error>")
  52af0c37964b ("samples: rust: debugfs: add example for blobs")
  f656279afde1 ("samples: rust: debugfs_scoped: add example for blobs")

from the driver-core tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
This is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc samples/rust/rust_debugfs.rs
index 711faa07bece,c45b568d951b..000000000000
--- a/samples/rust/rust_debugfs.rs
+++ b/samples/rust/rust_debugfs.rs
@@@ -36,8 -38,9 +36,9 @@@ use kernel::c_str
  use kernel::debugfs::{Dir, File};
  use kernel::new_mutex;
  use kernel::prelude::*;
+ use kernel::sizes::*;
 +use kernel::sync::atomic::{Atomic, Relaxed};
  use kernel::sync::Mutex;
 -
  use kernel::{acpi, device::Core, of, platform, str::CString, types::ARef};
  
  kernel::module_platform_driver! {
@@@ -57,9 -60,13 +58,13 @@@ struct RustDebugFs 
      #[pin]
      _compatible: File<CString>,
      #[pin]
 -    counter: File<AtomicUsize>,
 +    counter: File<Atomic<usize>>,
      #[pin]
      inner: File<Mutex<Inner>>,
+     #[pin]
+     array_blob: File<Mutex<[u8; 4]>>,
+     #[pin]
+     vector_blob: File<Mutex<KVec<u8>>>,
  }
  
  #[derive(Debug)]
@@@ -104,16 -111,17 +109,17 @@@ impl platform::Driver for RustDebugFs 
      fn probe(
          pdev: &platform::Device<Core>,
          _info: Option<&Self::IdInfo>,
-     ) -> Result<Pin<KBox<Self>>> {
-         let result = KBox::try_pin_init(RustDebugFs::new(pdev), GFP_KERNEL)?;
-         // We can still mutate fields through the files which are atomic or mutexed:
-         result.counter.store(91, Relaxed);
-         {
-             let mut guard = result.inner.lock();
-             guard.x = guard.y;
-             guard.y = 42;
-         }
-         Ok(result)
+     ) -> impl PinInit<Self, Error> {
+         RustDebugFs::new(pdev).pin_chain(|this| {
 -            this.counter.store(91, Ordering::Relaxed);
++            this.counter.store(91, Relaxed);
+             {
+                 let mut guard = this.inner.lock();
+                 guard.x = guard.y;
+                 guard.y = 42;
+             }
+ 
+             Ok(())
+         })
      }
  }
  
diff --cc samples/rust/rust_debugfs_scoped.rs
index 9f0ec5f24cda,c80312cf168d..000000000000
--- a/samples/rust/rust_debugfs_scoped.rs
+++ b/samples/rust/rust_debugfs_scoped.rs
@@@ -6,9 -6,10 +6,10 @@@
  //! `Scope::dir` to create a variety of files without the need to separately
  //! track them all.
  
 -use core::sync::atomic::AtomicUsize;
  use kernel::debugfs::{Dir, Scope};
  use kernel::prelude::*;
+ use kernel::sizes::*;
 +use kernel::sync::atomic::Atomic;
  use kernel::sync::Mutex;
  use kernel::{c_str, new_mutex, str::CString};
  
@@@ -109,7 -114,8 +114,8 @@@ impl ModuleData 
  
  struct DeviceData {
      name: CString,
 -    nums: KVec<AtomicUsize>,
 +    nums: KVec<Atomic<usize>>,
+     blob: Pin<KBox<Mutex<[u8; SZ_4K]>>>,
  }
  
  fn init_control(base_dir: &Dir, dyn_dirs: Dir) -> impl PinInit<Scope<ModuleData>> + '_ {

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ