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] [day] [month] [year] [list]
Message-ID: <20250801171816.1af66375@canb.auug.org.au>
Date: Fri, 1 Aug 2025 17:18:16 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Danilo Krummrich <dakr@...nel.org>, Miguel Ojeda <ojeda@...nel.org>
Cc: Andreas Hindborg <a.hindborg@...nel.org>, Alexandre Courbot
 <acourbot@...dia.com>, FUJITA Tomonori <fujita.tomonori@...il.com>, Linux
 Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List
 <linux-next@...r.kernel.org>
Subject: Re: linux-next: manual merge of the rust-timekeeping tree with the
 drm-nova tree

Hi all,

On Tue, 24 Jun 2025 19:51:42 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> After merging the rust-timekeeping tree, today's linux-next build
> (x86_64 allmodconfig) failed like this:
> 
> error[E0599]: no method named `as_nanos` found for struct `Delta` in the current scope
>   --> drivers/gpu/nova-core/util.rs:45:33  
>    |
> 45 |         if start_time.elapsed().as_nanos() > timeout.as_nanos() as i64 {
>    |                                 ^^^^^^^^ method not found in `Delta`
> 
> error: aborting due to 1 previous error
> 
> For more information about this error, try `rustc --explain E0599`.
> 
> Caused by commits
> 
>   2ed94606a0fe ("rust: time: Rename Delta's methods from as_* to into_*")
>   768dfbfc98e2 ("rust: time: Make Instant generic over ClockSource")
> 
> interacting with commit
> 
>   a03c9bd953c2 ("gpu: nova-core: add helper function to wait on condition")
> 
> from the drm-nova tree.
> 
> I tried to fix it up, but this lead down a rabbit hole and my rust
> skills are poor, so I just dropped the rust-timekeeping tree for today.
> A merge resolution would be appreciated.

This is now a conflict between the rust tree and Linus' tree.

The resolution being used is:

From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Wed, 25 Jun 2025 16:00:14 +1000
Subject: [PATCH] fix up for "rust: time: Make Instant generic over ClockSource"

interacting with "gpu: nova-core: add helper function to wait on
condition" from the drm-nova tree

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 drivers/gpu/nova-core/util.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/nova-core/util.rs b/drivers/gpu/nova-core/util.rs
index 64fb13760764..76cedf3710d7 100644
--- a/drivers/gpu/nova-core/util.rs
+++ b/drivers/gpu/nova-core/util.rs
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 
 use kernel::prelude::*;
-use kernel::time::{Delta, Instant};
+use kernel::time::{Delta, Instant, Monotonic};
 
 pub(crate) const fn to_lowercase_bytes<const N: usize>(s: &str) -> [u8; N] {
     let src = s.as_bytes();
@@ -33,7 +33,7 @@ pub(crate) const fn const_bytes_to_str(bytes: &[u8]) -> &str {
 /// TODO[DLAY]: replace with `read_poll_timeout` once it is available.
 /// (https://lore.kernel.org/lkml/20250220070611.214262-8-fujita.tomonori@gmail.com/)
 pub(crate) fn wait_on<R, F: Fn() -> Option<R>>(timeout: Delta, cond: F) -> Result<R> {
-    let start_time = Instant::now();
+    let start_time = Instant::<Monotonic>::now();
 
     loop {
         if let Some(ret) = cond() {

-- 
Cheers,
Stephen Rothwell

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ