[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5bd04709-55ff-4d4d-9559-3ae55fb42c9a@kernel.org>
Date: Tue, 30 Sep 2025 15:33:13 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Alistair Popple <apopple@...dia.com>
Cc: rust-for-linux@...r.kernel.org, dri-devel@...ts.freedesktop.org,
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>, Joel Fernandes <joelagnelf@...dia.com>,
Timur Tabi <ttabi@...dia.com>, linux-kernel@...r.kernel.org,
nouveau@...ts.freedesktop.org
Subject: Re: [PATCH v3 05/13] gpu: nova-core: Add GSP command queue bindings
On 9/30/25 3:16 PM, Alistair Popple wrote:
> +impl GspRpcHeader {
> + pub(crate) fn new(cmd_size: u32, function: u32) -> Self {
> + Self(bindings::rpc_message_header_v {
> + // TODO: magic number
> + header_version: 0x03000000,
> + signature: bindings::NV_VGPU_MSG_SIGNATURE_VALID,
> + function,
> + // We don't ever expect to send a command large enough to overflow.
> + length: (size_of::<Self>() as u32).checked_add(cmd_size).unwrap(),
This is pretty much equivalent to "we never expect to make any mistakes, hence
just crash the kernel". Please handle errors gracefully.
Powered by blists - more mailing lists