Re: [PATCH] drm/msm/gem: Deal with partial mmap's in fault path
From: Dmitry Baryshkov
Date: Wed Nov 11 2026 - 10:57:15 EST
On Fri, Nov 06, 2026 at 11:03:17AM -0800, Rob Clark wrote:
> Historically we ignored pgoff, as it was a "fake" offset that simply
> served to map back to the gem handle. Mmaping a partial obj was dis-
> allowed.
>
> But we can instead just subtract off the fake offset.
>
> drm_gem_mmap() still expects an exact match on pgoff, so unless we use
> our own path for that, like some other drivers, we don't fully support
> partial mmap. But this at least makes things more robust if userspace
> does funny things like partal unmap.
>
> Signed-off-by: Rob Clark <robin.clark@xxxxxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/msm/msm_gem.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
>
--
With best wishes
Dmitry