All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix purging buffers in the shmem helpers
@ 2021-02-23 15:51 Neil Roberts
  2021-02-23 15:51   ` Neil Roberts
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Neil Roberts @ 2021-02-23 15:51 UTC (permalink / raw)
  To: Rob Herring, Tomeu Vizoso, Alyssa Rosenzweig, Steven Price, Robin Murphy
  Cc: dri-devel

These two patches fix a problem with the madvise purging code for the
shmem helpers where the mmaping for a purged buffer wouldn't get
invalidated correctly. This presumably ends up as a security hole
where the mapping can be accessed from user-space to read and write
random pages from other buffers. This is currently affecting Panfrost.
The second patch is a v2 from a patch that was sent standalone.

There is a WIP IGT test for Panfrost which demonstrates the bug here:

https://gitlab.freedesktop.org/nroberts/igt-gpu-tools/-/commits/panfrost-purgemap/

Neil Roberts (2):
  drm/shmem-helper: Check for purged buffers in fault handler
  drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

 drivers/gpu/drm/drm_gem_shmem_helper.c | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

-- 
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-05 10:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 15:51 [PATCH 0/2] Fix purging buffers in the shmem helpers Neil Roberts
2021-02-23 15:51 ` [PATCH 1/2] drm/shmem-helper: Check for purged buffers in fault handler Neil Roberts
2021-02-23 15:51   ` Neil Roberts
2021-02-24 16:39   ` Steven Price
2021-02-24 16:39     ` Steven Price
2021-02-23 15:51 ` [PATCH v2 2/2] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff Neil Roberts
2021-02-23 15:51   ` Neil Roberts
2021-02-24 16:41   ` Steven Price
2021-02-24 16:41     ` Steven Price
2021-03-05 10:22 ` [PATCH 0/2] Fix purging buffers in the shmem helpers Steven Price

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.