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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r02qz77h.fsf@db48x.net>
Date: Fri, 21 Mar 2025 09:20:18 -0700
From: Daniel Brooks <db48x@...8x.net>
To: "Alexandre Courbot" <acourbot@...dia.com>
Cc: "Boqun Feng" <boqun.feng@...il.com>,  "Danilo Krummrich"
 <dakr@...nel.org>,  "David Airlie" <airlied@...il.com>,  "John Hubbard"
 <jhubbard@...dia.com>,  "Ben Skeggs" <bskeggs@...dia.com>,  "Miguel Ojeda"
 <ojeda@...nel.org>,  "Alex Gaynor" <alex.gaynor@...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>,  "Simona Vetter" <simona@...ll.ch>,
  <linux-kernel@...r.kernel.org>,  <rust-for-linux@...r.kernel.org>,
  <nouveau@...ts.freedesktop.org>,  <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH RFC v3 6/7] gpu: nova-core: add basic timer device

"Alexandre Courbot" <acourbot@...dia.com> writes:

> Hi Boqun,
>
> On Fri Mar 21, 2025 at 3:17 AM JST, Boqun Feng wrote:
>> Also an Instant type has been proposed and reviewed for a while:
>>
>> 	https://lore.kernel.org/rust-for-linux/20250220070611.214262-5-fujita.tomonori@gmail.com/
>>
>> we should use that type instead of re-inventing the wheel here. Of
>> course, it's currently not quite working because Instant is only for
>> CLOCK_MONOTONIC. But there was a proposal to make `Instant` generic over
>> clock:
>>
>> 	https://lore.kernel.org/rust-for-linux/20230714-rust-time-v2-1-f5aed84218c4@asahilina.net/
>>
>> if you follow that design, you can implement a `Instant<NovaGpu>`, where
>>
>>     ipml Now for NovaGpu {
>>         fn now() -> Instant<Self> {
>> 	    // your Timer::read() implementation.
>> 	}
>>     }
>
> Ah, thanks for pointing this out. I'll keep track of these patches,
> hopefully they get merged soon!

Would that actually work though? Instant is a ktime_t, which is a signed
i64 rather than a u64. When I read your patch I assumed that you had to
add your own Timestamp because the value had to be whatever was read
from the GPU, independent of the clock value kept by the system or other
hardware.

db48x

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ