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: avoid reading too far in read_more_at_offset Date: Tue, 26 May 2026 07:03:40 +1000 Message-ID: In-Reply-To: <20260525-fix-vbios-v5-3-e5e455251537@nvidia.com> References: <20260525-fix-vbios-v5-0-e5e455251537@nvidia.com> <20260525-fix-vbios-v5-3-e5e455251537@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 This is the most substantive bugfix in the series. The old `read_more_at_offset` computed `gap_bytes + len` which meant if data was partially cached, it would re-read `len` bytes on top of the gap, potentially reading past `BIOS_MAX_SCAN_LEN`. The new code correctly computes `end.saturating_sub(self.data.len())` to only read the uncached portion. The `BIOS_MAX_SCAN_LEN` check is moved into `read_more`, which is a better location since it's the single point of entry for all reads. The change from `ROM_OFFSET + current_len` to just `start = self.data.len()` with `ROM_OFFSET + addr` in the loop body is a nice separation of concerns. No issues. --- Generated by Claude Code Patch Reviewer