[RFC PATCH 0/2] mm,drm/ttm: Always block GUP to TTM pages

Thomas Hellström (Intel) thomas_os at shipmail.org
Sun Mar 21 18:45:27 UTC 2021


get_user_pages() to TTM pages is uwanted since TTM assumes it owns
the pages exclusively and / or sets up page-table mappings to io memory.

The first patch make sures we stop fast gup to huge TTM pages using
a trick with pmd_devmap() and pud_devmap() without a backing
dev_pagemap.

The second patch makes sure we block normal gup by setting VM_PFNMAP

Cc: Christian Koenig <christian.koenig at amd.com>
Cc: David Airlie <airlied at linux.ie>
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Jason Gunthorpe <jgg at nvidia.com>
Cc: linux-mm at kvack.org
Cc: dri-devel at lists.freedesktop.org
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Thomas Hellström (Intel) <thomas_os at shipmail.org>


More information about the dri-devel mailing list