Rust for Linux List
 help / color / mirror / Atom feed
From: FUJITA Tomonori <tomo@flapping.org>
To: miguel.ojeda.sandonis@gmail.com
Cc: a.hindborg@kernel.org, tomo@flapping.org, tomo@aliasing.net,
	ojeda@kernel.org, gary@garyguo.net, dirk.behme@de.bosch.com,
	aliceryhl@google.com, anna-maria@linutronix.de,
	bjorn3_gh@protonmail.com, boqun@kernel.org, dakr@kernel.org,
	frederic@kernel.org, jstultz@google.com, lossin@kernel.org,
	lyude@redhat.com, sboyd@kernel.org, tglx@kernel.org,
	tmgross@umich.edu, rust-for-linux@vger.kernel.org,
	fujita.tomonori@gmail.com
Subject: Re: [PATCH v3] rust: hrtimer: Restrict expires() to safe contexts
Date: Thu, 16 Jul 2026 12:46:40 +0900 (JST)	[thread overview]
Message-ID: <20260716.124640.903442293670054204.tomo@flapping.org> (raw)
In-Reply-To: <CANiq72=XvdJhGcbfTF3yv_S9Ls7GbFL_fnwpoAUXmwFc6ND9Bg@mail.gmail.com>

On Wed, 15 Jul 2026 17:09:21 +0200
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:

> On Wed, Jul 15, 2026 at 3:37 PM Andreas Hindborg <a.hindborg@kernel.org> wrote:
>>
>> Either way is fine for me, but Gary seems to gravitate towards the
>> current solution, so maybe keep that? We can add a "// NOTE:" on the
>> struct definition saying that soundness depends on all fields being OK
>> with this caveat.
> 
> If something actually breaks, then apart from the note, what about
> `repr(transparent)` to enforce it?

Yeah, it would help. It doesn't guarantee the field stays behind
Opaque but I don't think anyone would swap Opaque<bindings::hrtimer>
for a bare bindings::hrtimer.


  reply	other threads:[~2026-07-16  3:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <hGNrgHLZgzaLAav_TQCJaAHYX3aWSPyoHeXEf7u3ioJunfoFTIPF9Q8PnCvfRKXq2SS-fNdOn35uMiTaF90nKA==@protonmail.internalid>
2026-03-03  6:10 ` [PATCH v3] rust: hrtimer: Restrict expires() to safe contexts FUJITA Tomonori
2026-06-18  9:56   ` Andreas Hindborg
2026-06-18 10:36     ` Miguel Ojeda
2026-06-19  9:56       ` Andreas Hindborg
2026-07-15 11:22     ` FUJITA Tomonori
2026-07-15 13:37       ` Andreas Hindborg
2026-07-15 15:09         ` Miguel Ojeda
2026-07-16  3:46           ` FUJITA Tomonori [this message]
2026-07-15 14:51       ` Gary Guo
2026-07-16  1:50         ` FUJITA Tomonori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260716.124640.903442293670054204.tomo@flapping.org \
    --to=tomo@flapping.org \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=anna-maria@linutronix.de \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=dirk.behme@de.bosch.com \
    --cc=frederic@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=jstultz@google.com \
    --cc=lossin@kernel.org \
    --cc=lyude@redhat.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=tomo@aliasing.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox