From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/amd/ras: Fix type size of remainder argument
Date: Fri, 27 Feb 2026 14:18:28 +1000 [thread overview]
Message-ID: <review-overall-20260225014317.work.103-kees@kernel.org> (raw)
In-Reply-To: <20260225014317.work.103-kees@kernel.org>
Overall Series Review
Subject: drm/amd/ras: Fix type size of remainder argument
Author: Kees Cook <kees@kernel.org>
Patches: 2
Reviewed: 2026-02-27T14:18:28.692244
---
This is a single-patch fix from Kees Cook that addresses a real type-safety bug in `ras_core_convert_timestamp_to_time()`. The function passes an `int *` cast to `uint64_t *` into `div64_u64_rem()`, which expects a `u64 *remainder` parameter. This is a legitimate problem: on 64-bit platforms the store through the `uint64_t *` pointer will write 8 bytes into a 4-byte `int`, corrupting the adjacent stack variable, and on big-endian systems the wrong half of the 64-bit value would land in the `int`. The fix is straightforward and correct. The patch is well-motivated by a real compiler warning (`-Warray-bounds`) and has a proper `Fixes:` tag.
**Verdict: The patch looks good and should be accepted.**
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-02-27 4:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 1:43 [PATCH] drm/amd/ras: Fix type size of remainder argument Kees Cook
2026-02-25 17:28 ` Kees Cook
2026-02-27 4:18 ` Claude Code Review Bot [this message]
2026-02-27 4:18 ` Claude review: " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-02-25 17:47 [PATCH v2] " Kees Cook
2026-02-27 3:07 ` Claude review: " Claude Code Review Bot
2026-02-27 3:07 ` Claude Code Review Bot
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=review-overall-20260225014317.work.103-kees@kernel.org \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox