Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev: matroxfb: 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: Kees Cook <keescook@chromium.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Kees Cook and committed by
Bartlomiej Zolnierkiewicz
a641261e 6895aff4

+12 -3
+8 -2
drivers/video/fbdev/matrox/matroxfb_DAC1064.c
··· 1088 1088 1089 1089 #ifdef CONFIG_FB_MATROX_MYSTIQUE 1090 1090 struct matrox_switch matrox_mystique = { 1091 - MGA1064_preinit, MGA1064_reset, MGA1064_init, MGA1064_restore, 1091 + .preinit = MGA1064_preinit, 1092 + .reset = MGA1064_reset, 1093 + .init = MGA1064_init, 1094 + .restore = MGA1064_restore, 1092 1095 }; 1093 1096 EXPORT_SYMBOL(matrox_mystique); 1094 1097 #endif 1095 1098 1096 1099 #ifdef CONFIG_FB_MATROX_G 1097 1100 struct matrox_switch matrox_G100 = { 1098 - MGAG100_preinit, MGAG100_reset, MGAG100_init, MGAG100_restore, 1101 + .preinit = MGAG100_preinit, 1102 + .reset = MGAG100_reset, 1103 + .init = MGAG100_init, 1104 + .restore = MGAG100_restore, 1099 1105 }; 1100 1106 EXPORT_SYMBOL(matrox_G100); 1101 1107 #endif
+4 -1
drivers/video/fbdev/matrox/matroxfb_Ti3026.c
··· 738 738 } 739 739 740 740 struct matrox_switch matrox_millennium = { 741 - Ti3026_preinit, Ti3026_reset, Ti3026_init, Ti3026_restore 741 + .preinit = Ti3026_preinit, 742 + .reset = Ti3026_reset, 743 + .init = Ti3026_init, 744 + .restore = Ti3026_restore 742 745 }; 743 746 EXPORT_SYMBOL(matrox_millennium); 744 747 #endif