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.215745.2138534529135480572.fujita.tomonori@gmail.com>
Date: Thu, 03 Apr 2025 21:57:45 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: a.hindborg@...nel.org
Cc: fujita.tomonori@...il.com, boqun.feng@...il.com, tglx@...utronix.de,
 linux-kernel@...r.kernel.org, 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,
 gary@...yguo.net, bjorn3_gh@...tonmail.com, benno.lossin@...ton.me,
 a.hindborg@...sung.com, aliceryhl@...gle.com, anna-maria@...utronix.de,
 frederic@...nel.org, 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, me@...enk.dev, david.laight.linux@...il.com
Subject: Re: [PATCH v11 6/8] MAINTAINERS: rust: Add new sections for
 DELAY/SLEEP and TIMEKEEPING API

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

>>>> You will need to fix something because patch 2-6 removes `Ktime` ;-)
>>>
>>> Yea, but `Instant` is almost a direct substitution, right? Anyway, Tomo
>>> can send a new spin and change all the uses of Ktime, or I can do it. It
>>> should be straight forward. Either way is fine with me.
>>
>> `Delta`? Not `Instant`.
> 
> It depends. Current hrtimer takes `Ktime` and supports
> `HrTimerMode::Absolute` and `HrTimerMode::Relative`. With `Delta` and
> `Instant` we should take `Instant` for `HrTimerMode::Absolute` and
> `Delta` for `HrTimerMode::Relative`. The API needs to be modified a bit
> to make that work though. Probably we need to make the start function
> generic over the expiration type or something.
> 
> If you want to, you can fix that. If not, you can use `Instant` for the
> relative case as well, and we shall interpret it as duration. Then I
> will fix it up later. Your decision.
> 
>> All Ktime in hrtimer are passed to hrtimer_start_range_ns(), right?
> 
> Yes, that is where they end up.

Ah, I found that __hrtimer_start_range_ns() handles ktime_t
differently in HRTIMER_MODE_REL mode.

As you said, looks like the API needs to be updated and I think that
it's best to leave that to you. I'll just use `Instant` for all cases.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ