Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761430AbcLRNr7 (ORCPT ); Sun, 18 Dec 2016 08:47:59 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:32847 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751769AbcLRNr5 (ORCPT ); Sun, 18 Dec 2016 08:47:57 -0500 Date: Sun, 18 Dec 2016 14:47:53 +0100 From: Daniel Vetter To: Kees Cook Cc: linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, Ben Skeggs , dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/nouveau: use designated initializers Message-ID: <20161218134753.c2vp54ipmrteucr5@phenom.ffwll.local> Mail-Followup-To: Kees Cook , linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, Ben Skeggs , dri-devel@lists.freedesktop.org References: <20161217010442.GA140619@beast> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161217010442.GA140619@beast> X-Operating-System: Linux phenom 4.8.0-1-amd64 User-Agent: NeoMutt/20161126 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2735 Lines: 85 On Fri, Dec 16, 2016 at 05:04:42PM -0800, Kees Cook wrote: > 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 Merged all drm ones except the amdgpu one (I'll leave that one to Alex) to drm-misc for 4.11 (so will show up in linux-next after xmas or so). -Daniel > --- > drivers/gpu/drm/nouveau/nouveau_ttm.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c > index a6dbe8258040..ec4668a41e01 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c > +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c > @@ -107,10 +107,10 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man, > } > > const struct ttm_mem_type_manager_func nouveau_vram_manager = { > - nouveau_vram_manager_init, > - nouveau_vram_manager_fini, > - nouveau_vram_manager_new, > - nouveau_vram_manager_del, > + .init = nouveau_vram_manager_init, > + .takedown = nouveau_vram_manager_fini, > + .get_node = nouveau_vram_manager_new, > + .put_node = nouveau_vram_manager_del, > }; > > static int > @@ -184,11 +184,11 @@ nouveau_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix) > } > > const struct ttm_mem_type_manager_func nouveau_gart_manager = { > - nouveau_gart_manager_init, > - nouveau_gart_manager_fini, > - nouveau_gart_manager_new, > - nouveau_gart_manager_del, > - nouveau_gart_manager_debug > + .init = nouveau_gart_manager_init, > + .takedown = nouveau_gart_manager_fini, > + .get_node = nouveau_gart_manager_new, > + .put_node = nouveau_gart_manager_del, > + .debug = nouveau_gart_manager_debug > }; > > /*XXX*/ > @@ -257,11 +257,11 @@ nv04_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix) > } > > const struct ttm_mem_type_manager_func nv04_gart_manager = { > - nv04_gart_manager_init, > - nv04_gart_manager_fini, > - nv04_gart_manager_new, > - nv04_gart_manager_del, > - nv04_gart_manager_debug > + .init = nv04_gart_manager_init, > + .takedown = nv04_gart_manager_fini, > + .get_node = nv04_gart_manager_new, > + .put_node = nv04_gart_manager_del, > + .debug = nv04_gart_manager_debug > }; > > int > -- > 2.7.4 > > > -- > Kees Cook > Nexus Security > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch