diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-02-09 16:56:34 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-02-14 09:42:26 +0100 |
commit | c6fc836488c2ca45c06d21213f5281d668b42b95 (patch) | |
tree | 410e7ed240deacc21516da8378b18aad151cbb70 /drivers/gpu | |
parent | d315bdbfebd517cf5efabf666c8099e027ef666f (diff) | |
download | linux-stable-c6fc836488c2ca45c06d21213f5281d668b42b95.tar.gz linux-stable-c6fc836488c2ca45c06d21213f5281d668b42b95.tar.bz2 linux-stable-c6fc836488c2ca45c06d21213f5281d668b42b95.zip |
drm/gem-shmem: Don't store mmap'ed buffers in core dumps
Set the VM_DONTDUMP flag on mmap'ed VMAs to omit them from core
dumps. It's display-buffer memory; who knows what secrets these
buffers contain.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220209155634.3994-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_gem_shmem_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index 5991a22a9e22..bda06bde99fa 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -623,7 +623,7 @@ int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm_area_struct return ret; } - vma->vm_flags |= VM_PFNMAP | VM_DONTEXPAND; + vma->vm_flags |= VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP; vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); if (shmem->map_wc) vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); |