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: <CAH5fLgipKcAk55r-KCYTh4JTooGhAv42kUU_L46=g-tUSo5n+A@mail.gmail.com>
Date: Wed, 22 Jan 2025 13:51:21 +0100
From: Alice Ryhl <aliceryhl@...gle.com>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: linux-kernel@...r.kernel.org, boqun.feng@...il.com, 
	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, 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
Subject: Re: [PATCH v8 3/7] rust: time: Introduce Instant type

On Wed, Jan 22, 2025 at 1:49 PM FUJITA Tomonori
<fujita.tomonori@...il.com> wrote:
>
> On Thu, 16 Jan 2025 21:06:44 +0900 (JST)
> FUJITA Tomonori <fujita.tomonori@...il.com> wrote:
>
> > On Thu, 16 Jan 2025 10:32:45 +0100
> > Alice Ryhl <aliceryhl@...gle.com> wrote:
> >
> >>> -impl Ktime {
> >>> -    /// Create a `Ktime` from a raw `ktime_t`.
> >>> +impl Instant {
> >>> +    /// Create a `Instant` from a raw `ktime_t`.
> >>>      #[inline]
> >>> -    pub fn from_raw(inner: bindings::ktime_t) -> Self {
> >>> +    fn from_raw(inner: bindings::ktime_t) -> Self {
> >>>          Self { inner }
> >>>      }
> >>
> >> Please keep this function public.
> >
> > Surely, your driver uses from_raw()?
>
> I checked out the C version of Binder driver and it doesn't seem like
> the driver needs from_raw function. The Rust version [1] also doesn't
> seem to need the function. Do you have a different use case?

Not for this particular function, but I've changed functions called
from_raw and similar from private to public so many times at this
point that I think it should be the default.


Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ