From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/amd/ras: Fix type size of remainder argument Date: Fri, 27 Feb 2026 13:07:15 +1000 Message-ID: In-Reply-To: <20260225174702.it.918-kees@kernel.org> References: <20260225174702.it.918-kees@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: drm/amd/ras: Fix type size of remainder argument Author: Kees Cook Patches: 2 Reviewed: 2026-02-27T13:07:15.223220 --- This is a single-patch fix from Kees Cook addressing a real type-safety bug found while enabling `-Warray-bounds` globally. The original code passes a pointer to a 4-byte `int` cast to `uint64_t *` into `div64_u64_rem()`, which writes 8 bytes through that pointer. This causes a stack buffer overflow of 4 bytes and, on big-endian architectures, also produces a wrong value (the upper 32 bits of the remainder would be written over `remaining_seconds` while the meaningful lower 32 bits go to whatever is adjacent on the stack). The fix is correct, clean, and minimal. **Recommend: Accept.** --- Generated by Claude Code Patch Reviewer