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: <CANiq72=nLeuw030T16-vDZT4A_gNyPm7WuXoK_3nFo0h0-eKJQ@mail.gmail.com>
Date: Tue, 24 Jun 2025 12:31:52 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>, Danilo Krummrich <dakr@...nel.org>, 
	Alexandre Courbot <acourbot@...dia.com>, Lyude Paul <lyude@...hat.com>, 
	Andreas Hindborg <a.hindborg@...nel.org>, FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Tamir Duberstein <tamird@...il.com>, 
	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 tree

On Tue, Jun 24, 2025 at 9:31 AM Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> error[E0277]: the trait bound `u32: From<DmaTrfCmdSize>` is not satisfied

> error[E0599]: no method named `as_nanos` found for struct `Delta` in the current scope

> Presumably caused by commit
>
>   b7c8d7a8d251 ("rust: enable `clippy::cast_lossless` lint")

The first error, yes -- the `register!` macro was changed to use
`u32::from()` to avoid an `as` cast in that commit, and while the cast
is OK converting the new `enum`s like `FalconCoreRev`, `from()`
isn't`, so we would need to implement `From` explicitly -- Cc'ing
Danilo, Alexandre, Lyude.

The second error is due to 2ed94606a0fe ("rust: time: Rename Delta's
methods from as_* to into_*"). However, I am not sure why that patch
was applied since we were discussing the naming of those methods
elsewhere -- Cc'ing Andreas and Tomonori.

Nevertheless, even if 2ed94606a0fe is dropped (or the conflict solved
by a trivial rename), there will be another nearby conflict after that
one, due the addition of the `ClockSource` generic parameter, so that
needs a change too, e.g. using `Monotonic` explicitly if that is
correct or allowing the caller to pass a `ClockSource`.

By the way, I also noticed a Clippy warning in `nova-next` (on its
own, i.e. without merging anything) -- please see below [1].

I hope this helps.

Cheers,
Miguel

[1]

    error: mutable borrow from immutable input(s)
       --> rust/kernel/dma.rs:297:78
        |
    297 |     pub unsafe fn as_slice_mut(&self, offset: usize, count:
usize) -> Result<&mut [T]> {
        |
                ^^^^^^^^
        |
    note: immutable borrow here
       --> rust/kernel/dma.rs:297:32
        |
    297 |     pub unsafe fn as_slice_mut(&self, offset: usize, count:
usize) -> Result<&mut [T]> {
        |                                ^^^^^
        = help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
        = note: `-D clippy::mut-from-ref` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(clippy::mut_from_ref)]`

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ