From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Convert moduleparams to seq_buf Date: Mon, 25 May 2026 20:11:16 +1000 Message-ID: In-Reply-To: <20260521133315.work.845-kees@kernel.org> References: <20260521133315.work.845-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: Convert moduleparams to seq_buf Author: Kees Cook Patches: 21 Reviewed: 2026-05-25T20:11:16.262079 --- This is a well-structured treewide conversion from Kees Cook to migrate kernel module parameter `.get` callbacks from a raw `char *` buffer (with no explicit bounds passed in the prototype) to a `struct seq_buf *`-based API that carries its own size. The motivation is sound: the old callback signature has long been a source of potential buffer overflows since the PAGE_SIZE bound is implicit and not enforced at the API level. The series is logically ordered as a migration: (1) fix an existing buffer overflow in array params, (2) minor cleanup, (3) introduce `DEFINE_KERNEL_PARAM_OPS` macros, (4) convert all initializers treewide via Coccinelle, (5) rename `.get` to `.get_str`, (6) add new seq_buf `.get` field, (7) use `_Generic` to auto-route during the migration, (8) convert core helpers, (9-10) convert all remaining callsites, (11) remove scaffolding. The approach is clever: the `_Generic` dispatch in `DEFINE_KERNEL_PARAM_OPS` means individual subsystem conversions can happen one at a time without touching the macro site, significantly reducing coordination overhead. The series touches 110 files and is net negative on lines. For the DRM subsystem specifically, the changes to `drm_panic.c` and `i915/i915_mitigations.c` are mechanical and correct. **Overall: Good to go, with a few minor observations below.** --- Generated by Claude Code Patch Reviewer