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: <20241003.012444.1141005464454659219.fujita.tomonori@gmail.com>
Date: Thu, 03 Oct 2024 01:24:44 +0000 (UTC)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: tglx@...utronix.de
Cc: miguel.ojeda.sandonis@...il.com, fujita.tomonori@...il.com,
 aliceryhl@...gle.com, andrew@...n.ch, netdev@...r.kernel.org,
 rust-for-linux@...r.kernel.org, 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
Subject: Re: [PATCH net-next v1 1/2] rust: add delay abstraction

On Wed, 02 Oct 2024 21:40:45 +0200
Thomas Gleixner <tglx@...utronix.de> wrote:

> On Wed, Oct 02 2024 at 16:52, Miguel Ojeda wrote:
>> On Wed, Oct 2, 2024 at 4:40 PM FUJITA Tomonori
>> <fujita.tomonori@...il.com> wrote:
>>>
>>> Sure. Some code use ktime_t to represent duration so using Ktime for
>>> the delay functions makes sense. I'll add some methods to Ktime and
>>> use it.
>>
>> We really should still use different types to represent points and
>> deltas, even if internally they happen to end up using/being the
>> "same" thing.
>>
>> If we start mixing those two up, then it will be harder to unravel later.
>>
>> I think Thomas also wanted to have two types, please see this thread:
>> https://lore.kernel.org/rust-for-linux/87h6vfnh0f.ffs@tglx/ (we also
>> discussed clocks).
> 
> Correct. They are distinct.

Understood. I'll add a new type, time::Delta. Any alternative name
suggestions?

> Btw, why is this sent to netdev and not to LKML? delay is generic code
> and has nothing to do with networking.

Rust abstractions are typically merged with their users. I'm trying to
push the delay abstractions with a fix for QT2025 PHY driver
(drivers/net/phy/qt2025.rs), which uses delay.

Sorry, I'll send v2 to timers maintainers too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ