From patchwork Sat Dec 17 01:00:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 9478887 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BE78960237 for ; Sat, 17 Dec 2016 05:46:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACDEF2840E for ; Sat, 17 Dec 2016 05:46:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1DA72843E; Sat, 17 Dec 2016 05:46:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E0A62840E for ; Sat, 17 Dec 2016 05:46:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 360836E1F3; Sat, 17 Dec 2016 05:46:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x22b.google.com (mail-pf0-x22b.google.com [IPv6:2607:f8b0:400e:c00::22b]) by gabe.freedesktop.org (Postfix) with ESMTPS id E92FD6E19E for ; Sat, 17 Dec 2016 01:00:12 +0000 (UTC) Received: by mail-pf0-x22b.google.com with SMTP id d2so16384932pfd.0 for ; Fri, 16 Dec 2016 17:00:12 -0800 (PST) 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=P3KGPQmyRCtGcr7ehcy1/ybYUeVa2BGHYhFxqkfcE10=; b=HRpwH4XRvazyc9uDr2XowkO/D2XoL+f76lK4r3DoGaEQ+FPZRwgunQqGGmV8GQ4iv4 Us9D1AoUJ1eFAmeFRyEHgkD3aJ2sCezc2NVMGab4FldOCZFnjk3a+TdbRQbZfxyj/mYU ms2l2pxR9FkXG3UvbmBjOlV4KinKRzZbZGglc= 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=P3KGPQmyRCtGcr7ehcy1/ybYUeVa2BGHYhFxqkfcE10=; b=Yn2ePXF4yUnuUocUj7jyOPHGx0jZhmsCjnEIMAKlaMpKAWLNo42YncAHQcr+OmBMEq M1zVZs4WhWeyAUTZRnE603ICVwJv733cYNMD7l3pzLTevpZhwZpV32SQXx9nSy2OIGMx pQ6K7Ytfrivt41SuMCLRQbbZQs3pOly2LJZ95mzmapbJF1ugSCZCgpYCopZb6lE8ltJW Uam4dom6uAQ22QLlcviVyj0lDxa3S5GcEWZQ5a7P9FPCS8iB7LCeqKk+0FAHMgaqfC6+ h7aFRt6Mjm7XashIu6LPLE5c6tEcl2yrViNrovu+eyQfqdXJKTyXXhlA8Q2MwV9++++5 EJvg== X-Gm-Message-State: AKaTC033vNcC/L7LLQMm+ypM/EGEjCMbRulGbouEUlwUc7lNBegi2kyUPIZ4HiqOkvYtWxNN X-Received: by 10.84.213.144 with SMTP id g16mr12733083pli.134.1481936412220; Fri, 16 Dec 2016 17:00:12 -0800 (PST) Received: from www.outflux.net ([2002:ada4:7085:0:8454:20a8:3cd7:bcbf]) by smtp.gmail.com with ESMTPSA id g82sm14383043pfb.43.2016.12.16.17.00.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Dec 2016 17:00:11 -0800 (PST) Date: Fri, 16 Dec 2016 17:00:11 -0800 From: Kees Cook To: linux-kernel@vger.kernel.org Subject: [PATCH] drm/ttm: use designated initializers Message-ID: <20161217010011.GA140300@beast> MIME-Version: 1.0 Content-Disposition: inline X-Mailman-Approved-At: Sat, 17 Dec 2016 05:46:01 +0000 Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/gpu/drm/ttm/ttm_bo_manager.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_manager.c b/drivers/gpu/drm/ttm/ttm_bo_manager.c index aa0bd054d3e9..aea6a01500e1 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_manager.c +++ b/drivers/gpu/drm/ttm/ttm_bo_manager.c @@ -148,10 +148,10 @@ static void ttm_bo_man_debug(struct ttm_mem_type_manager *man, } const struct ttm_mem_type_manager_func ttm_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 }; EXPORT_SYMBOL(ttm_bo_manager_func);