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/vkms: Introduce configfs for plane format Date: Thu, 23 Apr 2026 07:30:16 +1000 Message-ID: In-Reply-To: <20260422-vkms-all-config-v4-22-dbb52e9aadc3@bootlin.com> References: <20260422-vkms-all-config-v4-0-dbb52e9aadc3@bootlin.com> <20260422-vkms-all-config-v4-22-dbb52e9aadc3@bootlin.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Bug: negative count in `vkms_configfs_parse_next_format()`.** The function computes: ```c int count = page - page_end; ``` Since `page` points to the start and `page_end` to the end, this produces a **negative** value. When passed to `strnchr()` (which takes `size_t`), this becomes a huge positive number, potentially reading far past the buffer. Must be `page_end - page`. **Bug: `plane_supported_formats_store()` rejects valid input from echo.** The check `if (count < 2 || count > 5)` means `echo "+XR24"` (which sends "+XR24\n", count=6) is rejected. Users must use `echo -n`. This is inconsistent with typical configfs usage. Either increase the limit to 6 to allow a trailing newline, or strip the newline before validation. Additionally, for shorter inputs (e.g. count=4 for "+AB\n"), the newline gets copied into the fourcc via `memcpy(fmt, &page[1], min(count - 1, 4))`, producing an invalid format code. The new kunit test file `vkms_configfs_test.c` and the format parsing tests are good additions. --- Generated by Claude Code Patch Reviewer