Skip to contentSkip to conversation

video: fbdev: sh_mobile_lcdcfb: use designated initializers

PATCH In review Kees Cook 3 participants 3 messages Dec 17, 2016 – Dec 19, 2016 Framebuffer layer

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 video: fbdev: sh_mobile_lcdcfb: 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.

---
 drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/video/fbdev/sh_mobile_lcdcfb.c +3 -3
index 82c0a8caa9b8..42499a1afa07 100644
@@ -439,9 +439,9 @@ static unsigned long lcdc_sys_read_data(void *handle)
 }
 
 static struct sh_mobile_lcdc_sys_bus_ops sh_mobile_lcdc_sys_bus_ops = {
-	lcdc_sys_write_index,
-	lcdc_sys_write_data,
-	lcdc_sys_read_data,
+	.write_index = lcdc_sys_write_index,
+	.write_data = lcdc_sys_write_data,
+	.read_data = lcdc_sys_read_data,
 };
 
 static int sh_mobile_lcdc_sginit(struct fb_info *info,
Signature · 6 lines
2.7.4


-- 
Kees Cook
Nexus Security
#1 lore raw

Hi,

Quoted 6 lines · Kees Cook

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.

I have same request as Ingo for x86/floppy patch:

please align the two columns vertically while at it.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Quoted 21 lines
---
 drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/video/fbdev/sh_mobile_lcdcfb.c +3 -3
index 82c0a8caa9b8..42499a1afa07 100644
@@ -439,9 +439,9 @@ static unsigned long lcdc_sys_read_data(void *handle)
 }
 
 static struct sh_mobile_lcdc_sys_bus_ops sh_mobile_lcdc_sys_bus_ops = {
-	lcdc_sys_write_index,
-	lcdc_sys_write_data,
-	lcdc_sys_read_data,
+	.write_index = lcdc_sys_write_index,
+	.write_data = lcdc_sys_write_data,
+	.read_data = lcdc_sys_read_data,
 };
 
 static int sh_mobile_lcdc_sginit(struct fb_info *info,
Reviewed-by on v1 1/1
#2 lore raw
In reply to Kees Cook
Quoted 6 lines · Kees Cook

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.

Quoted 11 lines
---
 drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/video/fbdev/sh_mobile_lcdcfb.c +0 -0
index 82c0a8caa9b8..42499a1afa07 100644
@@ -439,9 +439,9 @@ static unsigned long lcdc_sys_read_data(void *handle)
 }
 

drivers/video/fbdev/sh_mobile_lcdcfb.c static unsigned long lcdc_sys_read_data(void *handle) · line 447

Quoted 10 lines
drivers/video/fbdev/sh_mobile_lcdcfb.c +3 -3
 static struct sh_mobile_lcdc_sys_bus_ops sh_mobile_lcdc_sys_bus_ops = {
-       lcdc_sys_write_index,
-       lcdc_sys_write_data,
-       lcdc_sys_read_data,
+       .write_index = lcdc_sys_write_index,
+       .write_data = lcdc_sys_write_data,
+       .read_data = lcdc_sys_read_data,
 };
 
 static int sh_mobile_lcdc_sginit(struct fb_info *info,

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds