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: <20180130152400.28972-1-benjamin.gaignard@linaro.org>
Date:   Tue, 30 Jan 2018 16:24:00 +0100
From:   Benjamin Gaignard <benjamin.gaignard@...aro.org>
To:     yannick.fertre@...com, philippe.cornu@...com,
        vincent.abriou@...com, laurent.pinchart@...asonboard.com
Cc:     airlied@...ux.ie, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>
Subject: [PATCH] drm/stm: check pitch and size calculations even if !CONFIG_MMU

In all cases we have to check pitch and size calculations.
Rely on drm_gem_cma_dumb_create for no MMU cases.

Fixes: 21f815bf773c ("drm/stm: drv: Improve data transfers")

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...aro.org>
---
 drivers/gpu/drm/stm/drv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
index 8bc7e8418b8d..3e0fb5f34b8e 100644
--- a/drivers/gpu/drm/stm/drv.c
+++ b/drivers/gpu/drm/stm/drv.c
@@ -44,9 +44,11 @@ static int stm_gem_cma_dumb_create(struct drm_file *file,
 	 */
 	args->pitch = roundup(min_pitch, 128);
 	args->height = roundup(args->height, 4);
-#endif
 
 	return drm_gem_cma_dumb_create_internal(file, dev, args);
+#else
+	return drm_gem_cma_dumb_create(file, dev, args);
+#endif
 }
 
 DEFINE_DRM_GEM_CMA_FOPS(drv_driver_fops);
-- 
2.15.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ