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: <20200310123641.816284321@linuxfoundation.org>
Date:   Tue, 10 Mar 2020 13:37:40 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org, Rob Clark <robdclark@...il.com>,
        Sean Paul <sean@...rly.run>,
        Sami Tolvanen <samitolvanen@...gle.com>,
        Todd Kjos <tkjos@...gle.com>,
        Alistair Delva <adelva@...gle.com>,
        Amit Pundir <amit.pundir@...aro.org>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        freedreno@...ts.freedesktop.org,
        clang-built-linux@...glegroups.com,
        John Stultz <john.stultz@...aro.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Rob Clark <robdclark@...omium.org>,
        Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.5 023/189] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

From: John Stultz <john.stultz@...aro.org>

[ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ]

I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.

This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of where things went
wrong).

Thanks as always to Sami for his help narrowing this down.

Cc: Rob Clark <robdclark@...il.com>
Cc: Sean Paul <sean@...rly.run>
Cc: Sami Tolvanen <samitolvanen@...gle.com>
Cc: Todd Kjos <tkjos@...gle.com>
Cc: Alistair Delva <adelva@...gle.com>
Cc: Amit Pundir <amit.pundir@...aro.org>
Cc: Sumit Semwal <sumit.semwal@...aro.org>
Cc: freedreno@...ts.freedesktop.org
Cc: clang-built-linux@...glegroups.com
Signed-off-by: John Stultz <john.stultz@...aro.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
Tested-by: Amit Pundir <amit.pundir@...aro.org>
Signed-off-by: Rob Clark <robdclark@...omium.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 271aa7bbca925..355a60b4a536f 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -336,7 +336,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector *connector)
 	return num;
 }
 
-static int dsi_mgr_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector *connector,
 				struct drm_display_mode *mode)
 {
 	int id = dsi_mgr_connector_get_id(connector);
-- 
2.20.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ