All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Roberts <nroberts@igalia.com>
To: Rob Herring <robh+dt@kernel.org>,
	Tomeu Vizoso <tomeu@tomeuvizoso.net>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
	Steven Price <steven.price@arm.com>,
	Robin Murphy <robin.murphy@arm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: [PATCH 0/2] Fix purging buffers in the shmem helpers
Date: Tue, 23 Feb 2021 16:51:23 +0100	[thread overview]
Message-ID: <20210223155125.199577-1-nroberts@igalia.com> (raw)

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

             reply	other threads:[~2021-02-23 15:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 15:51 Neil Roberts [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210223155125.199577-1-nroberts@igalia.com \
    --to=nroberts@igalia.com \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=steven.price@arm.com \
    --cc=tomeu@tomeuvizoso.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.