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: <Z_kkYsLNiZ_t4z5b@cassiopeiae>
Date: Fri, 11 Apr 2025 16:17:06 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Christian Schrefl <chrisi.schrefl@...il.com>
Cc: Luis Chamberlain <mcgrof@...nel.org>,
	Russ Weight <russ.weight@...ux.dev>,
	Miguel Ojeda <ojeda@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>,
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <benno.lossin@...ton.me>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
	linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH] rust: fix building firmware abstraction on 32bit arm

On Fri, Apr 11, 2025 at 03:47:28PM +0200, Christian Schrefl wrote:
> On 11.04.25 12:35 PM, Danilo Krummrich wrote:
> > On Fri, Apr 11, 2025 at 09:14:48AM +0200, Christian Schrefl wrote:
> > I did a test build with multi_v7_defconfig and I can't reproduce this issue.
> > 
> Interesting, I've it seems this is only an issue on 6.13 with my arm patches applied.
> 
> It seems that it works on v6.14 and v6.15-rc1 but the error occurs on ffd294d346d1 (tag: v6.13)
> with my 32-bit arm patches applied.

That makes sense, commit 1bae8729e50a ("rust: map `long` to `isize` and `char`
to `u8`") changed FwFunc to take a *const u8, which previously was *const i8.

> >> diff --git a/rust/kernel/firmware.rs b/rust/kernel/firmware.rs
> >> index f04b058b09b2d2397e26344d0e055b3aa5061432..1d6284316f2a4652ef3f76272670e5e29b0ff924 100644
> >> --- a/rust/kernel/firmware.rs
> >> +++ b/rust/kernel/firmware.rs
> >> @@ -5,14 +5,18 @@
> >>  //! C header: [`include/linux/firmware.h`](srctree/include/linux/firmware.h)
> >>  
> >>  use crate::{bindings, device::Device, error::Error, error::Result, str::CStr};
> >> -use core::ptr::NonNull;
> >> +use core::{ffi, ptr::NonNull};
> > 
> > The change itself seems to be fine anyways, but I think we should use crate::ffi
> > instead.
> Right, I just did what RA recommended without thinking about it much.
> 
> I guess this patch isn't really needed. Should I still send a V2 using `crate::ffi`?

Yes, please. I think it's still an improvement.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ