public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: dma-buf: heaps: Add Coherent heap to dmabuf heaps
Date: Fri, 27 Feb 2026 15:38:23 +1000	[thread overview]
Message-ID: <review-overall-20260224-b4-dmabuf-heap-coherent-rmem-v1-1-dffef43298ac@redhat.com> (raw)
In-Reply-To: <20260224-b4-dmabuf-heap-coherent-rmem-v1-1-dffef43298ac@redhat.com>

Overall Series Review

Subject: dma-buf: heaps: Add Coherent heap to dmabuf heaps
Author: Albert Esteve <aesteve@redhat.com>
Patches: 3
Reviewed: 2026-02-27T15:38:23.597909

---

This is a single patch adding a new dma-buf heap driver for DT coherent reserved-memory (`shared-dma-pool` without `reusable`). The goal is to expose these regions to userspace via the dma-buf heaps interface, with dmem cgroup accounting.

**Overall assessment: Needs significant rework.** The patch has several critical issues including unsafe use of `virt_to_page()` on `dma_alloc_coherent()` return values, missing memory zeroing (information leak to userspace), and an architectural concern where core DMA code is modified to call into the dma-buf heap subsystem. The `#if IS_ENABLED(CONFIG_CGROUP_DMEM)` ifdefs throughout are unnecessary since the header provides stubs, and there is no mechanism to prevent unconditional exposure of all coherent reserved-memory to userspace.

---

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-02-27  5:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24  7:57 [PATCH] dma-buf: heaps: Add Coherent heap to dmabuf heaps Albert Esteve
2026-02-26 10:12 ` Maxime Ripard
2026-02-26 15:22 ` Robin Murphy
2026-02-27  5:38 ` Claude Code Review Bot [this message]
2026-02-27  5:38 ` Claude review: " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-03 12:33 [PATCH v2 0/6] dma-buf: heaps: add coherent reserved-memory heap Albert Esteve
2026-03-03 12:33 ` [PATCH v2 4/6] dma-buf: heaps: Add Coherent heap to dmabuf heaps Albert Esteve
2026-03-03 21:19   ` Claude review: " Claude Code Review Bot
2026-03-06 10:36 [PATCH v3 0/6] dma-buf: heaps: add coherent reserved-memory heap Albert Esteve
2026-03-06 10:36 ` [PATCH v3 5/6] dma-buf: heaps: Add Coherent heap to dmabuf heaps Albert Esteve
2026-03-08 23:02   ` Claude review: " 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-20260224-b4-dmabuf-heap-coherent-rmem-v1-1-dffef43298ac@redhat.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