From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/panthor: set __GFP_SKIP_KASAN
Date: Sat, 16 May 2026 13:08:47 +1000 [thread overview]
Message-ID: <review-patch1-20260512-panthor-kasan-v1-1-d8d3e275d71b@gmail.com> (raw)
In-Reply-To: <20260512-panthor-kasan-v1-1-d8d3e275d71b@gmail.com>
Patch Review
**Correctness analysis:**
The key expansion check:
- `GFP_HIGHUSER` = `GFP_USER | __GFP_HIGHMEM`
- `GFP_HIGHUSER_MOVABLE` = `GFP_HIGHUSER | __GFP_MOVABLE | __GFP_SKIP_KASAN`
- `GFP_HIGHUSER_MOVABLE & ~__GFP_MOVABLE` = `GFP_HIGHUSER | __GFP_SKIP_KASAN`
So the new expression:
```c
(GFP_HIGHUSER_MOVABLE & ~__GFP_MOVABLE) | __GFP_RETRY_MAYFAIL | __GFP_NOWARN
```
is equivalent to the old:
```c
GFP_HIGHUSER | __GFP_RETRY_MAYFAIL | __GFP_NOWARN
```
plus `__GFP_SKIP_KASAN`. This is exactly the intended change — the only new flag added is `__GFP_SKIP_KASAN`.
**Concerns:**
1. **Fragility of the indirection:** The expression `(GFP_HIGHUSER_MOVABLE & ~__GFP_MOVABLE)` is a somewhat indirect way to spell `GFP_HIGHUSER | __GFP_SKIP_KASAN`. If `GFP_HIGHUSER_MOVABLE` ever gains additional flags beyond `__GFP_MOVABLE | __GFP_SKIP_KASAN`, those would silently be included here. However, this is a common kernel pattern (e.g., `GFP_TRANSHUGE_LIGHT` does a similar mask-and-strip), and the commit message explains the reasoning, so this is acceptable.
2. **Alternative: using `__GFP_SKIP_KASAN` directly.** A more explicit alternative would be:
```c
GFP_HIGHUSER | __GFP_SKIP_KASAN | __GFP_RETRY_MAYFAIL | __GFP_NOWARN
```
This is arguably clearer about what's happening, but the author's approach has the advantage of tying the flags to `GFP_HIGHUSER_MOVABLE` semantics (these pages *would* be movable if panthor didn't pin them), which is a reasonable design choice and matches the existing comment about why `MOVABLE` is stripped.
3. **Alignment nit:** The `__GFP_RETRY_MAYFAIL` on the continuation line is indented with tabs plus extra spaces to align with the opening `(`, but the alignment looks like it might use one extra tab. This is very minor and depends on the project's tab-stop convention.
4. **The `drm/msm` note** in the commit's post-sign-off section is a useful heads-up. If msm GEM objects can also be swapped via shmem and the system has MTE, the same bug would apply there. This is worth tracking but doesn't affect this patch.
**Overall for this patch:** Correct fix for a real bug. The commit message is excellent — it explains the root cause clearly, including the non-obvious `shmem_swapin_cluster` interaction path. No functional issues found.
Reviewed-by: would be appropriate here.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-05-16 3:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 17:36 [PATCH] drm/panthor: set __GFP_SKIP_KASAN Chia-I Wu via B4 Relay
2026-05-13 9:11 ` Boris Brezillon
2026-05-13 18:39 ` Chia-I Wu
2026-05-16 3:08 ` Claude review: " Claude Code Review Bot
2026-05-16 3:08 ` Claude Code Review Bot [this message]
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-patch1-20260512-panthor-kasan-v1-1-d8d3e275d71b@gmail.com \
--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