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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250428204101.40a35c07@canb.auug.org.au>
Date: Mon, 28 Apr 2025 20:41:01 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andreas Hindborg <a.hindborg@...nel.org>, Andrew Morton
 <akpm@...ux-foundation.org>, Danilo Krummrich <dakr@...nel.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next
 Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the rust-xarray tree

Hi all,

On Mon, 28 Apr 2025 20:39:43 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> After merging the rust-xarray tree, today's linux-next build (x86_64
> allmodconfig) failed like this:

error[E0308]: mismatched types
  --> rust/kernel/auxiliary.rs:76:73
   |
55 | impl<T: Driver + 'static> Adapter<T> {
   |      - found this type parameter
...
76 |                 unsafe { bindings::auxiliary_set_drvdata(adev.as_raw(), data.into_foreign()) };
   |                          -------------------------------                ^^^^^^^^^^^^^^^^^^^ expected `*mut c_void`, found `*mut T`
   |                          |
   |                          arguments to this function are incorrect
   |
   = note: expected raw pointer `*mut c_void`
              found raw pointer `*mut T`
note: function defined here
  --> rust/bindings/bindings_helpers_generated.rs:5:12
   |
5  |     pub fn auxiliary_set_drvdata(adev: *mut auxiliary_device, data: *mut ffi::c_void);
   |            ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> rust/kernel/auxiliary.rs:92:47
   |
55 | impl<T: Driver + 'static> Adapter<T> {
   |      - expected this type parameter
...
92 |         drop(unsafe { KBox::<T>::from_foreign(ptr) });
   |                       ----------------------- ^^^ expected `*mut T`, found `*mut c_void`
   |                       |
   |                       arguments to this function are incorrect
   |
   = note: expected raw pointer `*mut T`
              found raw pointer `*mut c_void`
note: associated function defined here
  --> rust/kernel/types.rs:63:15
   |
63 |     unsafe fn from_foreign(ptr: *mut Self::PointedTo) -> Self;
   |               ^^^^^^^^^^^^

error[E0308]: mismatched types
   --> rust/kernel/miscdevice.rs:256:66
    |
256 |         let device = unsafe { <T::Ptr as ForeignOwnable>::borrow(private) };
    |                               ---------------------------------- ^^^^^^^ expected `*mut <... as ForeignOwnable>::PointedTo`, found `*mut c_void`
    |                               |
    |                               arguments to this function are incorrect
    |
    = note: expected raw pointer `*mut <<T as MiscDevice>::Ptr as ForeignOwnable>::PointedTo`
               found raw pointer `*mut c_void`
    = help: consider constraining the associated type `<<T as MiscDevice>::Ptr as ForeignOwnable>::PointedTo` to `c_void` or calling a method that returns `<<T as MiscDevice>::Ptr as ForeignOwnable>::PointedTo`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: associated function defined here
   --> rust/kernel/types.rs:98:15
    |
98  |     unsafe fn borrow<'a>(ptr: *mut Self::PointedTo) -> Self::Borrowed<'a>;
    |               ^^^^^^

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0308`.

> I don't know what caused this, but it is presumably an interaction
> between this tree and the mm-unstable and drm-nova trees.
> 
> I have dropped the rust-xarray tree for today.

-- 
Cheers,
Stephen Rothwell

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ