rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: "Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@samsung.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@lists.linux.dev
Subject: Re: [PATCH 3/3] rust: upgrade to Rust 1.78.0
Date: Mon, 1 Apr 2024 23:52:11 +0200	[thread overview]
Message-ID: <CANiq72=FM2+VWs1sJTc3i2u4Y4P-DBR8o_h4Gd7MYXfxULjR-A@mail.gmail.com> (raw)
In-Reply-To: <20240401212303.537355-4-ojeda@kernel.org>

On Mon, Apr 1, 2024 at 11:23 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> It also means that, ignoring non-language/library features, we are
> currently left with just the few language features needed to implement the
> kernel `Arc`, the `new_uninit` library feature, the `compiler_builtins`
> marker and the few `no_*` `cfg`s we pass when compiling `core`/`alloc`.

To be clear, by "currently" I meant in mainline, i.e. it does not mean
that we will not need/add a few more language/library features in the
future.

> Rust 1.78.0 introduced support for mutable pointers to Rust statics,
> including a test case for the Linux kernel's `VTABLE` use case [13].

I should have mentioned constants so that it makes sense. I will link
to `const_refs_to_static`, i.e.
https://github.com/rust-lang/rust/issues/119618.

> Rust 1.78.0 with debug assertions enabled (i.e. `-Cdebug-assertions=y`,
> kernel's `CONFIG_RUST_DEBUG_ASSERTIONS=y`) now always checks all unsafe
> preconditions, without a way to opt-out for particular cases [14].

It would be ideal to have a way to selectively disable certain checks
per-call site for this one (i.e. not just per check but for particular
instances of a check), even if the vast majority of the checks remain
in place. I discuss the details a bit more at
https://github.com/Rust-for-Linux/linux/issues/354.

> Please note that Rust 1.78.0 will be released in a month (2024-05-02).

By the way, I tested these with arm64, loongarch64 and x86_64.

Cheers,
Miguel

  reply	other threads:[~2024-04-01 21:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 21:23 [PATCH 0/3] Rust 1.78.0 upgrade Miguel Ojeda
2024-04-01 21:23 ` [PATCH 1/3] rust: sync: implement `Default` for `LockClassKey` Miguel Ojeda
2024-04-01 22:26   ` Boqun Feng
2024-04-02  9:46   ` Alice Ryhl
2024-04-02 23:12   ` Benno Lossin
2024-04-01 21:23 ` [PATCH 2/3] rust: kernel: remove redundant imports Miguel Ojeda
2024-04-02  9:48   ` Alice Ryhl
2024-04-01 21:23 ` [PATCH 3/3] rust: upgrade to Rust 1.78.0 Miguel Ojeda
2024-04-01 21:52   ` Miguel Ojeda [this message]
2024-04-04 12:41   ` Alice Ryhl
2024-05-05 22:33 ` [PATCH 0/3] Rust 1.78.0 upgrade Miguel Ojeda

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='CANiq72=FM2+VWs1sJTc3i2u4Y4P-DBR8o_h4Gd7MYXfxULjR-A@mail.gmail.com' \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=a.hindborg@samsung.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=wedsonaf@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).