SHADER VALIDATOR FOR VC4.(9)
π Shader validator for VC4.(9)
okay so bestie, this is a page from the Kernel API Manual β yes, the Kernel API Manual, we're literally in the big leagues now π β and it's all about the shader validator for VC4. sit down, hydrate, and let's get into it β¨
πΈ NAME πΈ
Shader validator for VC4. β the security bouncer standing between your shaders and the rest of system memory π«Ά
π DESCRIPTION π
so here's the situation, and it's kind of a big deal π the VC4 has no IOMMU between it and system memory. none. zero. not a single one π which means if a user has access to execute shaders, they could legitimately escalate privilege β like, actual privilege escalation β by overwriting system memory (using the VPM write address register in the general-purpose DMA mode) or by reading system memory it shouldn't be reading (reading it as a texture, as uniform data, or via a direct-addressed TMU lookup). yeah. that's the whole vibe. not cute, but it's real π
the shader validator walks over a shader's BO, making sure its accesses are appropriately bounded, and recording where texture accesses are made so that we can do relocations for them in the uniform stream. lowkey iconic bookkeeping behavior π
and here's the part where it gets chill: shader BO are immutable for their lifetimes β enforced by not allowing mmaps, GEM prime export, or rendering to from a CL π so this validation is only performed at BO creation time. one vibe check, at the door, and that's it. periodt π
bestie please remember: that immutability isn't a suggestion, it's enforced β the no-mmaps / no-GEM-prime-export / no-rendering-to-from-a-CL rules are literally what make validating once at BO creation time safe π«Ά
π¦ SEE ALSO π¦
- Kernel file
./drivers/gpu/drm/vc4/vc4_validate_shaders.cβ go read the source, iykyk π
and that's the whole page, bestie π this masterpiece lives in ./drivers/gpu/drm/vc4 and it's dated October 2026 β slay, see you in the source tree, mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms