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: <20260106152300.7fec3847.gary@garyguo.net>
Date: Tue, 6 Jan 2026 15:23:00 +0000
From: Gary Guo <gary@...yguo.net>
To: Andreas Hindborg <a.hindborg@...nel.org>
Cc: FUJITA Tomonori <fujita.tomonori@...il.com>, aliceryhl@...gle.com,
 lyude@...hat.com, boqun.feng@...il.com, will@...nel.org,
 peterz@...radead.org, richard.henderson@...aro.org, mattst88@...il.com,
 linmag7@...il.com, catalin.marinas@....com, ojeda@...nel.org,
 bjorn3_gh@...tonmail.com, lossin@...nel.org, tmgross@...ch.edu,
 dakr@...nel.org, mark.rutland@....com, frederic@...nel.org,
 tglx@...utronix.de, anna-maria@...utronix.de, jstultz@...gle.com,
 sboyd@...nel.org, viro@...iv.linux.org.uk, brauner@...nel.org,
 jack@...e.cz, linux-kernel@...r.kernel.org, linux-alpha@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, rust-for-linux@...r.kernel.org,
 linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 4/5] rust: hrtimer: use READ_ONCE instead of
 read_volatile

On Tue, 06 Jan 2026 13:37:34 +0100
Andreas Hindborg <a.hindborg@...nel.org> wrote:

> "FUJITA Tomonori" <fujita.tomonori@...il.com> writes:
> >
> > Sorry, of course this should be:
> >
> > +__rust_helper ktime_t rust_helper_hrtimer_get_expires(const struct hrtimer *timer)
> > +{
> > +	return hrtimer_get_expires(timer);
> > +}
> >  
> 
> This is a potentially racy read. As far as I recall, we determined that
> using read_once is the proper way to handle the situation.
> 
> I do not think it makes a difference that the read is done by C code.

If that's the case I think the C code should be fixed by inserting the
READ_ONCE?

Best,
Gary

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ