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] [day] [month] [year] [list]
Message-ID: <CAMeQTsYAomJnjc6eVnDxQL+FC3nG+n1ZDqUPGgDpU=tt9d+JMA@mail.gmail.com>
Date:   Tue, 23 Jun 2020 18:35:40 +0200
From:   Patrik Jakobsson <patrik.r.jakobsson@...il.com>
To:     Denis Efremov <efremov@...ux.com>
Cc:     Alan Cox <alan@...ux.intel.com>, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        stable@...r.kernel.org
Subject: Re: [PATCH] drm/gma500: Fix direction check in psb_accel_2d_copy()

On Mon, Jun 22, 2020 at 10:45 PM Denis Efremov <efremov@...ux.com> wrote:
>
> psb_accel_2d_copy() checks direction PSB_2D_COPYORDER_BR2TL twice.
> Based on psb_accel_2d_copy_direction() results, PSB_2D_COPYORDER_TL2BR
> should be checked instead in the second direction check.
>
> Fixes: 4d8d096e9ae8 ("gma500: introduce the framebuffer support code")
> Cc: stable@...r.kernel.org
> Signed-off-by: Denis Efremov <efremov@...ux.com>
> ---
>  drivers/gpu/drm/gma500/accel_2d.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/accel_2d.c b/drivers/gpu/drm/gma500/accel_2d.c
> index adc0507545bf..8dc86aac54d2 100644
> --- a/drivers/gpu/drm/gma500/accel_2d.c
> +++ b/drivers/gpu/drm/gma500/accel_2d.c
> @@ -179,8 +179,8 @@ static int psb_accel_2d_copy(struct drm_psb_private *dev_priv,
>                 src_x += size_x - 1;
>                 dst_x += size_x - 1;
>         }
> -       if (direction == PSB_2D_COPYORDER_BR2TL ||
> -           direction == PSB_2D_COPYORDER_BL2TR) {
> +       if (direction == PSB_2D_COPYORDER_BL2TR ||
> +           direction == PSB_2D_COPYORDER_TL2BR) {

Hi Denis,

Sorry, I don't follow. The code seems already correct to me.

src_x and dst_x gets adjusted when going from right to left
src_y and dst_y gets adjusted when going from bottom to top.

PSB_2D_COPYORDER_TL2BR needs no adjustment because it is the normal
blit direction.

Thanks
Patrik

>                 src_y += size_y - 1;
>                 dst_y += size_y - 1;
>         }
> --
> 2.26.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ