From: Danilo Krummrich <dakr@kernel.org>
To: Alistair Popple <apopple@nvidia.com>
Cc: rust-for-linux@vger.kernel.org, dri-devel@lists.freedesktop.org,
	acourbot@nvidia.com, "Miguel Ojeda" <ojeda@kernel.org>,
	"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" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Joel Fernandes" <joelagnelf@nvidia.com>,
	"Timur Tabi" <ttabi@nvidia.com>,
	linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org
Subject: Re: [PATCH v3 05/13] gpu: nova-core: Add GSP command queue bindings
Date: Tue, 30 Sep 2025 15:33:13 +0200	[thread overview]
Message-ID: <5bd04709-55ff-4d4d-9559-3ae55fb42c9a@kernel.org> (raw)
In-Reply-To: <20250930131648.411720-6-apopple@nvidia.com>
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.
next prev parent reply	other threads:[~2025-09-30 13:33 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-30 13:16 [PATCH v3 00/13] gpu: nova-core: Boot GSP to RISC-V active Alistair Popple
2025-09-30 13:16 ` [PATCH v3 01/13] gpu: nova-core: Set correct DMA mask Alistair Popple
2025-09-30 13:29   ` Danilo Krummrich
2025-10-01  1:42     ` Alistair Popple
2025-10-01  1:53       ` John Hubbard
2025-09-30 13:16 ` [PATCH v3 02/13] gpu: nova-core: Create initial Gsp Alistair Popple
2025-09-30 13:16 ` [PATCH v3 03/13] gpu: nova-core: gsp: Create wpr metadata Alistair Popple
2025-09-30 13:16 ` [PATCH v3 04/13] gpu: nova-core: Add a slice-buffer (sbuffer) datastructure Alistair Popple
2025-09-30 13:16 ` [PATCH v3 05/13] gpu: nova-core: Add GSP command queue bindings Alistair Popple
2025-09-30 13:33   ` Danilo Krummrich [this message]
2025-09-30 13:16 ` [PATCH v3 06/13] gpu: nova-core: gsp: Add GSP command queue handling Alistair Popple
2025-09-30 13:16 ` [PATCH v3 07/13] gpu: nova-core: gsp: Create rmargs Alistair Popple
2025-09-30 13:16 ` [PATCH v3 08/13] gpu: nova-core: Add bindings and accessors for GspSystemInfo Alistair Popple
2025-10-02 13:49   ` Alexandre Courbot
2025-10-02 23:38     ` Alistair Popple
2025-10-03  0:56       ` Alexandre Courbot
2025-10-03 16:34     ` Benno Lossin
2025-10-03 17:25       ` Janne Grunau
2025-10-03 17:59         ` Benno Lossin
2025-09-30 13:16 ` [PATCH v3 09/13] gpu: nova-core: Add bindings for the GSP RM registry tables Alistair Popple
2025-09-30 13:16 ` [PATCH v3 10/13] gpu: nova-core: gsp: Create RM registry and sysinfo commands Alistair Popple
2025-10-01 16:46   ` Timur Tabi
2025-09-30 13:16 ` [PATCH v3 11/13] nova-core: falcon: Add support to check if RISC-V is active Alistair Popple
2025-09-30 17:17   ` Timur Tabi
2025-09-30 13:16 ` [PATCH v3 12/13] nova-core: falcon: Add support to write firmware version Alistair Popple
2025-09-30 13:16 ` [PATCH v3 13/13] nova-core: gsp: Boot GSP Alistair Popple
2025-09-30 17:28   ` Timur Tabi
2025-09-30 13:26 ` [PATCH v3 00/13] gpu: nova-core: Boot GSP to RISC-V active Danilo Krummrich
2025-10-01  2:02   ` Alistair Popple
2025-10-01  2:02 ` John Hubbard
2025-10-01  5:54   ` Alistair Popple
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=5bd04709-55ff-4d4d-9559-3ae55fb42c9a@kernel.org \
    --to=dakr@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=joelagnelf@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tmgross@umich.edu \
    --cc=ttabi@nvidia.com \
    --cc=tzimmermann@suse.de \
    /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).