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-next>] [day] [month] [year] [list]
Message-Id: <20191101101110.10105-1-christian.gmeiner@gmail.com>
Date:   Fri,  1 Nov 2019 11:10:48 +0100
From:   Christian Gmeiner <christian.gmeiner@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     Christian Gmeiner <christian.gmeiner@...il.com>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        stable@...r.kernel.org, Lucas Stach <l.stach@...gutronix.de>,
        Russell King <linux+etnaviv@...linux.org.uk>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, etnaviv@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org
Subject: [PATCH] drm/etnaviv: correct ETNA_MAX_PIPE define

etnaviv supports the following pipe types:

ETNA_PIPE_3D      0x00
ETNA_PIPE_2D      0x01
ETNA_PIPE_VG      0x02

The current used value of 4 for ETNA_MAX_PIPES is wrong and
caueses some troubles in the combination with perf counters.

Lets have a look at the function etnaviv_pm_query_dom(..):
If domain->pipe is 3 then we are one element beyond the end
of the array.

The easiest way to fix this issue is to provide a correct value
for ETNA_MAX_PIPES.

Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Fixes: a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver")
Cc: stable@...r.kernel.org
Signed-off-by: Christian Gmeiner <christian.gmeiner@...il.com>
---
 include/uapi/drm/etnaviv_drm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/drm/etnaviv_drm.h b/include/uapi/drm/etnaviv_drm.h
index 09d0df8b71c5..5a62228298d1 100644
--- a/include/uapi/drm/etnaviv_drm.h
+++ b/include/uapi/drm/etnaviv_drm.h
@@ -75,7 +75,7 @@ struct drm_etnaviv_timespec {
 #define ETNAVIV_PARAM_GPU_NUM_VARYINGS              0x1a
 #define ETNAVIV_PARAM_SOFTPIN_START_ADDR            0x1b
 
-#define ETNA_MAX_PIPES 4
+#define ETNA_MAX_PIPES 3
 
 struct drm_etnaviv_param {
 	__u32 pipe;           /* in */
-- 
2.23.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ