isdn/gigaset: use designated initializers
authorKees Cook <keescook@chromium.org>
Sat, 17 Dec 2016 00:58:06 +0000 (16:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Dec 2016 16:56:57 +0000 (11:56 -0500)
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: David S. Miller <davem@davemloft.net>
drivers/isdn/gigaset/bas-gigaset.c
drivers/isdn/gigaset/ser-gigaset.c
drivers/isdn/gigaset/usb-gigaset.c

index aecec6d3246370004a0e9434a1f58303e96b7c46..11e13c56126fba31fca9c59d66252ffeced55c8a 100644 (file)
@@ -2565,22 +2565,22 @@ static int gigaset_post_reset(struct usb_interface *intf)
 
 
 static const struct gigaset_ops gigops = {
-       gigaset_write_cmd,
-       gigaset_write_room,
-       gigaset_chars_in_buffer,
-       gigaset_brkchars,
-       gigaset_init_bchannel,
-       gigaset_close_bchannel,
-       gigaset_initbcshw,
-       gigaset_freebcshw,
-       gigaset_reinitbcshw,
-       gigaset_initcshw,
-       gigaset_freecshw,
-       gigaset_set_modem_ctrl,
-       gigaset_baud_rate,
-       gigaset_set_line_ctrl,
-       gigaset_isoc_send_skb,
-       gigaset_isoc_input,
+       .write_cmd = gigaset_write_cmd,
+       .write_room = gigaset_write_room,
+       .chars_in_buffer = gigaset_chars_in_buffer,
+       .brkchars = gigaset_brkchars,
+       .init_bchannel = gigaset_init_bchannel,
+       .close_bchannel = gigaset_close_bchannel,
+       .initbcshw = gigaset_initbcshw,
+       .freebcshw = gigaset_freebcshw,
+       .reinitbcshw = gigaset_reinitbcshw,
+       .initcshw = gigaset_initcshw,
+       .freecshw = gigaset_freecshw,
+       .set_modem_ctrl = gigaset_set_modem_ctrl,
+       .baud_rate = gigaset_baud_rate,
+       .set_line_ctrl = gigaset_set_line_ctrl,
+       .send_skb = gigaset_isoc_send_skb,
+       .handle_input = gigaset_isoc_input,
 };
 
 /* bas_gigaset_init
index b90776ef56ec8d2d35e8b51a79f75c2ecd472ab1..ab0b63a4d045f0b8b84c80daddc746a118596d5d 100644 (file)
@@ -445,22 +445,22 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
 }
 
 static const struct gigaset_ops ops = {
-       gigaset_write_cmd,
-       gigaset_write_room,
-       gigaset_chars_in_buffer,
-       gigaset_brkchars,
-       gigaset_init_bchannel,
-       gigaset_close_bchannel,
-       gigaset_initbcshw,
-       gigaset_freebcshw,
-       gigaset_reinitbcshw,
-       gigaset_initcshw,
-       gigaset_freecshw,
-       gigaset_set_modem_ctrl,
-       gigaset_baud_rate,
-       gigaset_set_line_ctrl,
-       gigaset_m10x_send_skb,  /* asyncdata.c */
-       gigaset_m10x_input,     /* asyncdata.c */
+       .write_cmd = gigaset_write_cmd,
+       .write_room = gigaset_write_room,
+       .chars_in_buffer = gigaset_chars_in_buffer,
+       .brkchars = gigaset_brkchars,
+       .init_bchannel = gigaset_init_bchannel,
+       .close_bchannel = gigaset_close_bchannel,
+       .initbcshw = gigaset_initbcshw,
+       .freebcshw = gigaset_freebcshw,
+       .reinitbcshw = gigaset_reinitbcshw,
+       .initcshw = gigaset_initcshw,
+       .freecshw = gigaset_freecshw,
+       .set_modem_ctrl = gigaset_set_modem_ctrl,
+       .baud_rate = gigaset_baud_rate,
+       .set_line_ctrl = gigaset_set_line_ctrl,
+       .send_skb = gigaset_m10x_send_skb,      /* asyncdata.c */
+       .handle_input = gigaset_m10x_input,     /* asyncdata.c */
 };
 
 
index 5f306e2eece5e2a93c1dd86ac8eb29ab59a33e06..eade36dafa3408f192b618cd1c52323235ed2d34 100644 (file)
@@ -862,22 +862,22 @@ static int gigaset_pre_reset(struct usb_interface *intf)
 }
 
 static const struct gigaset_ops ops = {
-       gigaset_write_cmd,
-       gigaset_write_room,
-       gigaset_chars_in_buffer,
-       gigaset_brkchars,
-       gigaset_init_bchannel,
-       gigaset_close_bchannel,
-       gigaset_initbcshw,
-       gigaset_freebcshw,
-       gigaset_reinitbcshw,
-       gigaset_initcshw,
-       gigaset_freecshw,
-       gigaset_set_modem_ctrl,
-       gigaset_baud_rate,
-       gigaset_set_line_ctrl,
-       gigaset_m10x_send_skb,
-       gigaset_m10x_input,
+       .write_cmd = gigaset_write_cmd,
+       .write_room = gigaset_write_room,
+       .chars_in_buffer = gigaset_chars_in_buffer,
+       .brkchars = gigaset_brkchars,
+       .init_bchannel = gigaset_init_bchannel,
+       .close_bchannel = gigaset_close_bchannel,
+       .initbcshw = gigaset_initbcshw,
+       .freebcshw = gigaset_freebcshw,
+       .reinitbcshw = gigaset_reinitbcshw,
+       .initcshw = gigaset_initcshw,
+       .freecshw = gigaset_freecshw,
+       .set_modem_ctrl = gigaset_set_modem_ctrl,
+       .baud_rate = gigaset_baud_rate,
+       .set_line_ctrl = gigaset_set_line_ctrl,
+       .send_skb = gigaset_m10x_send_skb,
+       .handle_input = gigaset_m10x_input,
 };
 
 /*