Skip to content

Commit 4794195

Browse files
keesdavem330
authored andcommitted
isdn/gigaset: 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: David S. Miller <davem@davemloft.net>
1 parent cd333e3 commit 4794195

3 files changed

Lines changed: 48 additions & 48 deletions

File tree

‎drivers/isdn/gigaset/bas-gigaset.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,22 +2565,22 @@ static int gigaset_post_reset(struct usb_interface *intf)
25652565

25662566

25672567
static const struct gigaset_ops gigops = {
2568-
gigaset_write_cmd,
2569-
gigaset_write_room,
2570-
gigaset_chars_in_buffer,
2571-
gigaset_brkchars,
2572-
gigaset_init_bchannel,
2573-
gigaset_close_bchannel,
2574-
gigaset_initbcshw,
2575-
gigaset_freebcshw,
2576-
gigaset_reinitbcshw,
2577-
gigaset_initcshw,
2578-
gigaset_freecshw,
2579-
gigaset_set_modem_ctrl,
2580-
gigaset_baud_rate,
2581-
gigaset_set_line_ctrl,
2582-
gigaset_isoc_send_skb,
2583-
gigaset_isoc_input,
2568+
.write_cmd = gigaset_write_cmd,
2569+
.write_room = gigaset_write_room,
2570+
.chars_in_buffer = gigaset_chars_in_buffer,
2571+
.brkchars = gigaset_brkchars,
2572+
.init_bchannel = gigaset_init_bchannel,
2573+
.close_bchannel = gigaset_close_bchannel,
2574+
.initbcshw = gigaset_initbcshw,
2575+
.freebcshw = gigaset_freebcshw,
2576+
.reinitbcshw = gigaset_reinitbcshw,
2577+
.initcshw = gigaset_initcshw,
2578+
.freecshw = gigaset_freecshw,
2579+
.set_modem_ctrl = gigaset_set_modem_ctrl,
2580+
.baud_rate = gigaset_baud_rate,
2581+
.set_line_ctrl = gigaset_set_line_ctrl,
2582+
.send_skb = gigaset_isoc_send_skb,
2583+
.handle_input = gigaset_isoc_input,
25842584
};
25852585

25862586
/* bas_gigaset_init

‎drivers/isdn/gigaset/ser-gigaset.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -445,22 +445,22 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
445445
}
446446

447447
static const struct gigaset_ops ops = {
448-
gigaset_write_cmd,
449-
gigaset_write_room,
450-
gigaset_chars_in_buffer,
451-
gigaset_brkchars,
452-
gigaset_init_bchannel,
453-
gigaset_close_bchannel,
454-
gigaset_initbcshw,
455-
gigaset_freebcshw,
456-
gigaset_reinitbcshw,
457-
gigaset_initcshw,
458-
gigaset_freecshw,
459-
gigaset_set_modem_ctrl,
460-
gigaset_baud_rate,
461-
gigaset_set_line_ctrl,
462-
gigaset_m10x_send_skb, /* asyncdata.c */
463-
gigaset_m10x_input, /* asyncdata.c */
448+
.write_cmd = gigaset_write_cmd,
449+
.write_room = gigaset_write_room,
450+
.chars_in_buffer = gigaset_chars_in_buffer,
451+
.brkchars = gigaset_brkchars,
452+
.init_bchannel = gigaset_init_bchannel,
453+
.close_bchannel = gigaset_close_bchannel,
454+
.initbcshw = gigaset_initbcshw,
455+
.freebcshw = gigaset_freebcshw,
456+
.reinitbcshw = gigaset_reinitbcshw,
457+
.initcshw = gigaset_initcshw,
458+
.freecshw = gigaset_freecshw,
459+
.set_modem_ctrl = gigaset_set_modem_ctrl,
460+
.baud_rate = gigaset_baud_rate,
461+
.set_line_ctrl = gigaset_set_line_ctrl,
462+
.send_skb = gigaset_m10x_send_skb, /* asyncdata.c */
463+
.handle_input = gigaset_m10x_input, /* asyncdata.c */
464464
};
465465

466466

‎drivers/isdn/gigaset/usb-gigaset.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -862,22 +862,22 @@ static int gigaset_pre_reset(struct usb_interface *intf)
862862
}
863863

864864
static const struct gigaset_ops ops = {
865-
gigaset_write_cmd,
866-
gigaset_write_room,
867-
gigaset_chars_in_buffer,
868-
gigaset_brkchars,
869-
gigaset_init_bchannel,
870-
gigaset_close_bchannel,
871-
gigaset_initbcshw,
872-
gigaset_freebcshw,
873-
gigaset_reinitbcshw,
874-
gigaset_initcshw,
875-
gigaset_freecshw,
876-
gigaset_set_modem_ctrl,
877-
gigaset_baud_rate,
878-
gigaset_set_line_ctrl,
879-
gigaset_m10x_send_skb,
880-
gigaset_m10x_input,
865+
.write_cmd = gigaset_write_cmd,
866+
.write_room = gigaset_write_room,
867+
.chars_in_buffer = gigaset_chars_in_buffer,
868+
.brkchars = gigaset_brkchars,
869+
.init_bchannel = gigaset_init_bchannel,
870+
.close_bchannel = gigaset_close_bchannel,
871+
.initbcshw = gigaset_initbcshw,
872+
.freebcshw = gigaset_freebcshw,
873+
.reinitbcshw = gigaset_reinitbcshw,
874+
.initcshw = gigaset_initcshw,
875+
.freecshw = gigaset_freecshw,
876+
.set_modem_ctrl = gigaset_set_modem_ctrl,
877+
.baud_rate = gigaset_baud_rate,
878+
.set_line_ctrl = gigaset_set_line_ctrl,
879+
.send_skb = gigaset_m10x_send_skb,
880+
.handle_input = gigaset_m10x_input,
881881
};
882882

883883
/*

0 commit comments

Comments
 (0)