On Tue, 21 Jul 2026 09:15:58 +0800, Linmao Li wrote:
> vc4_gem_object_mmap() rejects a writable mapping of a validated shader
> BO, but leaves VM_MAYWRITE set. Userspace can map the BO read-only and
> then turn it writable with mprotect().
>
> Validated shader BOs must stay read-only: the validator checks the
> instructions once and the GPU trusts them afterwards. A writable
> mapping lets userspace rewrite the code after validation, bypassing the
> validator.
>
> [...]
Applied, thanks!
[1/1] drm/vc4: Prevent shader BO mappings from becoming writable
commit: 0c9e6367639548307d3f578f6943ce72c9d39087
Best regards,
- Maíra