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: <20250403.212327.2029028318504480690.fujita.tomonori@gmail.com>
Date: Thu, 03 Apr 2025 21:23:27 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: a.hindborg@...nel.org
Cc: fujita.tomonori@...il.com, linux-kernel@...r.kernel.org,
 daniel.almeida@...labora.com, boqun.feng@...il.com, gary@...yguo.net,
 me@...enk.dev, rust-for-linux@...r.kernel.org, netdev@...r.kernel.org,
 andrew@...n.ch, hkallweit1@...il.com, tmgross@...ch.edu, ojeda@...nel.org,
 alex.gaynor@...il.com, bjorn3_gh@...tonmail.com, benno.lossin@...ton.me,
 a.hindborg@...sung.com, aliceryhl@...gle.com, anna-maria@...utronix.de,
 frederic@...nel.org, tglx@...utronix.de, arnd@...db.de,
 jstultz@...gle.com, sboyd@...nel.org, mingo@...hat.com,
 peterz@...radead.org, juri.lelli@...hat.com, vincent.guittot@...aro.org,
 dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
 mgorman@...e.de, vschneid@...hat.com, tgunders@...hat.com,
 david.laight.linux@...il.com
Subject: Re: [PATCH v11 4/8] rust: time: Introduce Instant type

On Thu, 03 Apr 2025 12:41:52 +0200
Andreas Hindborg <a.hindborg@...nel.org> wrote:

>>> As Boqun mentioned, we should make this generic over `ClockId` when the
>>> hrtimer patches land.
>>
>> Seems that I overlooked his mail. Can you give me a pointer?
>>
>> I assume that you want the Instance type to vary depending on the
>> clock source.
> 
> Yea, basically it is only okay to subtract instants if they are derived
> from the same clock source. Boqun suggested here [1] before hrtimer
> patches landed I think.
> 
> At any rate, now we have `kernel::time::ClockId`. It is an enum though,
> so I am not sure how to go about it in practice. But we would want
> `Instant<RealTime> - Instant<BootTime>` to give a compiler error.

Understood, thanks!

If we need a compile error for this, I don't think that the enum
works; I guess that we need a distinct type for each of RealTime,
BootTime, and so on.

Once the current patchset is merged, I'll work on that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ