[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DG02AXMZMOLJ.8HNHT4KH8O69@nvidia.com>
Date: Wed, 28 Jan 2026 16:59:44 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Joel Fernandes" <joelagnelf@...dia.com>
Cc: <linux-kernel@...r.kernel.org>, "Paul Walmsley" <pjw@...nel.org>,
"Palmer Dabbelt" <palmer@...belt.com>, "Albert Ou" <aou@...s.berkeley.edu>,
"Alexandre Ghiti" <alex@...ti.fr>, "Miguel Ojeda" <ojeda@...nel.org>,
"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>, "Danilo
Krummrich" <dakr@...nel.org>, "Alistair Popple" <apopple@...dia.com>, "Zhi
Wang" <zhiw@...dia.com>, "Simona Vetter" <simona@...ll.ch>, "Bjorn Helgaas"
<bhelgaas@...gle.com>, "Alex Gaynor" <alex.gaynor@...il.com>, "Dirk Behme"
<dirk.behme@...il.com>, <nouveau@...ts.freedesktop.org>,
<dri-devel@...ts.freedesktop.org>, <rust-for-linux@...r.kernel.org>,
<linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH v2 0/5] gpu: nova-core: use checked arithmetic for
firmware parsing robustness
On Tue Jan 27, 2026 at 5:23 AM JST, Joel Fernandes wrote:
> Changes from v1 to v2:
> - Added Reviewed-by tags from Zhi
> - Fixed comment formatting nits raised by Dirk/Zhi
>
> This series adds checked arithmetic throughout nova-core's firmware parsing
> code to guard rust code against integer overflow from corrupt firmware.
>
> Without checked arithmetic, firmware could cause integer overflow when
> computing offsets. The danger is not just wrapping to a huge value (which may
> fail validation in other paths), but potentially wrapping to a small plausible
> offset that accesses entirely wrong data, causing silent corruption or security
> issues.
>
> This series has been rebased on drm-rust-next. If possible, I would like us to
> consider merging for the upcoming merge window to avoid future conflicts.
> Tested probing with GPU name printed in dmesg on my GA102 (Ampere).
>
> The git tree with all patches can be found at:
> git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git (tag: nova-checked-arith-v2-20260126)
>
> Link to v1: https://lore.kernel.org/all/20260124231830.3088323-1-joelagnelf@nvidia.com/
>
> Joel Fernandes (5):
> gpu: nova-core: use checked arithmetic in FWSEC firmware parsing
> gpu: nova-core: use checked arithmetic in Booter signature parsing
> gpu: nova-core: use checked arithmetic in frombytes_at helper
> gpu: nova-core: use checked arithmetic in BinFirmware::data
> gpu: nova-core: use checked arithmetic in RISC-V firmware parsing
Looking good, thanks! I'm staging these into a local branch and will
push as soon as `drm-rust-next` reopens.
Powered by blists - more mailing lists