Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1543895

[PATCH] drm/ttm: use designated initializers

Path csiph.com!1.us.feeder.erje.net!2.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject [PATCH] drm/ttm: use designated initializers
Date Sat, 17 Dec 2016 02:10:03 +0100
Message-ID <sPbFF-2GI-75@gated-at.bofh.it> (permalink)
X-Original-To linux-kernel@vger.kernel.org
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=oZFJe3kmyImViI13hkDfmv/tCwUIsaZ05MqeGWOsLHQ=; b=QlDU6UwXwaO3uUh0vq3ese58wjcvsYK5rirIyraSDuoOTD1asA0fI4Obcv4PyZYIDN 4UMCw4bRjSgnSvMdUU07tcfXGxld7JgtgtOrspHLNS7EJxc9bBUq3QsKDE+sRxpk9FBF id1PN0QgyVeQ5FTzf1zmdcn8Xb9uuEka7l9zE=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=oZFJe3kmyImViI13hkDfmv/tCwUIsaZ05MqeGWOsLHQ=; b=fLOKV2bnIPnLw/M/z6zzf9N72JpO+nTPb+M+8afb1TCVbXeibYaqVLW3n6buTbcHWi WgHyZ7dxpowF9Ae71pTY4xmJzv0X4W1PiGHdJsMPcg6G+adkmNaaAJDRgMpjha9ynZu5 LF74oIF+urdJKPwmujNJK6G6MISh6zHwSf+ZnNlUqUaeni5En+kcCP66ufo8lvzQUB7F Y+Ypr7XLLGUhmcu/fLHRYVdUGB4ONcnvensxANMrtUlcWtQMrLqdRNV8dZ7fg8pyPyIP mGGR9YvpRnEIzDKmbdZicInr1eImAAA8XIcE6DV6pJjrTinVWTq5NVIFMbmAwZSK3P3g nY7A==
X-Gm-Message-State AKaTC01zcvq/WGaY2rcG3Knq1X3jJ7CBxM4A+2F9KmdG36N/ceADtK6QUoJCXSfJQwR48rBy
X-Received by 10.84.129.131 with SMTP id b3mr12480834plb.54.1481936370614; Fri, 16 Dec 2016 16:59:30 -0800 (PST)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 38
Organization linux.* mail to news gateway
X-Original-Cc David Airlie <airlied@linux.ie>, Gerd Hoffmann <kraxel@redhat.com>, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org
X-Original-Date Fri, 16 Dec 2016 16:59:29 -0800
X-Original-Message-ID <20161217005929.GA140260@beast>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1543895

Show key headers only | View raw


Prepare to mark sensitive kernel structures for randomization by making
sure they're using designated initializers. These were identified during
allyesconfig builds of x86, arm, and arm64, with most initializer fixes
extracted from grsecurity.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 drivers/gpu/drm/virtio/virtgpu_ttm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_ttm.c b/drivers/gpu/drm/virtio/virtgpu_ttm.c
index 4a1de9f81193..63b3d5d35cf6 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ttm.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ttm.c
@@ -198,11 +198,11 @@ static void ttm_bo_man_debug(struct ttm_mem_type_manager *man,
 }
 
 static const struct ttm_mem_type_manager_func virtio_gpu_bo_manager_func = {
-	ttm_bo_man_init,
-	ttm_bo_man_takedown,
-	ttm_bo_man_get_node,
-	ttm_bo_man_put_node,
-	ttm_bo_man_debug
+	.init = ttm_bo_man_init,
+	.takedown = ttm_bo_man_takedown,
+	.get_node = ttm_bo_man_get_node,
+	.put_node = ttm_bo_man_put_node,
+	.debug = ttm_bo_man_debug
 };
 
 static int virtio_gpu_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
-- 
2.7.4


-- 
Kees Cook
Nexus Security

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] drm/ttm: use designated initializers Kees Cook <keescook@chromium.org> - 2016-12-17 02:10 +0100
  Re: [PATCH] drm/ttm: use designated initializers Kees Cook <keescook@chromium.org> - 2016-12-20 21:00 +0100

csiph-web