lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf8cf8d9-7092-d956-44d2-e55233f495d2@arm.com>
Date:   Tue, 29 Jan 2019 19:07:41 +0000
From:   Julien Grall <julien.grall@....com>
To:     Oleksandr Andrushchenko <andr2000@...il.com>,
        xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, daniel.vetter@...el.com,
        jgross@...e.com, boris.ostrovsky@...cle.com, kraxel@...hat.com,
        noralf@...nnes.org, hch@...radead.org
Cc:     Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
Subject: Re: [Xen-devel][PATCH] drm/xen-front: Fix mmap attributes for display
 buffers

Hi Oleksandr,

On 1/29/19 3:04 PM, Oleksandr Andrushchenko wrote:
> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
> 
> When GEM backing storage is allocated those are normal pages,
> so there is no point using pgprot_writecombine while mmaping.
> This fixes mismatch of buffer pages' memory attributes between
> the frontend and backend which may cause screen artifacts.
> 
> Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend")
> 
> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
> Suggested-by: Julien Grall <julien.grall@....com>
> ---
>   drivers/gpu/drm/xen/xen_drm_front_gem.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xen/xen_drm_front_gem.c b/drivers/gpu/drm/xen/xen_drm_front_gem.c
> index d303a2e17f5e..9d5c03d7668d 100644
> --- a/drivers/gpu/drm/xen/xen_drm_front_gem.c
> +++ b/drivers/gpu/drm/xen/xen_drm_front_gem.c
> @@ -235,8 +235,7 @@ static int gem_mmap_obj(struct xen_gem_object *xen_obj,
>   	vma->vm_flags &= ~VM_PFNMAP;
>   	vma->vm_flags |= VM_MIXEDMAP;
>   	vma->vm_pgoff = 0;
> -	vma->vm_page_prot =
> -			pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
> +	vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);

The patch looks good to me. It would be worth expanding the comment a 
bit before to explain that we overwrite vm_page_prot to use cacheable 
attribute as required by the Xen ABI.

With the comment updated:

Acked-by: Julien Grall <julien.grall@....com>

Cheers,

-- 
Julien Grall

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ