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: <87y0t7ugw4.fsf@kernel.org>
Date: Wed, 02 Jul 2025 10:38:19 +0200
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "FUJITA Tomonori" <fujita.tomonori@...il.com>
Cc: <aliceryhl@...gle.com>,  <alex.gaynor@...il.com>,  <ojeda@...nel.org>,
  <boqun.feng@...il.com>,  <anna-maria@...utronix.de>,
  <bjorn3_gh@...tonmail.com>,  <dakr@...nel.org>,  <frederic@...nel.org>,
  <gary@...yguo.net>,  <jstultz@...gle.com>,
  <linux-kernel@...r.kernel.org>,  <lossin@...nel.org>,
  <lyude@...hat.com>,  <rust-for-linux@...r.kernel.org>,
  <sboyd@...nel.org>,  <tglx@...utronix.de>,  <tmgross@...ch.edu>
Subject: Re: [PATCH v1] rust: time: make ClockSource unsafe trait

"FUJITA Tomonori" <fujita.tomonori@...il.com> writes:

> On Mon, 30 Jun 2025 15:33:31 +0200
> Alice Ryhl <aliceryhl@...gle.com> wrote:
>
>> On Mon, Jun 30, 2025 at 3:10 PM FUJITA Tomonori
>> <fujita.tomonori@...il.com> wrote:
>>>
>>> Mark the ClockSource trait as unsafe and document its safety
>>> requirements. Specifically, implementers must guarantee that their
>>> `ktime_get()` implementation returns a value in the inclusive range
>>> [0, KTIME_MAX].
>>>
>>> Update all existing implementations to use `unsafe impl` with
>>> corresponding safety comments.
>>>
>>> Note that there could be potential users of a customized clock source [1]
>>> so we don't seal the trait.
>>>
>>> Link: https://lore.kernel.org/rust-for-linux/Z9xb1r1x5tOzAIZT@boqun-archlinux/ [1]
>>> Suggested-by: Boqun Feng <boqun.feng@...il.com>
>>> Signed-off-by: FUJITA Tomonori <fujita.tomonori@...il.com>
>>
>> LGTM:
>> Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
>
> Thanks!
>
>> Though you're missing `` around [0; KTIME_MAX] in some places, which
>> may be worth adding.
>
> Andreas, would you like me to send v2 with the above changes?

I can add the ticks.


Best regards,
Andreas Hindborg



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ