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: <20250913211633.GA1562398@joelbox2>
Date: Sat, 13 Sep 2025 17:16:33 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Danilo Krummrich <dakr@...nel.org>,
	Alexandre Courbot <acourbot@...dia.com>,
	Miguel Ojeda <ojeda@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>,
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <lossin@...nel.org>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	John Hubbard <jhubbard@...dia.com>,
	Alistair Popple <apopple@...dia.com>, Timur Tabi <ttabi@...dia.com>,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
	nouveau@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v5 02/12] gpu: nova-core: move GSP boot code to a
 dedicated method

Hi Miguel,

On Sat, Sep 13, 2025 at 10:37:34PM +0200, Miguel Ojeda wrote:
> On Sat, Sep 13, 2025 at 7:14 PM Joel Fernandes <joelagnelf@...dia.com> wrote:
> >
> > I am not alone in that opinion.
> 
> Hmm... I am not sure how to read this.

I don't follow? I am just saying that pinning seems to be a rather odd thing
to do explictly that we don't in other languages. I know why Rust needs it,
but it is even more strange that Rust requires additional macros in the
kernel to further implement features required for it, when it probably should
been a part of the language design from the beginning (and not require
changes to macros to support usecases, like we saw for Nova).

It is possible that I don't fully understand pinning - but what I do
understand (and please correct me if I'm wrong), pinning is required mainly
because Rust default-moves data which wreaks havoc for stuff that unsafe code
(C code) exposes (spinlocks for example) or data hardware expects to be at
fixed locations. This also arises because of mixing unsafe code, with safe
code.  So it is required mainly because Unsafe code (and hardware) does not
break, due to "safe" Rust's default movement. Is my understanding wrong?

> > This should be first-class in a (systems) language, built into
> > the language itself?
> 
> I would suggest taking a look at our website and the links there (like
> issue #2) -- what we are doing upstream Rust is documented.

Sure, thanks for the pointers, I will study them further.

> (Danilo gave you a direct link, but I mention it this way because
> there are a lot of things going on, and it is worth a look and perhaps
> you may find something interesting you could help with).

Sure, thanks.

> > except to satisfy paranoia
> 
> Using unsafe code everywhere (or introducing unsoundness or UB for
> convenience) would defeat much of the Rust for Linux exercise.

Where in the thread did I suggest that, though? (using unsafe everywhere).

Also note, I'm pretty much a Rust (and Rust 4 linux) newbie and don't claim
to be any kind of expert in these. But I have studied Rust for about a year
now and pinning for a few months :). I don't mean to make noise, just
discussing so I can learn more and help in some way :) Please don't be too
offended by my ramblings.

thanks,

 - Joel


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ