summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAkash Goel <akash.goel@arm.com>2026-10-13 13:54:32 +0100
committerLiviu Dudau <liviu.dudau@arm.com>2026-10-15 15:22:16 +0100
commit9a07b36a511fe998f46372331758ef355273bdfb (patch)
treef820ac548d3114097c6865b961499343e60ba1f1 /include
parent902fdc5e6662a96de71887ce4c2a591231aed82d (diff)
drm/panthor: Fix handling of NO_MMAP BOs
The BOs created with DRM_PANTHOR_BO_NO_MMAP flag are not supposed to be mmappable by the Userspace. But after the rework to support shrinker, it became possible to mmap NO_MMAP BOs. Userspace could second guess the file offset range, allocated unconditionally at the BO creation time, and create a CPU mapping. There may not be any adverse effect of such a CPU mapping though. This commit adds a check in the mmap callback of Panthor driver to fail the mmap() attempts on BOs created with NO_MMAP flag. The check covers private BOs as well as the prime exported BOs that are mmapped using prime fd. v2: - Fix breakage of mmap() on exported BOs that didn't have BO_MMAP_OFFSET ioctl invoked for them. Fixes: 68cbf96b1e9b ("drm/panthor: Part ways with drm_gem_shmem_object") Suggested-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Akash Goel <akash.goel@arm.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://patch.msgid.link/20261013125433.26432-1-akash.goel@arm.com
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions