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] [day] [month] [year] [list]
Message-ID: <87ms9ktoly.fsf@kernel.org>
Date: Fri, 04 Jul 2025 09:13:45 +0200
From: Andreas Hindborg <a.hindborg@...nel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: FUJITA Tomonori <fujita.tomonori@...il.com>,  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

Miguel Ojeda <miguel.ojeda.sandonis@...il.com> writes:

> On Fri, Jul 4, 2025 at 2:08 AM FUJITA Tomonori
> <fujita.tomonori@...il.com> wrote:
>>
>> I had a quick look at the official Rust documentation, and I think I
>> agree with this opinion.
>
> My personal take: I agree that having both English and something else
> is a bit redundant -- some redundancy is good when something (like a
> notation) may be non-obvious, but I think a math integer interval or a
> Rust range or a condition like 0 <= v <= `KTIME_MAX` are all
> understandable in this context.
>
> Now, whether to use English or any of the other options, it is hard to
> say what is best for most readers. Personally, I prefer to just see
> one of the expressions, which makes it also closer to other forms,
> e.g. a debug assert somewhere, or a contract, or other tooling or
> formalization efforts.

I would prefer `0..=KTIME_MAX` or `0 <= v <= KTIME_MAX`. English prose
is also OK and I won't object to that, but I prefer the others.


Best regards,
Andreas Hindborg



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ