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-next>] [day] [month] [year] [list]
Message-ID: <700ebe13-c2d3-48e3-800f-8dc327efb6fc@gmail.com>
Date: Thu, 29 May 2025 23:23:41 -0700
From: Rudraksha Gupta <guptarud@...il.com>
To: linux-kernel@...r.kernel.org,
 Linux regressions mailing list <regressions@...ts.linux.dev>,
 rust-for-linux@...r.kernel.org, Miguel Ojeda <ojeda@...nel.org>
Subject: REGRESSION: armv7 build mismatched types

Logs: https://gitlab.postmarketos.org/LogicalErzor/pmaports/-/jobs/1368490

Archive: 
https://web.archive.org/web/20250530060232/https://gitlab.postmarketos.org/LogicalErzor/pmaports/-/jobs/1368490/raw


Snip:

||

|EXPORTS rust/exports_core_generated.h|
|
||
RUSTC L rust/compiler_builtins.o
||
RUSTC L rust/ffi.o
||
RUSTC L rust/build_error.o
||
RUSTC L rust/pin_init.o
||
RUSTC L rust/bindings.o
||
RUSTC L rust/uapi.o
||
EXPORTS rust/exports_bindings_generated.h
||
RUSTC L rust/kernel.o
||
error[E0308]: mismatched types
||
--> rust/kernel/lib.rs:234:45
||
|
||
234 | $crate::assert_same_type(field_ptr, (&raw const 
(*container_ptr).$($fields)*).cast_mut());
||
| ------------------------ --------- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const 
drm_device`, found `*mut Opaque<drm_device>`
||
| | |
||
| | expected all arguments to be this `*const drm_device` type because 
they need to match the type of this parameter
||
| arguments to this function are incorrect
||
|
||
::: rust/kernel/drm/device.rs:140:18
||
|
||
140 | unsafe { crate::container_of!(ptr, Self, dev) }.cast_mut()
||
| ------------------------------------ in this macro invocation
||
|
||
= note: expected raw pointer `*const drm_device`
||
found raw pointer `*mut Opaque<drm_device>`
||
note: function defined here
||
--> rust/kernel/lib.rs:241:8
||
|
||
241 | pub fn assert_same_type<T>(_: T, _: T) {}
||
| ^^^^^^^^^^^^^^^^ - ---- ---- this parameter needs to match the `*const 
drm_device` type of parameter #1
||
| | |
||
| | parameter #2 needs to match the `*const drm_device` type of this 
parameter
||
| parameter #1 and parameter #2 both reference this parameter `T`
||
= note: this error originates in the macro `crate::container_of` (in 
Nightly builds, run with -Z macro-backtrace for more info)
||
error[E0308]: mismatched types
||
--> rust/kernel/lib.rs:234:45
||
|
||
234 | $crate::assert_same_type(field_ptr, (&raw const 
(*container_ptr).$($fields)*).cast_mut());
||
| ------------------------ --------- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut 
drm_gem_object`, found `*mut Opaque<drm_gem_object>`
||
| | |
||
| | expected all arguments to be this `*mut drm_gem_object` type because 
they need to match the type of this parameter
||
| arguments to this function are incorrect
||
|
||
::: rust/kernel/drm/gem/mod.rs:130:20
||
|
||
130 | unsafe { &*crate::container_of!(self_ptr, Object<T>, obj) }
||
| ---------------------------------------------- in this macro invocation
||
|
||
= note: expected raw pointer `*mut drm_gem_object`
||
found raw pointer `*mut Opaque<drm_gem_object>`
||
note: function defined here
||
--> rust/kernel/lib.rs:241:8
||
|
||
241 | pub fn assert_same_type<T>(_: T, _: T) {}
||
| ^^^^^^^^^^^^^^^^ - ---- ---- this parameter needs to match the `*mut 
drm_gem_object` type of parameter #1
||
| | |
||
| | parameter #2 needs to match the `*mut drm_gem_object` type of this 
parameter
||
| parameter #1 and parameter #2 both reference this parameter `T`
||
= note: this error originates in the macro `crate::container_of` (in 
Nightly builds, run with -Z macro-backtrace for more info)
||
error[E0308]: mismatched types
||
--> rust/kernel/lib.rs:234:45
||
|
||
234 | $crate::assert_same_type(field_ptr, (&raw const 
(*container_ptr).$($fields)*).cast_mut());
||
| ------------------------ --------- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut 
drm_gem_object`, found `*mut Opaque<drm_gem_object>`
||
| | |
||
| | expected all arguments to be this `*mut drm_gem_object` type because 
they need to match the type of this parameter
||
| arguments to this function are incorrect
||
|
||
::: rust/kernel/drm/gem/mod.rs:273:29
||
|
||
273 | let this = unsafe { crate::container_of!(obj, Self, obj) };
||
| ------------------------------------ in this macro invocation
||
|
||
= note: expected raw pointer `*mut drm_gem_object`
||
found raw pointer `*mut Opaque<drm_gem_object>`
||
note: function defined here
||
--> rust/kernel/lib.rs:241:8
||
|
||
241 | pub fn assert_same_type<T>(_: T, _: T) {}
||
| ^^^^^^^^^^^^^^^^ - ---- ---- this parameter needs to match the `*mut 
drm_gem_object` type of parameter #1
||
| | |
||
| | parameter #2 needs to match the `*mut drm_gem_object` type of this 
parameter
||
| parameter #1 and parameter #2 both reference this parameter `T`
||
= note: this error originates in the macro `crate::container_of` (in 
Nightly builds, run with -Z macro-backtrace for more info)
||
error: aborting due to 3 previous errors
||
For more information about this error, try `rustc --explain E0308`.
||
make[2]: *** [rust/Makefile:538: rust/kernel.o] Error 1
||
make[1]: *** 
[/home/pmos/build/src/linux-next-next-20250530/Makefile:1285: prepare] 
Error 2
||make: *** [Makefile:248: __sub-make] Error 2|


Bad: next-20250530

Good: next-20250528


Likely introduced with: 
https://lore.kernel.org/all/CANiq72mFiCrzawVUVOU2giJtBVsRdAO3sGtDsZptPuFvmid3EQ@mail.gmail.com/


Repo: 
https://gitlab.postmarketos.org/LogicalErzor/pmaports/-/tree/rust/device/testing/linux-next

How it's built (Alpine-like build system):

- https://archive.ph/vxEmk

Config fragments (in addition to qcom_defconfig):

- https://archive.ph/q4hfc

- https://archive.ph/RKgFf


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ