Commit 2fa70bb9 authored by Kees Cook's avatar Kees Cook Committed by Daniel Vetter

drm/nouveau: use designated initializers

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: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161217010442.GA140619@beast
parent 5ca16d8e
...@@ -107,10 +107,10 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man, ...@@ -107,10 +107,10 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man,
} }
const struct ttm_mem_type_manager_func nouveau_vram_manager = { const struct ttm_mem_type_manager_func nouveau_vram_manager = {
nouveau_vram_manager_init, .init = nouveau_vram_manager_init,
nouveau_vram_manager_fini, .takedown = nouveau_vram_manager_fini,
nouveau_vram_manager_new, .get_node = nouveau_vram_manager_new,
nouveau_vram_manager_del, .put_node = nouveau_vram_manager_del,
}; };
static int static int
...@@ -184,11 +184,11 @@ nouveau_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix) ...@@ -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 = { const struct ttm_mem_type_manager_func nouveau_gart_manager = {
nouveau_gart_manager_init, .init = nouveau_gart_manager_init,
nouveau_gart_manager_fini, .takedown = nouveau_gart_manager_fini,
nouveau_gart_manager_new, .get_node = nouveau_gart_manager_new,
nouveau_gart_manager_del, .put_node = nouveau_gart_manager_del,
nouveau_gart_manager_debug .debug = nouveau_gart_manager_debug
}; };
/*XXX*/ /*XXX*/
...@@ -257,11 +257,11 @@ nv04_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix) ...@@ -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 = { const struct ttm_mem_type_manager_func nv04_gart_manager = {
nv04_gart_manager_init, .init = nv04_gart_manager_init,
nv04_gart_manager_fini, .takedown = nv04_gart_manager_fini,
nv04_gart_manager_new, .get_node = nv04_gart_manager_new,
nv04_gart_manager_del, .put_node = nv04_gart_manager_del,
nv04_gart_manager_debug .debug = nv04_gart_manager_debug
}; };
int int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment