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/tegra: gr2d/gr3d: Initialize address register map before HOST1X client is registered Date: Tue, 05 May 2026 08:41:52 +1000 Message-ID: In-Reply-To: <20260503163842.213489-2-clamor95@gmail.com> References: <20260503163842.213489-1-clamor95@gmail.com> <20260503163842.213489-2-clamor95@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Assessment: Good.** This patch moves the `addr_regs` bitmap initialization loop before `host1x_= client_register()` in both `gr2d_probe()` and `gr3d_probe()`. The change is correct. The `addr_regs` bitmap is consulted by `gr2d_is_addr= _reg()` / `gr3d_is_addr_reg()` during job submission to determine which reg= isters contain buffer addresses and must be validated/relocated. Leaving th= is uninitialized after registration means an early job submission could byp= ass address validation =E2=80=94 a correctness and potentially security-rel= evant issue. **Minor nit on the commit message:** The commit says: > The host1x_client_register() function is called just prior to register ma= p initialization loop, making the device available to userspace. This may r= esult in userspace attempting to submits a job before the register map is i= nitialized. The actual path from `host1x_client_register()` to userspace job submission= is not direct =E2=80=94 it requires the `init` callback to fire (which cre= ates the channel and registers with DRM), then userspace must open the devi= ce and submit. So the race window described in the commit message is slight= ly overstated. In practice, the `init` callback firing synchronously during= registration would be needed. That said, the fix is still the right thing = to do =E2=80=94 initialization should precede registration as a matter of d= efensive coding. The diff is clean and mechanical =E2=80=94 pure code motion, no behavioral = change beyond ordering. --- Generated by Claude Code Patch Reviewer