From: Timur Tabi <ttabi@nvidia.com>
To: "dakr@kernel.org" <dakr@kernel.org>
Cc: John Hubbard <jhubbard@nvidia.com>,
Eliot Courtney <ecourtney@nvidia.com>,
"nova-gpu@lists.linux.dev" <nova-gpu@lists.linux.dev>,
Zhi Wang <zhiw@nvidia.com>, "gary@garyguo.net" <gary@garyguo.net>,
"mcgrof@kernel.org" <mcgrof@kernel.org>,
"russ.weight@linux.dev" <russ.weight@linux.dev>,
"rust-for-linux@vger.kernel.org" <rust-for-linux@vger.kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>,
"driver-core@lists.linux.dev" <driver-core@lists.linux.dev>,
"ojeda@kernel.org" <ojeda@kernel.org>
Subject: Re: [PATCH v2 1/7] rust: firmware: add request_into_buf()
Date: Wed, 1 Jul 2026 19:47:47 +0000 [thread overview]
Message-ID: <9eb3d571a40bf2194c018a54b4d0dfb1e173a6e2.camel@nvidia.com> (raw)
In-Reply-To: <DJMOWWJLKVZU.1N9RUO41QFAE@kernel.org>
On Tue, 2026-06-30 at 23:09 +0200, Danilo Krummrich wrote:
> > + let ret = unsafe {
> > + bindings::request_firmware_into_buf(
> > + pfw,
> > + name.as_char_ptr(),
> > + dev.as_raw(),
> > + buf.as_mut_ptr().cast(),
>
> Sashiko's concern about buf being an empty slice, despite being nonsensical,
> seems valid. The allocated_size field in struct fw_priv, if set to zero, is
> interpreted as "the driver did not provide a buffer" and hence the firmware
> loader assumes that it has to treat the data pointer as a self-allocated buffer.
> In the case of passing an empty slice, this would be a dangling pointer.
Ok, I will return an error on an empty slice. Thanks.
next prev parent reply other threads:[~2026-07-01 19:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 19:47 [PATCH v2 0/7] Transition Nova Core to TLV firmware images Timur Tabi
2026-06-30 19:47 ` [PATCH v2 1/7] rust: firmware: add request_into_buf() Timur Tabi
2026-06-30 21:09 ` Danilo Krummrich
2026-07-01 19:47 ` Timur Tabi [this message]
2026-07-02 1:18 ` Alvin Sun
2026-06-30 19:47 ` [PATCH v2 2/7] gpu: nova-core: add TLV parser for firmware files Timur Tabi
2026-06-30 21:27 ` Danilo Krummrich
2026-06-30 19:47 ` [PATCH v2 3/7] gpu: nova-core: transition booter_load to TLV images Timur Tabi
2026-06-30 19:47 ` [PATCH v2 4/7] gpu: nova-core: transition gsp " Timur Tabi
2026-06-30 19:47 ` [PATCH v2 5/7] gpu: nova-core: transition gen_bootloader " Timur Tabi
2026-06-30 19:47 ` [PATCH v2 6/7] gpu: nova-core: transition fsp " Timur Tabi
2026-06-30 19:47 ` [PATCH v2 7/7] gpu: nova-core: update firmware module info for " Timur Tabi
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=9eb3d571a40bf2194c018a54b4d0dfb1e173a6e2.camel@nvidia.com \
--to=ttabi@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=mcgrof@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=russ.weight@linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=zhiw@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.