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: <20160906040233.32471-3-stefan@agner.ch>
Date:   Mon,  5 Sep 2016 21:02:31 -0700
From:   Stefan Agner <stefan@...er.ch>
To:     dri-devel@...ts.freedesktop.org, meng.yi@....com
Cc:     alison.wang@...escale.com, jianwei.wang.chn@...il.com,
        linux-kernel@...r.kernel.org, Stefan Agner <stefan@...er.ch>
Subject: [PATCH 2/4] drm/fsl-dcu: respect pos/size register sizes

Mask the size and position values to avoid mutual overwriting.
Especially, a negative X position caused the Y position to be
overwritten with 0xfff too. This has been observed when using
a layer as cursor layer.

Signed-off-by: Stefan Agner <stefan@...er.ch>
---
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
index 3b371fe7..060f881 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
@@ -118,11 +118,11 @@
 
 #define DCU_CTRLDESCLN(layer, reg)	(0x200 + (reg - 1) * 4 + (layer) * 0x40)
 
-#define DCU_LAYER_HEIGHT(x)		((x) << 16)
-#define DCU_LAYER_WIDTH(x)		(x)
+#define DCU_LAYER_HEIGHT(x)		(((x) & 0x7ff) << 16)
+#define DCU_LAYER_WIDTH(x)		((x) & 0x7ff)
 
-#define DCU_LAYER_POSY(x)		((x) << 16)
-#define DCU_LAYER_POSX(x)		(x)
+#define DCU_LAYER_POSY(x)		(((x) & 0xfff) << 16)
+#define DCU_LAYER_POSX(x)		((x) & 0xfff)
 
 #define DCU_LAYER_EN			BIT(31)
 #define DCU_LAYER_TILE_EN		BIT(30)
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ