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: <20251117160621.2043a859@canb.auug.org.au>
Date: Mon, 17 Nov 2025 16:06:21 +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>, Alice Ryhl <aliceryhl@...gle.com>
Cc: Alexandre Courbot <acourbot@...dia.com>, Alistair Popple
 <apopple@...dia.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 drm-rust
 tree

Hi all,

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

  drivers/gpu/nova-core/driver.rs

between commit:

  1101c442410c ("gpu: nova-core: Set correct DMA mask")

from the drm-rust tree and commits:

  0242623384c7 ("rust: driver: let probe() return impl PinInit<Self, Error>")
  e4e679c8608e ("rust: auxiliary: unregister on parent device unbind")

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 drivers/gpu/nova-core/driver.rs
index d91bbc50cde7,ca0d5f8ad54b..000000000000
--- a/drivers/gpu/nova-core/driver.rs
+++ b/drivers/gpu/nova-core/driver.rs
@@@ -1,20 -1,14 +1,21 @@@
  // SPDX-License-Identifier: GPL-2.0
  
  use kernel::{
 -    auxiliary, c_str,
 +    auxiliary,
 +    c_str,
      device::Core,
+     devres::Devres,
 +    dma::Device,
 +    dma::DmaMask,
      pci,
 -    pci::{Class, ClassMask, Vendor},
 +    pci::{
 +        Class,
 +        ClassMask,
 +        Vendor, //
 +    },
      prelude::*,
      sizes::SZ_16M,
 -    sync::Arc,
 +    sync::Arc, //
  };
  
  use crate::gpu::Gpu;
@@@ -67,31 -53,21 +69,26 @@@ impl pci::Driver for NovaCore 
      type IdInfo = ();
      const ID_TABLE: pci::IdTable<Self::IdInfo> = &PCI_TABLE;
  
-     fn probe(pdev: &pci::Device<Core>, _info: &Self::IdInfo) -> Result<Pin<KBox<Self>>> {
-         dev_dbg!(pdev.as_ref(), "Probe Nova Core GPU driver.\n");
+     fn probe(pdev: &pci::Device<Core>, _info: &Self::IdInfo) -> impl PinInit<Self, Error> {
+         pin_init::pin_init_scope(move || {
+             dev_dbg!(pdev.as_ref(), "Probe Nova Core GPU driver.\n");
  
-         pdev.enable_device_mem()?;
-         pdev.set_master();
+             pdev.enable_device_mem()?;
+             pdev.set_master();
  
-         // SAFETY: No concurrent DMA allocations or mappings can be made because
-         // the device is still being probed and therefore isn't being used by
-         // other threads of execution.
-         unsafe { pdev.dma_set_mask_and_coherent(DmaMask::new::<GPU_DMA_BITS>())? };
++            // SAFETY: No concurrent DMA allocations or mappings can be made because
++            // the device is still being probed and therefore isn't being used by
++            // other threads of execution.
++            unsafe { pdev.dma_set_mask_and_coherent(DmaMask::new::<GPU_DMA_BITS>())? };
 +
-         let devres_bar = Arc::pin_init(
-             pdev.iomap_region_sized::<BAR0_SIZE>(0, c_str!("nova-core/bar0")),
-             GFP_KERNEL,
-         )?;
+             let bar = Arc::pin_init(
+                 pdev.iomap_region_sized::<BAR0_SIZE>(0, c_str!("nova-core/bar0")),
+                 GFP_KERNEL,
+             )?;
  
-         // Used to provided a `&Bar0` to `Gpu::new` without tying it to the lifetime of
-         // `devres_bar`.
-         let bar_clone = Arc::clone(&devres_bar);
-         let bar = bar_clone.access(pdev.as_ref())?;
- 
-         let this = KBox::pin_init(
-             try_pin_init!(Self {
-                 gpu <- Gpu::new(pdev, devres_bar, bar),
-                 _reg: auxiliary::Registration::new(
+             Ok(try_pin_init!(Self {
+                 gpu <- Gpu::new(pdev, bar.clone(), bar.access(pdev.as_ref())?),
+                 _reg <- auxiliary::Registration::new(
                      pdev.as_ref(),
                      c_str!("nova-drm"),
                      0, // TODO[XARR]: Once it lands, use XArray; for now we don't use the ID.

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ