From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: vbios: use checked accesses in `setup_falcon_data` Date: Thu, 23 Apr 2026 08:42:24 +1000 Message-ID: In-Reply-To: <20260421-fix-vbios-v3-5-8f648aef7a85@nvidia.com> References: <20260421-fix-vbios-v3-0-8f648aef7a85@nvidia.com> <20260421-fix-vbios-v3-5-8f648aef7a85@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Good fix. The old code: ```rust let mut ucode_offset = usize::from_safe_cast(entry.data); ucode_offset -= pci_at_image.base.data.len(); // check and subtract... ucode_offset -= first_fwsec.base.data.len(); ``` could panic on the subtractions if the firmware-supplied `entry.data` was smaller than expected. The new code chains `checked_sub` calls and returns `EINVAL` on underflow. No issues. --- Generated by Claude Code Patch Reviewer